public class GL3Utilities
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
debug |
| Constructor and Description |
|---|
GL3Utilities() |
| Modifier and Type | Method and Description |
|---|---|
static void |
activateVertexAttribute(com.jogamp.opengl.GL3 gl,
int loc,
GL3AttributeStorage storage,
int stride,
int offset)
Enables a vertex attribute pointer based on a given storage, correctly handling matrix types
(since matrices occupy multiple attribute locations)
|
static void |
activateVertexAttribute(com.jogamp.opengl.GL3 gl,
int loc,
GL3AttributeStorage storage,
int stride,
int offset,
int divisor)
Enables a vertex attribute pointer based on a given storage, correctly handling matrix types
(since matrices occupy multiple attribute locations)
|
static void |
deactivateVertexAttribute(com.jogamp.opengl.GL3 gl,
int loc)
Enables a vertex attribute pointer based on a given storage, correctly
handling matrix types (since matrices occupy multiple attribute
locations)
|
static int |
getAlignedWidth(int byteWidth)
For buffer objects, attributes need to be aligned to multiples of 4-bytes.
|
static int |
getGLType(GL3AttributeStorage.StorageType type) |
static com.jogamp.opengl.GL3 |
wrap(com.jogamp.opengl.GL3 gl) |
public static com.jogamp.opengl.GL3 wrap(com.jogamp.opengl.GL3 gl)
public static int getAlignedWidth(int byteWidth)
byteWidth - width in bytes of attributepublic static void activateVertexAttribute(com.jogamp.opengl.GL3 gl,
int loc,
GL3AttributeStorage storage,
int stride,
int offset,
int divisor)
gl - active contextloc - attribute locationstorage - attribute storagestride - attribute stride in VBOoffset - attribute offset in VBOpublic static void activateVertexAttribute(com.jogamp.opengl.GL3 gl,
int loc,
GL3AttributeStorage storage,
int stride,
int offset)
gl - active contextloc - attribute locationstorage - attribute storagestride - attribute stride in VBOoffset - attribute offset in VBOpublic static void deactivateVertexAttribute(com.jogamp.opengl.GL3 gl,
int loc)
gl - active contextloc - attribute locationpublic static int getGLType(GL3AttributeStorage.StorageType type)