Implement the new GL interface for the LWJGL backend

experimental
shadowislord 10 years ago
parent bd318f5d1b
commit f189b94a4d
  1. 518
      jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGL.java
  2. 100
      jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGLExt.java

@ -0,0 +1,518 @@
package com.jme3.renderer.lwjgl;
import com.jme3.renderer.opengl.GL;
import com.jme3.renderer.opengl.GL2;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import org.lwjgl.opengl.GL13;
import org.lwjgl.opengl.GL15;
import org.lwjgl.opengl.GL20;
import org.lwjgl.opengl.GL30;
public class LwjglGL implements GL, GL2 {
public void glActiveTexture(int param1) {
GL13.glActiveTexture(param1);
}
public void glAlphaFunc(int param1, float param2) {
GL11.glAlphaFunc(param1, param2);
}
public void glAttachShader(int param1, int param2) {
GL20.glAttachShader(param1, param2);
}
public void glBindBuffer(int param1, int param2) {
GL15.glBindBuffer(param1, param2);
}
public void glBindFragDataLocation(int param1, int param2, String param3) {
GL30.glBindFragDataLocation(param1, param2, param3);
}
public void glBindTexture(int param1, int param2) {
GL11.glBindTexture(param1, param2);
}
public void glBindVertexArray(int param1) {
GL30.glBindVertexArray(param1);
}
public void glBlendFunc(int param1, int param2) {
GL11.glBlendFunc(param1, param2);
}
public void glBufferData(int param1, FloatBuffer param2, int param3) {
GL15.glBufferData(param1, param2, param3);
}
public void glBufferData(int param1, DoubleBuffer param2, int param3) {
GL15.glBufferData(param1, param2, param3);
}
public void glBufferData(int param1, ShortBuffer param2, int param3) {
GL15.glBufferData(param1, param2, param3);
}
public void glBufferData(int param1, IntBuffer param2, int param3) {
GL15.glBufferData(param1, param2, param3);
}
public void glBufferData(int param1, long param2, int param3) {
GL15.glBufferData(param1, param2, param3);
}
public void glBufferData(int param1, ByteBuffer param2, int param3) {
GL15.glBufferData(param1, param2, param3);
}
public void glBufferSubData(int param1, long param2, IntBuffer param3) {
GL15.glBufferSubData(param1, param2, param3);
}
public void glBufferSubData(int param1, long param2, FloatBuffer param3) {
GL15.glBufferSubData(param1, param2, param3);
}
public void glBufferSubData(int param1, long param2, ShortBuffer param3) {
GL15.glBufferSubData(param1, param2, param3);
}
public void glBufferSubData(int param1, long param2, DoubleBuffer param3) {
GL15.glBufferSubData(param1, param2, param3);
}
public void glBufferSubData(int param1, long param2, ByteBuffer param3) {
GL15.glBufferSubData(param1, param2, param3);
}
public void glClear(int param1) {
GL11.glClear(param1);
}
public void glClearColor(float param1, float param2, float param3, float param4) {
GL11.glClearColor(param1, param2, param3, param4);
}
public void glColorMask(boolean param1, boolean param2, boolean param3, boolean param4) {
GL11.glColorMask(param1, param2, param3, param4);
}
public void glCompileShader(int param1) {
GL20.glCompileShader(param1);
}
public void glCompressedTexImage2D(int param1, int param2, int param3, int param4, int param5, int param6, ByteBuffer param7) {
GL13.glCompressedTexImage2D(param1, param2, param3, param4, param5, param6, param7);
}
public void glCompressedTexImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, ByteBuffer param8) {
GL13.glCompressedTexImage3D(param1, param2, param3, param4, param5, param6, param7, param8);
}
public void glCompressedTexSubImage2D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, ByteBuffer param8) {
GL13.glCompressedTexSubImage2D(param1, param2, param3, param4, param5, param6, param7, param8);
}
public void glCompressedTexSubImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, ByteBuffer param10) {
GL13.glCompressedTexSubImage3D(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10);
}
public int glCreateProgram() {
return GL20.glCreateProgram();
}
public int glCreateShader(int param1) {
return GL20.glCreateShader(param1);
}
public void glCullFace(int param1) {
GL11.glCullFace(param1);
}
public void glDeleteBuffers(IntBuffer param1) {
GL15.glDeleteBuffers(param1);
}
public void glDeleteProgram(int param1) {
GL20.glDeleteProgram(param1);
}
public void glDeleteShader(int param1) {
GL20.glDeleteShader(param1);
}
public void glDeleteTextures(IntBuffer param1) {
GL11.glDeleteTextures(param1);
}
public void glDepthFunc(int param1) {
GL11.glDepthFunc(param1);
}
public void glDepthMask(boolean param1) {
GL11.glDepthMask(param1);
}
public void glDepthRange(double param1, double param2) {
GL11.glDepthRange(param1, param2);
}
public void glDetachShader(int param1, int param2) {
GL20.glDetachShader(param1, param2);
}
public void glDisable(int param1) {
GL11.glDisable(param1);
}
public void glDisableVertexAttribArray(int param1) {
GL20.glDisableVertexAttribArray(param1);
}
public void glDrawArrays(int param1, int param2, int param3) {
GL11.glDrawArrays(param1, param2, param3);
}
public void glDrawBuffer(int param1) {
GL11.glDrawBuffer(param1);
}
public void glDrawRangeElements(int param1, int param2, int param3, int param4, int param5, long param6) {
GL12.glDrawRangeElements(param1, param2, param3, param4, param5, param6);
}
public void glEnable(int param1) {
GL11.glEnable(param1);
}
public void glEnableVertexAttribArray(int param1) {
GL20.glEnableVertexAttribArray(param1);
}
public void glGenBuffers(IntBuffer param1) {
GL15.glGenBuffers(param1);
}
public void glGenTextures(IntBuffer param1) {
GL11.glGenTextures(param1);
}
public void glGetBoolean(int param1, ByteBuffer param2) {
GL11.glGetBoolean(param1, param2);
}
public int glGetError() {
return GL11.glGetError();
}
public void glGetInteger(int param1, IntBuffer param2) {
GL11.glGetInteger(param1, param2);
}
public void glGetProgram(int param1, int param2, IntBuffer param3) {
GL20.glGetProgram(param1, param2, param3);
}
public void glGetProgramInfoLog(int param1, IntBuffer param2, ByteBuffer param3) {
GL20.glGetProgramInfoLog(param1, param2, param3);
}
public void glGetShader(int param1, int param2, IntBuffer param3) {
GL20.glGetShader(param1, param2, param3);
}
public void glGetShaderInfoLog(int param1, IntBuffer param2, ByteBuffer param3) {
GL20.glGetShaderInfoLog(param1, param2, param3);
}
public String glGetString(int param1) {
return GL11.glGetString(param1);
}
public boolean glIsEnabled(int param1) {
return GL11.glIsEnabled(param1);
}
public void glLineWidth(float param1) {
GL11.glLineWidth(param1);
}
public void glLinkProgram(int param1) {
GL20.glLinkProgram(param1);
}
public void glPixelStorei(int param1, int param2) {
GL11.glPixelStorei(param1, param2);
}
public void glPointSize(float param1) {
GL11.glPointSize(param1);
}
public void glPolygonMode(int param1, int param2) {
GL11.glPolygonMode(param1, param2);
}
public void glPolygonOffset(float param1, float param2) {
GL11.glPolygonOffset(param1, param2);
}
public void glReadBuffer(int param1) {
GL11.glReadBuffer(param1);
}
public void glReadPixels(int param1, int param2, int param3, int param4, int param5, int param6, IntBuffer param7) {
GL11.glReadPixels(param1, param2, param3, param4, param5, param6, param7);
}
public void glReadPixels(int param1, int param2, int param3, int param4, int param5, int param6, FloatBuffer param7) {
GL11.glReadPixels(param1, param2, param3, param4, param5, param6, param7);
}
public void glReadPixels(int param1, int param2, int param3, int param4, int param5, int param6, ShortBuffer param7) {
GL11.glReadPixels(param1, param2, param3, param4, param5, param6, param7);
}
public void glReadPixels(int param1, int param2, int param3, int param4, int param5, int param6, long param7) {
GL11.glReadPixels(param1, param2, param3, param4, param5, param6, param7);
}
public void glReadPixels(int param1, int param2, int param3, int param4, int param5, int param6, DoubleBuffer param7) {
GL11.glReadPixels(param1, param2, param3, param4, param5, param6, param7);
}
public void glReadPixels(int param1, int param2, int param3, int param4, int param5, int param6, ByteBuffer param7) {
GL11.glReadPixels(param1, param2, param3, param4, param5, param6, param7);
}
public void glScissor(int param1, int param2, int param3, int param4) {
GL11.glScissor(param1, param2, param3, param4);
}
public void glStencilFuncSeparate(int param1, int param2, int param3, int param4) {
GL20.glStencilFuncSeparate(param1, param2, param3, param4);
}
public void glStencilOpSeparate(int param1, int param2, int param3, int param4) {
GL20.glStencilOpSeparate(param1, param2, param3, param4);
}
public void glTexImage2D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, IntBuffer param9) {
GL11.glTexImage2D(param1, param2, param3, param4, param5, param6, param7, param8, param9);
}
public void glTexImage2D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, FloatBuffer param9) {
GL11.glTexImage2D(param1, param2, param3, param4, param5, param6, param7, param8, param9);
}
public void glTexImage2D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, ShortBuffer param9) {
GL11.glTexImage2D(param1, param2, param3, param4, param5, param6, param7, param8, param9);
}
public void glTexImage2D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, long param9) {
GL11.glTexImage2D(param1, param2, param3, param4, param5, param6, param7, param8, param9);
}
public void glTexImage2D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, ByteBuffer param9) {
GL11.glTexImage2D(param1, param2, param3, param4, param5, param6, param7, param8, param9);
}
public void glTexImage2D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, DoubleBuffer param9) {
GL11.glTexImage2D(param1, param2, param3, param4, param5, param6, param7, param8, param9);
}
public void glTexImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, FloatBuffer param10) {
GL12.glTexImage3D(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10);
}
public void glTexImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, IntBuffer param10) {
GL12.glTexImage3D(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10);
}
public void glTexImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, long param10) {
GL12.glTexImage3D(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10);
}
public void glTexImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, DoubleBuffer param10) {
GL12.glTexImage3D(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10);
}
public void glTexImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, ByteBuffer param10) {
GL12.glTexImage3D(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10);
}
public void glTexImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, ShortBuffer param10) {
GL12.glTexImage3D(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10);
}
public void glTexParameterf(int param1, int param2, float param3) {
GL11.glTexParameterf(param1, param2, param3);
}
public void glTexParameteri(int param1, int param2, int param3) {
GL11.glTexParameteri(param1, param2, param3);
}
public void glTexSubImage2D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, FloatBuffer param9) {
GL11.glTexSubImage2D(param1, param2, param3, param4, param5, param6, param7, param8, param9);
}
public void glTexSubImage2D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, IntBuffer param9) {
GL11.glTexSubImage2D(param1, param2, param3, param4, param5, param6, param7, param8, param9);
}
public void glTexSubImage2D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, ShortBuffer param9) {
GL11.glTexSubImage2D(param1, param2, param3, param4, param5, param6, param7, param8, param9);
}
public void glTexSubImage2D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, long param9) {
GL11.glTexSubImage2D(param1, param2, param3, param4, param5, param6, param7, param8, param9);
}
public void glTexSubImage2D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, DoubleBuffer param9) {
GL11.glTexSubImage2D(param1, param2, param3, param4, param5, param6, param7, param8, param9);
}
public void glTexSubImage2D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, ByteBuffer param9) {
GL11.glTexSubImage2D(param1, param2, param3, param4, param5, param6, param7, param8, param9);
}
public void glTexSubImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, IntBuffer param11) {
GL12.glTexSubImage3D(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11);
}
public void glTexSubImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, long param11) {
GL12.glTexSubImage3D(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11);
}
public void glTexSubImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, ShortBuffer param11) {
GL12.glTexSubImage3D(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11);
}
public void glTexSubImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, FloatBuffer param11) {
GL12.glTexSubImage3D(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11);
}
public void glTexSubImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, ByteBuffer param11) {
GL12.glTexSubImage3D(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11);
}
public void glTexSubImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, DoubleBuffer param11) {
GL12.glTexSubImage3D(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11);
}
public void glUniform1(int param1, FloatBuffer param2) {
GL20.glUniform1(param1, param2);
}
public void glUniform1(int param1, IntBuffer param2) {
GL20.glUniform1(param1, param2);
}
public void glUniform1f(int param1, float param2) {
GL20.glUniform1f(param1, param2);
}
public void glUniform1i(int param1, int param2) {
GL20.glUniform1i(param1, param2);
}
public void glUniform2(int param1, IntBuffer param2) {
GL20.glUniform2(param1, param2);
}
public void glUniform2(int param1, FloatBuffer param2) {
GL20.glUniform2(param1, param2);
}
public void glUniform2f(int param1, float param2, float param3) {
GL20.glUniform2f(param1, param2, param3);
}
public void glUniform3(int param1, IntBuffer param2) {
GL20.glUniform3(param1, param2);
}
public void glUniform3(int param1, FloatBuffer param2) {
GL20.glUniform3(param1, param2);
}
public void glUniform3f(int param1, float param2, float param3, float param4) {
GL20.glUniform3f(param1, param2, param3, param4);
}
public void glUniform4(int param1, FloatBuffer param2) {
GL20.glUniform4(param1, param2);
}
public void glUniform4(int param1, IntBuffer param2) {
GL20.glUniform4(param1, param2);
}
public void glUniform4f(int param1, float param2, float param3, float param4, float param5) {
GL20.glUniform4f(param1, param2, param3, param4, param5);
}
public void glUniformMatrix3(int param1, boolean param2, FloatBuffer param3) {
GL20.glUniformMatrix3(param1, param2, param3);
}
public void glUniformMatrix4(int param1, boolean param2, FloatBuffer param3) {
GL20.glUniformMatrix4(param1, param2, param3);
}
public void glUseProgram(int param1) {
GL20.glUseProgram(param1);
}
public void glVertexAttribPointer(int param1, int param2, boolean param3, boolean param4, int param5, ShortBuffer param6) {
GL20.glVertexAttribPointer(param1, param2, param3, param4, param5, param6);
}
public void glVertexAttribPointer(int param1, int param2, boolean param3, boolean param4, int param5, IntBuffer param6) {
GL20.glVertexAttribPointer(param1, param2, param3, param4, param5, param6);
}
public void glVertexAttribPointer(int param1, int param2, int param3, boolean param4, int param5, long param6) {
GL20.glVertexAttribPointer(param1, param2, param3, param4, param5, param6);
}
public void glVertexAttribPointer(int param1, int param2, int param3, boolean param4, int param5, ByteBuffer param6) {
GL20.glVertexAttribPointer(param1, param2, param3, param4, param5, param6);
}
public void glVertexAttribPointer(int param1, int param2, boolean param3, boolean param4, int param5, ByteBuffer param6) {
GL20.glVertexAttribPointer(param1, param2, param3, param4, param5, param6);
}
public void glVertexAttribPointer(int param1, int param2, boolean param3, int param4, FloatBuffer param5) {
GL20.glVertexAttribPointer(param1, param2, param3, param4, param5);
}
public void glVertexAttribPointer(int param1, int param2, boolean param3, int param4, DoubleBuffer param5) {
GL20.glVertexAttribPointer(param1, param2, param3, param4, param5);
}
public void glViewport(int param1, int param2, int param3, int param4) {
GL11.glViewport(param1, param2, param3, param4);
}
public int glGetAttribLocation(int param1, String param2) {
return GL20.glGetAttribLocation(param1, param2);
}
public int glGetUniformLocation(int param1, String param2) {
return GL20.glGetUniformLocation(param1, param2);
}
public void glShaderSource(int param1, String[] param2, IntBuffer param3) {
GL20.glShaderSource(param1, param2);
}
}

