Class AbstractBuffer
java.lang.Object
cz.fidentis.analyst.glsl.buffers.impl.AbstractBuffer
- All Implemented Interfaces:
GlslBuffer
- Direct Known Subclasses:
FrameBufferImpl
,ImageBufferImpl
,PixelUnpackBufferImpl
,SsboBufferImpl
,TextureBufferImpl
A common code for OpenGL buffers registered in an OpenGL context under a name.
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractBuffer
(BufferDef bufferName, com.jogamp.opengl.GLContext glContext, int glTarget) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns binding index used in code of GLSL shaders.Returns buffer name (enum defined in this API)int
Returns the name (ID) under which is the buffer registered inside the OpenGL context.int
Returns the OpenGL target.com.jogamp.opengl.GLContext
Returns the OpenGL context under which is the buffer registered.void
setGlName
(int glName) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cz.fidentis.analyst.glsl.buffers.GlslBuffer
bind
-
Constructor Details
-
AbstractBuffer
Constructor. The OpenGL name must be set in subclasses!- Parameters:
bufferName
- Buffer nameglContext
- OpenGL contextglTarget
- OpenGL target
-
-
Method Details
-
setGlName
public void setGlName(int glName) -
getBufferName
Description copied from interface:GlslBuffer
Returns buffer name (enum defined in this API)- Specified by:
getBufferName
in interfaceGlslBuffer
- Returns:
- buffer name
-
getBindingIndex
public int getBindingIndex()Description copied from interface:GlslBuffer
Returns binding index used in code of GLSL shaders. Biding index of value -1 means that the biding index is not used/relevant for this buffer.- Specified by:
getBindingIndex
in interfaceGlslBuffer
- Returns:
- binding index.
-
getGlName
public int getGlName()Description copied from interface:GlslBuffer
Returns the name (ID) under which is the buffer registered inside the OpenGL context.- Specified by:
getGlName
in interfaceGlslBuffer
- Returns:
- GLSL name (ID)
-
glContext
public com.jogamp.opengl.GLContext glContext()Description copied from interface:GlslBuffer
Returns the OpenGL context under which is the buffer registered.- Specified by:
glContext
in interfaceGlslBuffer
- Returns:
- OpenGL context
-
getGlTarget
public int getGlTarget()Description copied from interface:GlslBuffer
Returns the OpenGL target.- Specified by:
getGlTarget
in interfaceGlslBuffer
- Returns:
- the OpenGL target
-