gzz.gfx.gl
Class GLUtil

java.lang.Object
  |
  +--gzz.gfx.gl.GLUtil

public class GLUtil
extends java.lang.Object

Miscellaneous GL utilities that don't belong.


Field Summary
static boolean dbg
           
 
Constructor Summary
GLUtil()
           
 
Method Summary
static java.lang.String checkMipmap(GL.Texture tex)
          Check mipmap levels of a texture.
static void reloadCompressed(GL.Texture tex, int start, int end)
          Delete the texture and recopy the compressed levels start..end-1 to it,.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dbg

public static boolean dbg
Constructor Detail

GLUtil

public GLUtil()
Method Detail

reloadCompressed

public static void reloadCompressed(GL.Texture tex,
                                    int start,
                                    int end)
Delete the texture and recopy the compressed levels start..end-1 to it,. It appears that there's a small driver bug in NVIDIA's driver (or that I'm mistaken again ;), where we can't easily unload texture levels. This method takes the drastic approach: delete the texture and then teximage it again.

The texture parameters are not touched, except that BASE_LEVEL and .

This MIGHT have now gotten fixed with the realization that we should always keep so many levels of the texture that both width and height are greater than 1 - not sure though.


checkMipmap

public static java.lang.String checkMipmap(GL.Texture tex)
Check mipmap levels of a texture.

Returns:
null, if everything is OK, an error string otherwise.