@ -0,0 +1,100 @@
package com.jme3.renderer.lwjgl;
import com.jme3.renderer.opengl.GLExt;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import org.lwjgl.opengl.ARBDrawInstanced;
import org.lwjgl.opengl.ARBInstancedArrays;
import org.lwjgl.opengl.ARBTextureMultisample;
import org.lwjgl.opengl.EXTFramebufferBlit;
import org.lwjgl.opengl.EXTFramebufferMultisample;
import org.lwjgl.opengl.EXTFramebufferObject;
import org.lwjgl.opengl.GL15;
import org.lwjgl.opengl.GL20;
public class LwjglGLExt implements GLExt {
public void glBlitFramebufferEXT(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter) {
EXTFramebufferBlit.glBlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
}
public void glBufferData(int target, IntBuffer data, int usage) {
GL15.glBufferData(target, data, usage);
}
public void glBufferSubData(int target, long offset, IntBuffer data) {
GL15.glBufferSubData(target, offset, data);
}
public void glDrawArraysInstancedARB(int mode, int first, int count, int primcount) {
ARBDrawInstanced.glDrawArraysInstancedARB(mode, first, count, primcount);
}
public void glDrawBuffers(IntBuffer bufs) {
GL20.glDrawBuffers(bufs);
}
public void glDrawElementsInstancedARB(int mode, int indices_count, int type, long indices_buffer_offset, int primcount) {
ARBDrawInstanced.glDrawElementsInstancedARB(mode, indices_count, type, indices_buffer_offset, primcount);
}
public void glGetMultisample(int pname, int index, FloatBuffer val) {
ARBTextureMultisample.glGetMultisample(pname, index, val);
}
public void glRenderbufferStorageMultisampleEXT(int target, int samples, int internalformat, int width, int height) {
EXTFramebufferMultisample.glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height);
}
public void glTexImage2DMultisample(int target, int samples, int internalformat, int width, int height, boolean fixedsamplelocations) {
ARBTextureMultisample.glTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations);
}
public void glVertexAttribDivisorARB(int index, int divisor) {
ARBInstancedArrays.glVertexAttribDivisorARB(index, divisor);
}
public void glBindFramebufferEXT(int param1, int param2) {
EXTFramebufferObject.glBindFramebufferEXT(param1, param2);
}
public void glBindRenderbufferEXT(int param1, int param2) {
EXTFramebufferObject.glBindRenderbufferEXT(param1, param2);
}
public int glCheckFramebufferStatusEXT(int param1) {
return EXTFramebufferObject.glCheckFramebufferStatusEXT(param1);
}
public void glDeleteFramebuffersEXT(IntBuffer param1) {
EXTFramebufferObject.glDeleteFramebuffersEXT(param1);
}
public void glDeleteRenderbuffersEXT(IntBuffer param1) {
EXTFramebufferObject.glDeleteRenderbuffersEXT(param1);
}
public void glFramebufferRenderbufferEXT(int param1, int param2, int param3, int param4) {
EXTFramebufferObject.glFramebufferRenderbufferEXT(param1, param2, param3, param4);
}
public void glFramebufferTexture2DEXT(int param1, int param2, int param3, int param4, int param5) {
EXTFramebufferObject.glFramebufferTexture2DEXT(param1, param2, param3, param4, param5);
}
public void glGenFramebuffersEXT(IntBuffer param1) {
EXTFramebufferObject.glGenFramebuffersEXT(param1);
}
public void glGenRenderbuffersEXT(IntBuffer param1) {
EXTFramebufferObject.glGenRenderbuffersEXT(param1);
}
public void glGenerateMipmapEXT(int param1) {
EXTFramebufferObject.glGenerateMipmapEXT(param1);
}
public void glRenderbufferStorageEXT(int param1, int param2, int param3, int param4) {
EXTFramebufferObject.glRenderbufferStorageEXT(param1, param2, param3, param4);
}
}
Loading…
Cancel
Save