public class ImmediateModeOGLRenderer extends java.lang.Object implements SGL
Modifier and Type | Field and Description |
---|---|
protected float |
alphaScale
The global colour scale
|
GL_ALWAYS, GL_BGRA, GL_BLEND, GL_CLAMP, GL_CLIP_PLANE0, GL_CLIP_PLANE1, GL_CLIP_PLANE2, GL_CLIP_PLANE3, GL_COLOR_BUFFER_BIT, GL_COLOR_CLEAR_VALUE, GL_COLOR_SUM_EXT, GL_COMPILE, GL_COMPILE_AND_EXECUTE, GL_DEPTH_BUFFER_BIT, GL_DEPTH_TEST, GL_DST_ALPHA, GL_EQUAL, GL_LINE_SMOOTH, GL_LINE_STRIP, GL_LINE_WIDTH, GL_LINEAR, GL_LINES, GL_MAX_TEXTURE_SIZE, GL_MIRROR_CLAMP_TO_EDGE_EXT, GL_MODELVIEW_MATRIX, GL_MODULATE, GL_NEAREST, GL_NOTEQUAL, GL_ONE, GL_ONE_MINUS_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE_MINUS_SRC_COLOR, GL_POINT_SMOOTH, GL_POINTS, GL_POLYGON_SMOOTH, GL_QUADS, GL_RGB, GL_RGBA, GL_RGBA16, GL_RGBA8, GL_SCISSOR_TEST, GL_SRC_ALPHA, GL_SRC_COLOR, GL_TEXTURE_2D, GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_UNSIGNED_BYTE
Constructor and Description |
---|
ImmediateModeOGLRenderer() |
Modifier and Type | Method and Description |
---|---|
boolean |
canSecondaryColor() |
boolean |
canTextureMirrorClamp()
Check if the mirror clamp extension is available
|
void |
enterOrtho(int xsize,
int ysize)
Enter orthographic mode
|
void |
flush()
Flush the current state of the renderer down to GL
|
float[] |
getCurrentColor()
Get the current colour being rendered
|
void |
glBegin(int geomType)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glBindTexture(int target,
int id)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glBlendFunc(int src,
int dest)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glCallList(int id)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glClear(int value)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glClearColor(float red,
float green,
float blue,
float alpha)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glClearDepth(float value)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glClipPlane(int plane,
java.nio.DoubleBuffer buffer)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glColor4f(float r,
float g,
float b,
float a)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glColorMask(boolean red,
boolean green,
boolean blue,
boolean alpha)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glCopyTexImage2D(int target,
int level,
int internalFormat,
int x,
int y,
int width,
int height,
int border)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glDeleteLists(int list,
int count)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glDeleteTextures(java.nio.IntBuffer buffer)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glDepthFunc(int func)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glDepthMask(boolean mask)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glDisable(int item)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glEnable(int item)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glEnd()
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glEndList()
OpenGL Method - @url http://www.opengl.org/documentation/
|
int |
glGenLists(int count)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glGenTextures(java.nio.IntBuffer ids)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glGetError()
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glGetFloat(int id,
java.nio.FloatBuffer ret)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glGetInteger(int id,
java.nio.IntBuffer ret)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glGetTexImage(int target,
int level,
int format,
int type,
java.nio.ByteBuffer pixels)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glLineWidth(float width)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glLoadIdentity()
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glLoadMatrix(java.nio.FloatBuffer buffer)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glNewList(int id,
int option)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glPointSize(float size)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glPopMatrix()
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glPushMatrix()
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glReadPixels(int x,
int y,
int width,
int height,
int format,
int type,
java.nio.ByteBuffer pixels)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glRotatef(float angle,
float x,
float y,
float z)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glScalef(float x,
float y,
float z)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glScissor(int x,
int y,
int width,
int height)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glSecondaryColor3ubEXT(byte b,
byte c,
byte d) |
void |
glTexCoord2f(float u,
float v)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glTexEnvi(int target,
int mode,
int value)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glTexImage2D(int target,
int i,
int dstPixelFormat,
int width,
int height,
int j,
int srcPixelFormat,
int glUnsignedByte,
java.nio.ByteBuffer textureBuffer)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glTexParameteri(int target,
int param,
int value)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glTexSubImage2D(int glTexture2d,
int i,
int pageX,
int pageY,
int width,
int height,
int glBgra,
int glUnsignedByte,
java.nio.ByteBuffer scratchByteBuffer)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glTranslatef(float x,
float y,
float z)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glVertex2f(float x,
float y)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
glVertex3f(float x,
float y,
float z)
OpenGL Method - @url http://www.opengl.org/documentation/
|
void |
initDisplay(int width,
int height)
Initialise the display
|
void |
setGlobalAlphaScale(float alphaScale)
Set the scaling we'll apply to any colour binds in this renderer
|
public void initDisplay(int width, int height)
SGL
initDisplay
in interface SGL
width
- The width of the displayheight
- The height of the displaypublic void enterOrtho(int xsize, int ysize)
SGL
enterOrtho
in interface SGL
xsize
- The size of the ortho displayysize
- The size of the ortho displaypublic void glBegin(int geomType)
SGL
public void glBindTexture(int target, int id)
SGL
glBindTexture
in interface SGL
public void glBlendFunc(int src, int dest)
SGL
glBlendFunc
in interface SGL
public void glCallList(int id)
SGL
glCallList
in interface SGL
public void glClear(int value)
SGL
public void glClearColor(float red, float green, float blue, float alpha)
SGL
glClearColor
in interface SGL
public void glClipPlane(int plane, java.nio.DoubleBuffer buffer)
SGL
glClipPlane
in interface SGL
public void glColor4f(float r, float g, float b, float a)
SGL
public void glColorMask(boolean red, boolean green, boolean blue, boolean alpha)
SGL
glColorMask
in interface SGL
public void glCopyTexImage2D(int target, int level, int internalFormat, int x, int y, int width, int height, int border)
SGL
glCopyTexImage2D
in interface SGL
public void glDeleteTextures(java.nio.IntBuffer buffer)
SGL
glDeleteTextures
in interface SGL
public void glDisable(int item)
SGL
public void glEnable(int item)
SGL
public void glEnd()
SGL
public void glEndList()
SGL
public int glGenLists(int count)
SGL
glGenLists
in interface SGL
public void glGetFloat(int id, java.nio.FloatBuffer ret)
SGL
glGetFloat
in interface SGL
public void glGetInteger(int id, java.nio.IntBuffer ret)
SGL
glGetInteger
in interface SGL
public void glGetTexImage(int target, int level, int format, int type, java.nio.ByteBuffer pixels)
SGL
glGetTexImage
in interface SGL
public void glLineWidth(float width)
SGL
glLineWidth
in interface SGL
public void glLoadIdentity()
SGL
glLoadIdentity
in interface SGL
public void glNewList(int id, int option)
SGL
public void glPointSize(float size)
SGL
glPointSize
in interface SGL
public void glPopMatrix()
SGL
glPopMatrix
in interface SGL
public void glPushMatrix()
SGL
glPushMatrix
in interface SGL
public void glReadPixels(int x, int y, int width, int height, int format, int type, java.nio.ByteBuffer pixels)
SGL
glReadPixels
in interface SGL
public void glRotatef(float angle, float x, float y, float z)
SGL
public void glScalef(float x, float y, float z)
SGL
public void glScissor(int x, int y, int width, int height)
SGL
public void glTexCoord2f(float u, float v)
SGL
glTexCoord2f
in interface SGL
public void glTexEnvi(int target, int mode, int value)
SGL
public void glTranslatef(float x, float y, float z)
SGL
glTranslatef
in interface SGL
public void glVertex2f(float x, float y)
SGL
glVertex2f
in interface SGL
public void glVertex3f(float x, float y, float z)
SGL
glVertex3f
in interface SGL
public void flush()
SGL
public void glTexParameteri(int target, int param, int value)
SGL
glTexParameteri
in interface SGL
public float[] getCurrentColor()
SGL
getCurrentColor
in interface SGL
public void glDeleteLists(int list, int count)
SGL
glDeleteLists
in interface SGL
public void glClearDepth(float value)
SGL
glClearDepth
in interface SGL
public void glDepthFunc(int func)
SGL
glDepthFunc
in interface SGL
public void glDepthMask(boolean mask)
SGL
glDepthMask
in interface SGL
public void setGlobalAlphaScale(float alphaScale)
SGL
setGlobalAlphaScale
in interface SGL
alphaScale
- The scale to apply to any colour bindspublic void glLoadMatrix(java.nio.FloatBuffer buffer)
SGL
glLoadMatrix
in interface SGL
public void glGenTextures(java.nio.IntBuffer ids)
SGL
glGenTextures
in interface SGL
public void glGetError()
SGL
glGetError
in interface SGL
public void glTexImage2D(int target, int i, int dstPixelFormat, int width, int height, int j, int srcPixelFormat, int glUnsignedByte, java.nio.ByteBuffer textureBuffer)
SGL
glTexImage2D
in interface SGL
public void glTexSubImage2D(int glTexture2d, int i, int pageX, int pageY, int width, int height, int glBgra, int glUnsignedByte, java.nio.ByteBuffer scratchByteBuffer)
SGL
glTexSubImage2D
in interface SGL
public boolean canTextureMirrorClamp()
SGL
canTextureMirrorClamp
in interface SGL
public boolean canSecondaryColor()
canSecondaryColor
in interface SGL
public void glSecondaryColor3ubEXT(byte b, byte c, byte d)
glSecondaryColor3ubEXT
in interface SGL