On 19 Okt., 16:40, Thomas Broyer <[email protected]> wrote:
> Er, how can it be 'static' if you're initializing it with a 'this'?
I don't need the 'static', but since these are constants all values
would be identically for all instances.

> If you know the constant's value, use it in your code (to initialize
> your constant field); do not call JSNI if you can avoid it.
I think I can take the constant values from /usr/include/GL/gl.h
(Linux). I'm not 100% sure if all graphic drivers use the same values,
I will need to test that. However, an backup solution would be this:

public static final int TEXTURE_2D = initTexture2D();
private static native int initTexture2D() /*-{ return
@packet.WebGL::gl.TEXTURE_2D; }-*/;


Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to