diff options
author | Carsten Weisse <[email protected]> | 2005-07-10 17:51:01 +0000 |
---|---|---|
committer | Carsten Weisse <[email protected]> | 2005-07-10 17:51:01 +0000 |
commit | 07ba508bbbdc36aaa0fa635ad4f90849fa2eafdf (patch) | |
tree | 618d236a1d1186e93186ab70cccd5bf196ce585a /src/jake2/render | |
parent | fa5e9b4d118e973fb635836af961aa2742888ca7 (diff) |
sub set of OpenGL and the impls (jogl, lwjgl)
Diffstat (limited to 'src/jake2/render')
-rw-r--r-- | src/jake2/render/DummyGL.java | 282 | ||||
-rw-r--r-- | src/jake2/render/JoglGL.java | 278 | ||||
-rw-r--r-- | src/jake2/render/LwjglGL.java | 282 | ||||
-rw-r--r-- | src/jake2/render/QGL.java | 459 |
4 files changed, 1301 insertions, 0 deletions
diff --git a/src/jake2/render/DummyGL.java b/src/jake2/render/DummyGL.java new file mode 100644 index 0000000..4529c65 --- /dev/null +++ b/src/jake2/render/DummyGL.java @@ -0,0 +1,282 @@ +package jake2.render; + +import jake2.render.lwjgl.LWJGLBase; + +import java.nio.*; + +public class DummyGL extends LWJGLBase { + + protected void glAlphaFunc(int func, float ref) { + // do nothing + } + + protected void glBegin(int mode) { + // do nothing + } + + protected void glBindTexture(int target, int texture) { + // do nothing + } + + protected void glBlendFunc(int sfactor, int dfactor) { + // do nothing + } + + protected void glClear(int mask) { + // do nothing + } + + protected void glClearColor(float red, float green, float blue, float alpha) { + // do nothing + } + + protected void glColor3f(float red, float green, float blue) { + // do nothing + } + + protected void glColor3ub(byte red, byte green, byte blue) { + // do nothing + } + + protected void glColor4f(float red, float green, float blue, float alpha) { + // do nothing + } + + protected void glColor4ub(byte red, byte green, byte blue, byte alpha) { + // do nothing + } + + protected void glColorPointer(int size, boolean unsigned, int stride, + ByteBuffer pointer) { + // do nothing + } + + protected void glColorPointer(int size, int stride, FloatBuffer pointer) { + // do nothing + } + + protected void glCullFace(int mode) { + // do nothing + } + + protected void glDeleteTextures(IntBuffer textures) { + // do nothing + } + + protected void glDepthFunc(int func) { + // do nothing + } + + protected void glDepthMask(boolean flag) { + // do nothing + } + + protected void glDepthRange(double zNear, double zFar) { + // do nothing + } + + protected void glDisable(int cap) { + // do nothing + } + + protected void glDisableClientState(int cap) { + // do nothing + } + + protected void glDrawArrays(int mode, int first, int count) { + // do nothing + } + + protected void glDrawBuffer(int mode) { + // do nothing + } + + protected void glDrawElements(int mode, IntBuffer indices) { + // do nothing + } + + protected void glEnable(int cap) { + // do nothing + } + + protected void glEnableClientState(int cap) { + // do nothing + } + + protected void glEnd() { + // do nothing + } + + protected void glFinish() { + // do nothing + } + + protected void glFlush() { + // do nothing + } + + protected void glFrustum(double left, double right, double bottom, + double top, double zNear, double zFar) { + // do nothing + } + + protected int glGetError() { + return GL_NO_ERROR; + } + + protected void glGetFloat(int pname, FloatBuffer params) { + // do nothing + } + + protected String glGetString(int name) { + switch (name) { + case GL_EXTENSIONS: + return "GL_ARB_multitexture"; + default: + return ""; + } + } + + protected void glInterleavedArrays(int format, int stride, + FloatBuffer pointer) { + // do nothing + } + + protected void glLoadIdentity() { + // do nothing + } + + protected void glLoadMatrix(FloatBuffer m) { + // do nothing + } + + protected void glMatrixMode(int mode) { + // do nothing + } + + protected void glOrtho(double left, double right, double bottom, + double top, double zNear, double zFar) { + // do nothing + } + + protected void glPixelStorei(int pname, int param) { + // do nothing + } + + protected void glPointSize(float size) { + // do nothing + } + + protected void glPolygonMode(int face, int mode) { + // do nothing + } + + protected void glPopMatrix() { + // do nothing + } + + protected void glPushMatrix() { + // do nothing + } + + protected void glReadPixels(int x, int y, int width, int height, + int format, int type, ByteBuffer pixels) { + // do nothing + } + + protected void glRotatef(float angle, float x, float y, float z) { + // do nothing + } + + protected void glScalef(float x, float y, float z) { + // do nothing + } + + protected void glScissor(int x, int y, int width, int height) { + // do nothing + } + + protected void glShadeModel(int mode) { + // do nothing + } + + protected void glTexCoord2f(float s, float t) { + // do nothing + } + + protected void glTexCoordPointer(int size, int stride, FloatBuffer pointer) { + // do nothing + } + + protected void glTexEnvi(int target, int pname, int param) { + // do nothing + } + + protected void glTexImage2D(int target, int level, int internalformat, + int width, int height, int border, int format, int type, + ByteBuffer pixels) { + // do nothing + } + + protected void glTexImage2D(int target, int level, int internalformat, + int width, int height, int border, int format, int type, + IntBuffer pixels) { + // do nothing + } + + protected void glTexParameterf(int target, int pname, float param) { + // do nothing + } + + protected void glTexParameteri(int target, int pname, int param) { + // do nothing + } + + protected void glTexSubImage2D(int target, int level, int xoffset, + int yoffset, int width, int height, int format, int type, + IntBuffer pixels) { + // do nothing + } + + protected void glTranslatef(float x, float y, float z) { + // do nothing + } + + protected void glVertex2f(float x, float y) { + // do nothing + } + + protected void glVertex3f(float x, float y, float z) { + // do nothing + } + + protected void glVertexPointer(int size, int stride, FloatBuffer pointer) { + // do nothing + } + + protected void glViewport(int x, int y, int width, int height) { + // do nothing + } + + protected void glColorTable(int target, int internalFormat, int width, + int format, int type, ByteBuffer data) { + // do nothing + } + + protected void glActiveTextureARB(int texture) { + // do nothing + } + + protected void glClientActiveTextureARB(int texture) { + // do nothing + } + + protected void glPointParameterEXT(int pname, FloatBuffer pfParams) { + // do nothing + } + + protected void glPointParameterfEXT(int pname, float param) { + // do nothing + } + +} diff --git a/src/jake2/render/JoglGL.java b/src/jake2/render/JoglGL.java new file mode 100644 index 0000000..7f0746b --- /dev/null +++ b/src/jake2/render/JoglGL.java @@ -0,0 +1,278 @@ +package jake2.render; + +import java.nio.*; + +public class JoglGL extends JoglBase { + + protected void glAlphaFunc(int func, float ref) { + gl.glAlphaFunc(func, ref); + } + + protected void glBegin(int mode) { + gl.glBegin(mode); + } + + protected void glBindTexture(int target, int texture) { + gl.glBindTexture(target, texture); + } + + protected void glBlendFunc(int sfactor, int dfactor) { + gl.glBlendFunc(sfactor, dfactor); + } + + protected void glClear(int mask) { + gl.glClear(mask); + } + + protected void glClearColor(float red, float green, float blue, float alpha) { + gl.glClearColor(red, green, blue, alpha); + } + + protected void glColor3f(float red, float green, float blue) { + gl.glColor3f(red, green, blue); + } + + protected void glColor3ub(byte red, byte green, byte blue) { + gl.glColor3ub(red, green, blue); + } + + protected void glColor4f(float red, float green, float blue, float alpha) { + gl.glColor4f(red, green, blue, alpha); + } + + protected void glColor4ub(byte red, byte green, byte blue, byte alpha) { + gl.glColor4ub(red, green, blue, alpha); + } + + protected void glColorPointer(int size, boolean unsigned, int stride, + ByteBuffer pointer) { + gl.glColorPointer(size, GL_UNSIGNED_BYTE, stride, pointer); + } + + protected void glColorPointer(int size, int stride, FloatBuffer pointer) { + gl.glColorPointer(size, GL_FLOAT, stride, pointer); + } + + protected void glCullFace(int mode) { + gl.glCullFace(mode); + } + + protected void glDeleteTextures(IntBuffer textures) { + gl.glDeleteTextures(textures.limit(), textures); + } + + protected void glDepthFunc(int func) { + gl.glDepthFunc(func); + } + + protected void glDepthMask(boolean flag) { + gl.glDepthMask(flag); + } + + protected void glDepthRange(double zNear, double zFar) { + gl.glDepthRange(zNear, zFar); + } + + protected void glDisable(int cap) { + gl.glDisable(cap); + } + + protected void glDisableClientState(int cap) { + gl.glDisableClientState(cap); + } + + protected void glDrawArrays(int mode, int first, int count) { + gl.glDrawArrays(mode, first, count); + } + + protected void glDrawBuffer(int mode) { + gl.glDrawBuffer(mode); + } + + protected void glDrawElements(int mode, IntBuffer indices) { + gl.glDrawElements(mode, indices.limit(), GL_UNSIGNED_INT, indices); + } + + protected void glEnable(int cap) { + gl.glEnable(cap); + } + + protected void glEnableClientState(int cap) { + gl.glEnableClientState(cap); + } + + protected void glEnd() { + gl.glEnd(); + } + + protected void glFinish() { + gl.glFinish(); + } + + protected void glFlush() { + gl.glFlush(); + } + + protected void glFrustum(double left, double right, double bottom, + double top, double zNear, double zFar) { + gl.glFrustum(left, right, bottom, top, zNear, zFar); + } + + protected int glGetError() { + return gl.glGetError(); + } + + protected void glGetFloat(int pname, FloatBuffer params) { + gl.glGetFloatv(pname, params); + } + + protected String glGetString(int name) { + return gl.glGetString(name); + } + + protected void glInterleavedArrays(int format, int stride, + FloatBuffer pointer) { + gl.glInterleavedArrays(format, stride, pointer); + } + + protected void glLoadIdentity() { + gl.glLoadIdentity(); + } + + protected void glLoadMatrix(FloatBuffer m) { + gl.glLoadMatrixf(m); + } + + protected void glMatrixMode(int mode) { + gl.glMatrixMode(mode); + } + + protected void glOrtho(double left, double right, double bottom, + double top, double zNear, double zFar) { + gl.glOrtho(left, right, bottom, top, zNear, zFar); + } + + protected void glPixelStorei(int pname, int param) { + gl.glPixelStorei(pname, param); + } + + protected void glPointSize(float size) { + gl.glPointSize(size); + } + + protected void glPolygonMode(int face, int mode) { + gl.glPolygonMode(face, mode); + } + + protected void glPopMatrix() { + gl.glPopMatrix(); + } + + protected void glPushMatrix() { + gl.glPushMatrix(); + } + + protected void glReadPixels(int x, int y, int width, int height, + int format, int type, ByteBuffer pixels) { + gl.glReadPixels(x, y, width, height, format, type, pixels); + } + + protected void glRotatef(float angle, float x, float y, float z) { + gl.glRotatef(angle, x, y, z); + } + + protected void glScalef(float x, float y, float z) { + gl.glScalef(x, y, z); + } + + protected void glScissor(int x, int y, int width, int height) { + gl.glScissor(x, y, width, height); + } + + protected void glShadeModel(int mode) { + gl.glShadeModel(mode); + } + + protected void glTexCoord2f(float s, float t) { + gl.glTexCoord2f(s, t); + } + + protected void glTexCoordPointer(int size, int stride, FloatBuffer pointer) { + gl.glTexCoordPointer(size, GL_FLOAT, stride, pointer); + } + + protected void glTexEnvi(int target, int pname, int param) { + gl.glTexEnvi(target, pname, param); + } + + protected void glTexImage2D(int target, int level, int internalformat, + int width, int height, int border, int format, int type, + ByteBuffer pixels) { + gl.glTexImage2D(target, level, internalformat, width, height, border, + format, type, pixels); + } + + protected void glTexImage2D(int target, int level, int internalformat, + int width, int height, int border, int format, int type, + IntBuffer pixels) { + gl.glTexImage2D(target, level, internalformat, width, height, border, + format, type, pixels); + } + + protected void glTexParameterf(int target, int pname, float param) { + gl.glTexParameterf(target, pname, param); + } + + protected void glTexParameteri(int target, int pname, int param) { + gl.glTexParameteri(target, pname, param); + } + + protected void glTexSubImage2D(int target, int level, int xoffset, + int yoffset, int width, int height, int format, int type, + IntBuffer pixels) { + gl.glTexSubImage2D(target, level, xoffset, yoffset, width, height, + format, type, pixels); + } + + protected void glTranslatef(float x, float y, float z) { + gl.glTranslatef(x, y, z); + } + + protected void glVertex2f(float x, float y) { + gl.glVertex2f(x, y); + } + + protected void glVertex3f(float x, float y, float z) { + gl.glVertex3f(x, y, z); + } + + protected void glVertexPointer(int size, int stride, FloatBuffer pointer) { + gl.glVertexPointer(size, GL_FLOAT, stride, pointer); + } + + protected void glViewport(int x, int y, int width, int height) { + gl.glViewport(x, y, width, height); + } + + protected void glColorTable(int target, int internalFormat, int width, + int format, int type, ByteBuffer data) { + gl.glColorTable(target, internalFormat, width, format, type, data); + } + + protected void glActiveTextureARB(int texture) { + gl.glActiveTextureARB(texture); + } + + protected void glClientActiveTextureARB(int texture) { + gl.glClientActiveTextureARB(texture); + } + + protected void glPointParameterEXT(int pname, FloatBuffer pfParams) { + gl.glPointParameterfvEXT(pname, pfParams); + } + + protected void glPointParameterfEXT(int pname, float param) { + gl.glPointParameterfEXT(pname, param); + } + +} diff --git a/src/jake2/render/LwjglGL.java b/src/jake2/render/LwjglGL.java new file mode 100644 index 0000000..1fb500d --- /dev/null +++ b/src/jake2/render/LwjglGL.java @@ -0,0 +1,282 @@ +package jake2.render; + +import jake2.render.lwjgl.LWJGLBase; + +import java.nio.*; + +import org.lwjgl.util.GL; + +public class LwjglGL extends LWJGLBase { + + public final void glAlphaFunc(int func, float ref) { + GL.glAlphaFunc(func, ref); + } + + public final void glBegin(int mode) { + GL.glBegin(mode); + } + + public final void glBindTexture(int target, int texture) { + GL.glBindTexture(target, texture); + } + + public final void glBlendFunc(int sfactor, int dfactor) { + GL.glBlendFunc(sfactor, dfactor); + } + + public final void glClear(int mask) { + GL.glClear(mask); + } + + public final void glClearColor(float red, float green, float blue, float alpha) { + GL.glClearColor(red, green, blue, alpha); + } + + public final void glColor3f(float red, float green, float blue) { + GL.glColor3f(red, green, blue); + } + + public final void glColor3ub(byte red, byte green, byte blue) { + GL.glColor3ub(red, green, blue); + } + + public final void glColor4f(float red, float green, float blue, float alpha) { + GL.glColor4f(red, green, blue, alpha); + } + + public final void glColor4ub(byte red, byte green, byte blue, byte alpha) { + GL.glColor4ub(red, green, blue, alpha); + } + + public final void glColorPointer(int size, boolean unsigned, int stride, + ByteBuffer pointer) { + GL.glColorPointer(size, unsigned, stride, pointer); + } + + public final void glColorPointer(int size, int stride, FloatBuffer pointer) { + GL.glColorPointer(size, stride, pointer); + } + + public final void glCullFace(int mode) { + GL.glCullFace(mode); + } + + public final void glDeleteTextures(IntBuffer textures) { + GL.glDeleteTextures(textures); + } + + public final void glDepthFunc(int func) { + GL.glDepthFunc(func); + } + + public final void glDepthMask(boolean flag) { + GL.glDepthMask(flag); + } + + public final void glDepthRange(double zNear, double zFar) { + GL.glDepthRange(zNear, zFar); + } + + public final void glDisable(int cap) { + GL.glDisable(cap); + } + + public final void glDisableClientState(int cap) { + GL.glDisableClientState(cap); + } + + public final void glDrawArrays(int mode, int first, int count) { + GL.glDrawArrays(mode, first, count); + } + + public final void glDrawBuffer(int mode) { + GL.glDrawBuffer(mode); + } + + public final void glDrawElements(int mode, IntBuffer indices) { + GL.glDrawElements(mode, indices); + } + + public final void glEnable(int cap) { + GL.glEnable(cap); + } + + public final void glEnableClientState(int cap) { + GL.glEnableClientState(cap); + } + + public final void glEnd() { + GL.glEnd(); + } + + public final void glFinish() { + GL.glFinish(); + } + + public final void glFlush() { + GL.glFlush(); + } + + public final void glFrustum(double left, double right, double bottom, + double top, double zNear, double zFar) { + GL.glFrustum(left, right, bottom, top, zNear, zFar); + } + + public final int glGetError() { + return GL.glGetError(); + } + + public final void glGetFloat(int pname, FloatBuffer params) { + GL.glGetFloat(pname, params); + } + + public final String glGetString(int name) { + return GL.glGetString(name); + } + + public final void glInterleavedArrays(int format, int stride, + FloatBuffer pointer) { + GL.glInterleavedArrays(format, stride, pointer); + } + + public final void glLoadIdentity() { + GL.glLoadIdentity(); + } + + public final void glLoadMatrix(FloatBuffer m) { + GL.glLoadMatrix(m); + } + + public final void glMatrixMode(int mode) { + GL.glMatrixMode(mode); + } + + public final void glOrtho(double left, double right, double bottom, + double top, double zNear, double zFar) { + GL.glOrtho(left, right, bottom, top, zNear, zFar); + } + + public final void glPixelStorei(int pname, int param) { + GL.glPixelStorei(pname, param); + } + + public final void glPointSize(float size) { + GL.glPointSize(size); + } + + public final void glPolygonMode(int face, int mode) { + GL.glPolygonMode(face, mode); + } + + public final void glPopMatrix() { + GL.glPopMatrix(); + } + + public final void glPushMatrix() { + GL.glPushMatrix(); + } + + public final void glReadPixels(int x, int y, int width, int height, + int format, int type, ByteBuffer pixels) { + GL.glReadPixels(x, y, width, height, format, type, pixels); + } + + public final void glRotatef(float angle, float x, float y, float z) { + GL.glRotatef(angle, x, y, z); + } + + public final void glScalef(float x, float y, float z) { + GL.glScalef(x, y, z); + } + + public final void glScissor(int x, int y, int width, int height) { + GL.glScissor(x, y, width, height); + } + + public final void glShadeModel(int mode) { + GL.glShadeModel(mode); + } + + public final void glTexCoord2f(float s, float t) { + GL.glTexCoord2f(s, t); + } + + public final void glTexCoordPointer(int size, int stride, FloatBuffer pointer) { + GL.glTexCoordPointer(size, stride, pointer); + } + + public final void glTexEnvi(int target, int pname, int param) { + GL.glTexEnvi(target, pname, param); + } + + public final void glTexImage2D(int target, int level, int internalformat, + int width, int height, int border, int format, int type, + ByteBuffer pixels) { + GL.glTexImage2D(target, level, internalformat, width, height, border, + format, type, pixels); + } + + public final void glTexImage2D(int target, int level, int internalformat, + int width, int height, int border, int format, int type, + IntBuffer pixels) { + GL.glTexImage2D(target, level, internalformat, width, height, border, + format, type, pixels); + } + + public final void glTexParameterf(int target, int pname, float param) { + GL.glTexParameterf(target, pname, param); + } + + public final void glTexParameteri(int target, int pname, int param) { + GL.glTexParameteri(target, pname, param); + } + + public final void glTexSubImage2D(int target, int level, int xoffset, + int yoffset, int width, int height, int format, int type, + IntBuffer pixels) { + GL.glTexSubImage2D(target, level, xoffset, yoffset, width, height, + format, type, pixels); + } + + public final void glTranslatef(float x, float y, float z) { + GL.glTranslatef(x, y, z); + } + + public final void glVertex2f(float x, float y) { + GL.glVertex2f(x, y); + } + + public final void glVertex3f(float x, float y, float z) { + GL.glVertex3f(x, y, z); + } + + public final void glVertexPointer(int size, int stride, FloatBuffer pointer) { + GL.glVertexPointer(size, stride, pointer); + } + + public final void glViewport(int x, int y, int width, int height) { + GL.glViewport(x, y, width, height); + } + + public final void glColorTable(int target, int internalFormat, int width, + int format, int type, ByteBuffer data) { + GL.glColorTable(target, internalFormat, width, format, type, data); + } + + public final void glActiveTextureARB(int texture) { + GL.glActiveTextureARB(texture); + } + + public final void glClientActiveTextureARB(int texture) { + GL.glClientActiveTextureARB(texture); + } + + public final void glPointParameterEXT(int pname, FloatBuffer pfParams) { + GL.glPointParameterEXT(pname, pfParams); + } + + public final void glPointParameterfEXT(int pname, float param) { + GL.glPointParameterfEXT(pname, param); + } + +} diff --git a/src/jake2/render/QGL.java b/src/jake2/render/QGL.java new file mode 100644 index 0000000..1185756 --- /dev/null +++ b/src/jake2/render/QGL.java @@ -0,0 +1,459 @@ +package jake2.render; + +import java.nio.*; + +public abstract class QGL { + + /* + * alpha functions + */ + public static final int GL_NEVER = 0x0200; + + public static final int GL_LESS = 0x0201; + + public static final int GL_EQUAL = 0x0202; + + public static final int GL_LEQUAL = 0x0203; + + public static final int GL_GREATER = 0x0204; + + public static final int GL_NOTEQUAL = 0x0205; + + public static final int GL_GEQUAL = 0x0206; + + public static final int GL_ALWAYS = 0x0207; + + /* + * attribute masks + */ + public static final int GL_DEPTH_BUFFER_BIT = 0x00000100; + + public static final int GL_STENCIL_BUFFER_BIT = 0x00000400; + + public static final int GL_COLOR_BUFFER_BIT = 0x00004000; + + /* + * begin modes + */ + public static final int GL_POINTS = 0x0000; + + public static final int GL_LINES = 0x0001; + + public static final int GL_LINE_LOOP = 0x0002; + + public static final int GL_LINE_STRIP = 0x0003; + + public static final int GL_TRIANGLES = 0x0004; + + public static final int GL_TRIANGLE_STRIP = 0x0005; + + public static final int GL_TRIANGLE_FAN = 0x0006; + + public static final int GL_QUADS = 0x0007; + + public static final int GL_QUAD_STRIP = 0x0008; + + public static final int GL_POLYGON = 0x0009; + + /* + * blending factors + */ + public static final int GL_ZERO = 0; + + public static final int GL_ONE = 1; + + public static final int GL_SRC_COLOR = 0x0300; + + public static final int GL_ONE_MINUS_SRC_COLOR = 0x0301; + + public static final int GL_SRC_ALPHA = 0x0302; + + public static final int GL_ONE_MINUS_SRC_ALPHA = 0x0303; + + public static final int GL_DST_ALPHA = 0x0304; + + public static final int GL_ONE_MINUS_DST_ALPHA = 0x0305; + + /* + * boolean + */ + public static final int GL_TRUE = 1; + + public static final int GL_FALSE = 0; + + /* + * data types + */ + public static final int GL_BYTE = 0x1400; + + public static final int GL_UNSIGNED_BYTE = 0x1401; + + public static final int GL_SHORT = 0x1402; + + public static final int GL_UNSIGNED_SHORT = 0x1403; + + public static final int GL_INT = 0x1404; + + public static final int GL_UNSIGNED_INT = 0x1405; + + public static final int GL_FLOAT = 0x1406; + + /* + * draw buffer modes + */ + public static final int GL_FRONT = 0x0404; + + public static final int GL_BACK = 0x0405; + + public static final int GL_FRONT_AND_BACK = 0x0408; + + /* + * errors + */ + public static final int GL_NO_ERROR = 0; + + public static final int GL_POINT_SMOOTH = 0x0B10; + + public static final int GL_CULL_FACE = 0x0B44; + + public static final int GL_DEPTH_TEST = 0x0B71; + + public static final int GL_MODELVIEW_MATRIX = 0x0BA6; + + public static final int GL_ALPHA_TEST = 0x0BC0; + + public static final int GL_BLEND = 0x0BE2; + + public static final int GL_SCISSOR_TEST = 0x0C11; + + public static final int GL_PACK_ALIGNMENT = 0x0D05; + + public static final int GL_TEXTURE_2D = 0x0DE1; + + /* + * hint modes + */ + public static final int GL_DONT_CARE = 0x1100; + + public static final int GL_FASTEST = 0x1101; + + public static final int GL_NICEST = 0x1102; + + /* + * matrix modes + */ + public static final int GL_MODELVIEW = 0x1700; + + public static final int GL_PROJECTION = 0x1701; + + /* + * pixel formats + */ + public static final int GL_COLOR_INDEX = 0x1900; + + public static final int GL_RED = 0x1903; + + public static final int GL_GREEN = 0x1904; + + public static final int GL_BLUE = 0x1905; + + public static final int GL_ALPHA = 0x1906; + + public static final int GL_RGB = 0x1907; + + public static final int GL_RGBA = 0x1908; + + public static final int GL_LUMINANCE = 0x1909; + + public static final int GL_LUMINANCE_ALPHA = 0x190A; + + /* + * polygon modes + */ + + public static final int GL_POINT = 0x1B00; + + public static final int GL_LINE = 0x1B01; + + public static final int GL_FILL = 0x1B02; + + /* + * shading models + */ + public static final int GL_FLAT = 0x1D00; + + public static final int GL_SMOOTH = 0x1D01; + + public static final int GL_REPLACE = 0x1E01; + + /* + * string names + */ + public static final int GL_VENDOR = 0x1F00; + + public static final int GL_RENDERER = 0x1F01; + + public static final int GL_VERSION = 0x1F02; + + public static final int GL_EXTENSIONS = 0x1F03; + + /* + * TextureEnvMode + */ + public static final int GL_MODULATE = 0x2100; + + /* + * TextureEnvParameter + */ + public static final int GL_TEXTURE_ENV_MODE = 0x2200; + + public static final int GL_TEXTURE_ENV_COLOR = 0x2201; + + /* + * TextureEnvTarget + */ + public static final int GL_TEXTURE_ENV = 0x2300; + + public static final int GL_NEAREST = 0x2600; + + public static final int GL_LINEAR = 0x2601; + + public static final int GL_NEAREST_MIPMAP_NEAREST = 0x2700; + + public static final int GL_LINEAR_MIPMAP_NEAREST = 0x2701; + + public static final int GL_NEAREST_MIPMAP_LINEAR = 0x2702; + + public static final int GL_LINEAR_MIPMAP_LINEAR = 0x2703; + + /* + * TextureParameterName + */ + public static final int GL_TEXTURE_MAG_FILTER = 0x2800; + + public static final int GL_TEXTURE_MIN_FILTER = 0x2801; + + public static final int GL_TEXTURE_WRAP_S = 0x2802; + + public static final int GL_TEXTURE_WRAP_T = 0x2803; + + /* + * TextureWrapMode + */ + public static final int GL_CLAMP = 0x2900; + + public static final int GL_REPEAT = 0x2901; + + /* + * texture + */ + public static final int GL_LUMINANCE8 = 0x8040; + + public static final int GL_INTENSITY8 = 0x804B; + + public static final int GL_R3_G3_B2 = 0x2A10; + + public static final int GL_RGB4 = 0x804F; + + public static final int GL_RGB5 = 0x8050; + + public static final int GL_RGB8 = 0x8051; + + public static final int GL_RGBA2 = 0x8055; + + public static final int GL_RGBA4 = 0x8056; + + public static final int GL_RGB5_A1 = 0x8057; + + public static final int GL_RGBA8 = 0x8058; + + /* + * vertex arrays + */ + public static final int GL_VERTEX_ARRAY = 0x8074; + + public static final int GL_COLOR_ARRAY = 0x8076; + + public static final int GL_TEXTURE_COORD_ARRAY = 0x8078; + + public static final int GL_T2F_V3F = 0x2A27; + + /* + * OpenGL 1.2, 1.3 constants + */ + public static final int GL_SHARED_TEXTURE_PALETTE_EXT = 0x81FB; + + public static final int GL_TEXTURE0 = 0x84C0; + + public static final int GL_TEXTURE1 = 0x84C1; + + public static final int GL_TEXTURE0_ARB = 0x84C0; + + public static final int GL_TEXTURE1_ARB = 0x84C1; + + public static final int GL_BGR = 0x80E0; + + public static final int GL_BGRA = 0x80E1; + + /* + * point parameters + */ + public static final int GL_POINT_SIZE_MIN_EXT = 0x8126; + + public static final int GL_POINT_SIZE_MAX_EXT = 0x8127; + + public static final int GL_POINT_FADE_THRESHOLD_SIZE_EXT = 0x8128; + + public static final int GL_DISTANCE_ATTENUATION_EXT = 0x8129; + + /* + * a sub set of OpenGL for Jake2 + */ + + protected abstract void glAlphaFunc(int func, float ref); + + protected abstract void glBegin(int mode); + + protected abstract void glBindTexture(int target, int texture); + + protected abstract void glBlendFunc(int sfactor, int dfactor); + + protected abstract void glClear(int mask); + + protected abstract void glClearColor(float red, float green, float blue, + float alpha); + + protected abstract void glColor3f(float red, float green, float blue); + + protected abstract void glColor3ub(byte red, byte green, byte blue); + + protected abstract void glColor4f(float red, float green, float blue, + float alpha); + + protected abstract void glColor4ub(byte red, byte green, byte blue, + byte alpha); + + protected abstract void glColorPointer(int size, boolean unsigned, + int stride, ByteBuffer pointer); + + protected abstract void glColorPointer(int size, int stride, + FloatBuffer pointer); + + protected abstract void glCullFace(int mode); + + protected abstract void glDeleteTextures(IntBuffer textures); + + protected abstract void glDepthFunc(int func); + + protected abstract void glDepthMask(boolean flag); + + protected abstract void glDepthRange(double zNear, double zFar); + + protected abstract void glDisable(int cap); + + protected abstract void glDisableClientState(int cap); + + protected abstract void glDrawArrays(int mode, int first, int count); + + protected abstract void glDrawBuffer(int mode); + + protected abstract void glDrawElements(int mode, IntBuffer indices); + + protected abstract void glEnable(int cap); + + protected abstract void glEnableClientState(int cap); + + protected abstract void glEnd(); + + protected abstract void glFinish(); + + protected abstract void glFlush(); + + protected abstract void glFrustum(double left, double right, double bottom, + double top, double zNear, double zFar); + + protected abstract int glGetError(); + + protected abstract void glGetFloat(int pname, FloatBuffer params); + + protected abstract String glGetString(int name); + + protected abstract void glInterleavedArrays(int format, int stride, + FloatBuffer pointer); + + protected abstract void glLoadIdentity(); + + protected abstract void glLoadMatrix(FloatBuffer m); + + protected abstract void glMatrixMode(int mode); + + protected abstract void glOrtho(double left, double right, double bottom, + double top, double zNear, double zFar); + + protected abstract void glPixelStorei(int pname, int param); + + protected abstract void glPointSize(float size); + + protected abstract void glPolygonMode(int face, int mode); + + protected abstract void glPopMatrix(); + + protected abstract void glPushMatrix(); + + protected abstract void glReadPixels(int x, int y, int width, int height, + int format, int type, ByteBuffer pixels); + + protected abstract void glRotatef(float angle, float x, float y, float z); + + protected abstract void glScalef(float x, float y, float z); + + protected abstract void glScissor(int x, int y, int width, int height); + + protected abstract void glShadeModel(int mode); + + protected abstract void glTexCoord2f(float s, float t); + + protected abstract void glTexCoordPointer(int size, int stride, + FloatBuffer pointer); + + protected abstract void glTexEnvi(int target, int pname, int param); + + protected abstract void glTexImage2D(int target, int level, + int internalformat, int width, int height, int border, int format, + int type, ByteBuffer pixels); + + protected abstract void glTexImage2D(int target, int level, + int internalformat, int width, int height, int border, int format, + int type, IntBuffer pixels); + + protected abstract void glTexParameterf(int target, int pname, float param); + + protected abstract void glTexParameteri(int target, int pname, int param); + + protected abstract void glTexSubImage2D(int target, int level, int xoffset, + int yoffset, int width, int height, int format, int type, + IntBuffer pixels); + + protected abstract void glTranslatef(float x, float y, float z); + + protected abstract void glVertex2f(float x, float y); + + protected abstract void glVertex3f(float x, float y, float z); + + protected abstract void glVertexPointer(int size, int stride, + FloatBuffer pointer); + + protected abstract void glViewport(int x, int y, int width, int height); + + protected abstract void glColorTable(int target, int internalFormat, + int width, int format, int type, ByteBuffer data); + + protected abstract void glActiveTextureARB(int texture); + + protected abstract void glClientActiveTextureARB(int texture); + + protected abstract void glPointParameterEXT(int pname, FloatBuffer pfParams); + + protected abstract void glPointParameterfEXT(int pname, float param); + +}
\ No newline at end of file |