summaryrefslogtreecommitdiffstats
path: root/src/demos/hdr
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-09-03 22:02:17 +0000
committerKenneth Russel <[email protected]>2005-09-03 22:02:17 +0000
commit9e0f6e9e2dd2c7822032b52a4326b308d67b65e7 (patch)
tree989addaa42622d57500a63c38d8f5bc18948d583 /src/demos/hdr
parent434fb13fc6570086f095646f6ea5739d9c362d7c (diff)
Added Vertex Buffer Object and Pixel Buffer Object variants of
routines affected by these extensions. New variants take long as argument instead of Buffer for void*. For these routines as well as the original versions, must check whether VBO/PBO is active or inactive. Added check to affected methods to guarantee they are not called within glBegin/glEnd pairs (which in most, if not all, cases is already a requirement) to avoid tracking OpenGL state manually. Added new JavaPrologue and JavaEpilogue commands to JavaConfiguration with optional signatures to differentiate overloaded methods. Added BufferObjectKind command to GLConfiguration which builds on JavaPrologue support. Deleted BufferUtils.bufferOffset() and associated native code. In order to reduce the number of extension routines, added IgnoreExtension directives for all extensions folded into OpenGL 1.1, 1.2 and 1.3 specifications; this means that if the core OpenGL version is less than 1.3 then these extensions are effectively unavailable. Updated demos for both new VBO/PBO API variants as well as extensions folded into core. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@120 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/hdr')
-rwxr-xr-xsrc/demos/hdr/HDR.java78
-rwxr-xr-xsrc/demos/hdr/HDRTexture.java42
2 files changed, 60 insertions, 60 deletions
diff --git a/src/demos/hdr/HDR.java b/src/demos/hdr/HDR.java
index e86218c..b7467da 100755
--- a/src/demos/hdr/HDR.java
+++ b/src/demos/hdr/HDR.java
@@ -243,7 +243,7 @@ public class HDR implements GLEventListener {
GL gl = drawable.getGL();
GLU glu = drawable.getGLU();
- checkExtension(gl, "GL_ARB_multitexture");
+ checkExtension(gl, "GL_VERSION_1_3"); // For multitexture
checkExtension(gl, "GL_ARB_pbuffer");
checkExtension(gl, "GL_ARB_vertex_program");
checkExtension(gl, "GL_ARB_fragment_program");
@@ -405,7 +405,7 @@ public class HDR implements GLEventListener {
// display in window
gl.glEnable(GL.GL_TEXTURE_RECTANGLE_NV);
- gl.glActiveTextureARB(GL.GL_TEXTURE0_ARB);
+ gl.glActiveTexture(GL.GL_TEXTURE0);
gl.glBindTexture(GL.GL_TEXTURE_RECTANGLE_NV, tonemap_pbuffer_tex);
if (b['n']) {
gl.glTexParameteri( GL.GL_TEXTURE_RECTANGLE_NV, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
@@ -643,10 +643,10 @@ public class HDR implements GLEventListener {
gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_FILL);
if (b['m']) {
- gl.glEnable(GL.GL_MULTISAMPLE_ARB);
+ gl.glEnable(GL.GL_MULTISAMPLE);
gl.glHint(GL.GL_MULTISAMPLE_FILTER_HINT_NV, GL.GL_NICEST);
} else {
- gl.glDisable(GL.GL_MULTISAMPLE_ARB);
+ gl.glDisable(GL.GL_MULTISAMPLE);
}
if (!b['e']) {
@@ -685,32 +685,32 @@ public class HDR implements GLEventListener {
view.xformPt(eyePos_eye, eyePos_model);
pipeline.setVertexProgramParameter3f(gl, eyePos_param, eyePos_model.x(), eyePos_model.y(), eyePos_model.z());
- gl.glActiveTextureARB(GL.GL_TEXTURE0_ARB);
- gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP_ARB, hdr_tex);
- gl.glEnable(GL.GL_TEXTURE_CUBE_MAP_ARB);
+ gl.glActiveTexture(GL.GL_TEXTURE0);
+ gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP, hdr_tex);
+ gl.glEnable(GL.GL_TEXTURE_CUBE_MAP);
boolean linear = b['l'];
if (linear) {
- gl.glTexParameteri(GL.GL_TEXTURE_CUBE_MAP_ARB, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR_MIPMAP_LINEAR);
- gl.glTexParameteri( GL.GL_TEXTURE_CUBE_MAP_ARB, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
+ gl.glTexParameteri(GL.GL_TEXTURE_CUBE_MAP, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR_MIPMAP_LINEAR);
+ gl.glTexParameteri( GL.GL_TEXTURE_CUBE_MAP, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
} else {
- // glTexParameteri( GL.GL_TEXTURE_CUBE_MAP_ARB, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST_MIPMAP_NEAREST);
- gl.glTexParameteri( GL.GL_TEXTURE_CUBE_MAP_ARB, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);
- gl.glTexParameteri( GL.GL_TEXTURE_CUBE_MAP_ARB, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);
+ // glTexParameteri( GL.GL_TEXTURE_CUBE_MAP, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST_MIPMAP_NEAREST);
+ gl.glTexParameteri( GL.GL_TEXTURE_CUBE_MAP, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);
+ gl.glTexParameteri( GL.GL_TEXTURE_CUBE_MAP, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);
}
if (hilo) {
- gl.glActiveTextureARB(GL.GL_TEXTURE1_ARB);
- gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP_ARB, hdr_tex2);
- gl.glEnable(GL.GL_TEXTURE_CUBE_MAP_ARB);
+ gl.glActiveTexture(GL.GL_TEXTURE1);
+ gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP, hdr_tex2);
+ gl.glEnable(GL.GL_TEXTURE_CUBE_MAP);
if (linear) {
- gl.glTexParameteri( GL.GL_TEXTURE_CUBE_MAP_ARB, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR_MIPMAP_LINEAR);
- gl.glTexParameteri( GL.GL_TEXTURE_CUBE_MAP_ARB, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
+ gl.glTexParameteri( GL.GL_TEXTURE_CUBE_MAP, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR_MIPMAP_LINEAR);
+ gl.glTexParameteri( GL.GL_TEXTURE_CUBE_MAP, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
} else {
- // glTexParameteri( GL.GL_TEXTURE_CUBE_MAP_ARB, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST_MIPMAP_NEAREST);
- gl.glTexParameteri( GL.GL_TEXTURE_CUBE_MAP_ARB, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);
- gl.glTexParameteri( GL.GL_TEXTURE_CUBE_MAP_ARB, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);
+ // glTexParameteri( GL.GL_TEXTURE_CUBE_MAP, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST_MIPMAP_NEAREST);
+ gl.glTexParameteri( GL.GL_TEXTURE_CUBE_MAP, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);
+ gl.glTexParameteri( GL.GL_TEXTURE_CUBE_MAP, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);
}
}
@@ -773,7 +773,7 @@ public class HDR implements GLEventListener {
// horizontal blur
gl.glBindProgramARB(GL.GL_FRAGMENT_PROGRAM_ARB, blurh_fprog);
- gl.glActiveTextureARB(GL.GL_TEXTURE0_ARB);
+ gl.glActiveTexture(GL.GL_TEXTURE0);
pipeline.bindTexture(gl, blur2_pbuffer_tex);
glowPass(gl);
@@ -808,7 +808,7 @@ public class HDR implements GLEventListener {
pipeline.enableFragmentProgram(gl, shrink_fprog);
setOrthoProjection(gl, blur_w, blur_h);
- gl.glActiveTextureARB(GL.GL_TEXTURE0_ARB);
+ gl.glActiveTexture(GL.GL_TEXTURE0);
gl.glBindTexture(GL.GL_TEXTURE_RECTANGLE_NV, pbuffer_tex);
drawQuadRect2(gl, blur_w, blur_h, pbuffer_w, pbuffer_h);
pipeline.disableFragmentProgram(gl);
@@ -817,7 +817,7 @@ public class HDR implements GLEventListener {
// vertical blur
gl.glBindProgramARB(GL.GL_FRAGMENT_PROGRAM_ARB, blurv_fprog);
- gl.glActiveTextureARB(GL.GL_TEXTURE0_ARB);
+ gl.glActiveTexture(GL.GL_TEXTURE0);
pipeline.bindTexture(gl, blur_pbuffer_tex);
glowPass(gl);
@@ -893,10 +893,10 @@ public class HDR implements GLEventListener {
private void drawQuadRect(GL gl, int w, int h) {
gl.glBegin(GL.GL_QUADS);
- gl.glTexCoord2f(0, h); gl.glMultiTexCoord2fARB(GL.GL_TEXTURE1_ARB, 0, h / blur_scale); gl.glVertex3f(0, h, 0);
- gl.glTexCoord2f(w, h); gl.glMultiTexCoord2fARB(GL.GL_TEXTURE1_ARB, w / blur_scale, h / blur_scale); gl.glVertex3f(w, h, 0);
- gl.glTexCoord2f(w, 0); gl.glMultiTexCoord2fARB(GL.GL_TEXTURE1_ARB, w / blur_scale, 0); gl.glVertex3f(w, 0, 0);
- gl.glTexCoord2f(0, 0); gl.glMultiTexCoord2fARB(GL.GL_TEXTURE1_ARB, 0, 0); gl.glVertex3f(0, 0, 0);
+ gl.glTexCoord2f(0, h); gl.glMultiTexCoord2f(GL.GL_TEXTURE1, 0, h / blur_scale); gl.glVertex3f(0, h, 0);
+ gl.glTexCoord2f(w, h); gl.glMultiTexCoord2f(GL.GL_TEXTURE1, w / blur_scale, h / blur_scale); gl.glVertex3f(w, h, 0);
+ gl.glTexCoord2f(w, 0); gl.glMultiTexCoord2f(GL.GL_TEXTURE1, w / blur_scale, 0); gl.glVertex3f(w, 0, 0);
+ gl.glTexCoord2f(0, 0); gl.glMultiTexCoord2f(GL.GL_TEXTURE1, 0, 0); gl.glVertex3f(0, 0, 0);
gl.glEnd();
}
@@ -933,18 +933,18 @@ public class HDR implements GLEventListener {
// draw cubemap background
private void drawSkyBox(GL gl) {
- gl.glActiveTextureARB(GL.GL_TEXTURE0_ARB);
- gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP_ARB, hdr_tex);
- gl.glEnable(GL.GL_TEXTURE_CUBE_MAP_ARB);
+ gl.glActiveTexture(GL.GL_TEXTURE0);
+ gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP, hdr_tex);
+ gl.glEnable(GL.GL_TEXTURE_CUBE_MAP);
if (hilo) {
- gl.glActiveTextureARB(GL.GL_TEXTURE1_ARB);
- gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP_ARB, hdr_tex2);
- gl.glEnable(GL.GL_TEXTURE_CUBE_MAP_ARB);
+ gl.glActiveTexture(GL.GL_TEXTURE1);
+ gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP, hdr_tex2);
+ gl.glEnable(GL.GL_TEXTURE_CUBE_MAP);
}
// initialize object linear texgen
- gl.glActiveTextureARB(GL.GL_TEXTURE0_ARB);
+ gl.glActiveTexture(GL.GL_TEXTURE0);
gl.glMatrixMode(GL.GL_MODELVIEW);
gl.glPushMatrix();
gl.glLoadIdentity();
@@ -974,7 +974,7 @@ public class HDR implements GLEventListener {
glut.glutSolidCube(gl, 1.0f);
gl.glPopMatrix();
- gl.glDisable(GL.GL_TEXTURE_CUBE_MAP_ARB);
+ gl.glDisable(GL.GL_TEXTURE_CUBE_MAP);
gl.glMatrixMode(GL.GL_TEXTURE);
gl.glPopMatrix();
@@ -987,18 +987,18 @@ public class HDR implements GLEventListener {
private void toneMappingPass(GL gl) {
gl.glFinish();
- gl.glActiveTextureARB(GL.GL_TEXTURE0_ARB);
+ gl.glActiveTexture(GL.GL_TEXTURE0);
gl.glBindTexture(GL.GL_TEXTURE_RECTANGLE_NV, pbuffer_tex);
- gl.glActiveTextureARB(GL.GL_TEXTURE1_ARB);
+ gl.glActiveTexture(GL.GL_TEXTURE1);
if (blur2_pbuffer != null) {
gl.glBindTexture(GL.GL_TEXTURE_RECTANGLE_NV, blur2_pbuffer_tex);
}
- gl.glActiveTextureARB(GL.GL_TEXTURE2_ARB);
+ gl.glActiveTexture(GL.GL_TEXTURE2);
gl.glBindTexture(GL.GL_TEXTURE_1D, gamma_tex);
- gl.glActiveTextureARB(GL.GL_TEXTURE3_ARB);
+ gl.glActiveTexture(GL.GL_TEXTURE3);
pipeline.bindTexture(gl, vignette_tex);
pipeline.enableFragmentProgram(gl, tonemap_fprog);
diff --git a/src/demos/hdr/HDRTexture.java b/src/demos/hdr/HDRTexture.java
index 1a39cbf..b2fa935 100755
--- a/src/demos/hdr/HDRTexture.java
+++ b/src/demos/hdr/HDRTexture.java
@@ -157,7 +157,7 @@ public class HDRTexture {
int face_height = m_height / 4;
byte[] face = new byte[face_width * face_height * 4];
- m_target = GL.GL_TEXTURE_CUBE_MAP_ARB;
+ m_target = GL.GL_TEXTURE_CUBE_MAP;
int[] tmp = new int[1];
gl.glGenTextures(1, tmp, 0);
int texid = tmp[0];
@@ -186,7 +186,7 @@ public class HDRTexture {
face[ptr++] = m_data[src++];
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, 0, GL.GL_RGBA, face_width, face_height, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, ByteBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL.GL_RGBA, face_width, face_height, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, ByteBuffer.wrap(face));
// positive X
ptr = 0;
@@ -199,7 +199,7 @@ public class HDRTexture {
face[ptr++] = m_data[src++];
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, 0, GL.GL_RGBA, face_width, face_height, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, ByteBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL.GL_RGBA, face_width, face_height, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, ByteBuffer.wrap(face));
// negative Z
ptr = 0;
@@ -212,7 +212,7 @@ public class HDRTexture {
face[ptr++] = m_data[src++];
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, 0, GL.GL_RGBA, face_width, face_height, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, ByteBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL.GL_RGBA, face_width, face_height, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, ByteBuffer.wrap(face));
// negative X
ptr = 0;
@@ -225,7 +225,7 @@ public class HDRTexture {
face[ptr++] = m_data[src++];
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, 0, GL.GL_RGBA, face_width, face_height, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, ByteBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL.GL_RGBA, face_width, face_height, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, ByteBuffer.wrap(face));
// negative Y
ptr = 0;
@@ -238,7 +238,7 @@ public class HDRTexture {
face[ptr++] = m_data[src++];
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, 0, GL.GL_RGBA, face_width, face_height, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, ByteBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL.GL_RGBA, face_width, face_height, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, ByteBuffer.wrap(face));
// positive Z
ptr = 0;
@@ -251,7 +251,7 @@ public class HDRTexture {
face[ptr++] = m_data[src++];
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, 0, GL.GL_RGBA, face_width, face_height, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, ByteBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL.GL_RGBA, face_width, face_height, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, ByteBuffer.wrap(face));
return texid;
}
@@ -262,7 +262,7 @@ public class HDRTexture {
int face_height = m_height / 4;
float[] face = new float [face_width * face_height * 2];
- m_target = GL.GL_TEXTURE_CUBE_MAP_ARB;
+ m_target = GL.GL_TEXTURE_CUBE_MAP;
int[] tmp = new int[1];
gl.glGenTextures(1, tmp, 0);
int texid = tmp[0];
@@ -292,7 +292,7 @@ public class HDRTexture {
}
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, 0, GL.GL_HILO16_NV, face_width, face_height, 0, GL.GL_HILO_NV, GL.GL_FLOAT, FloatBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL.GL_HILO16_NV, face_width, face_height, 0, GL.GL_HILO_NV, GL.GL_FLOAT, FloatBuffer.wrap(face));
// positive X
ptr = 0;
@@ -308,7 +308,7 @@ public class HDRTexture {
}
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, 0, GL.GL_HILO16_NV, face_width, face_height, 0, GL.GL_HILO_NV, GL.GL_FLOAT, FloatBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL.GL_HILO16_NV, face_width, face_height, 0, GL.GL_HILO_NV, GL.GL_FLOAT, FloatBuffer.wrap(face));
// negative Z
ptr = 0;
@@ -324,7 +324,7 @@ public class HDRTexture {
}
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, 0, GL.GL_HILO16_NV, face_width, face_height, 0, GL.GL_HILO_NV, GL.GL_FLOAT, FloatBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL.GL_HILO16_NV, face_width, face_height, 0, GL.GL_HILO_NV, GL.GL_FLOAT, FloatBuffer.wrap(face));
// negative X
ptr = 0;
@@ -340,7 +340,7 @@ public class HDRTexture {
}
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, 0, GL.GL_HILO16_NV, face_width, face_height, 0, GL.GL_HILO_NV, GL.GL_FLOAT, FloatBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL.GL_HILO16_NV, face_width, face_height, 0, GL.GL_HILO_NV, GL.GL_FLOAT, FloatBuffer.wrap(face));
// negative Y
ptr = 0;
@@ -356,7 +356,7 @@ public class HDRTexture {
}
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, 0, GL.GL_HILO16_NV, face_width, face_height, 0, GL.GL_HILO_NV, GL.GL_FLOAT, FloatBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL.GL_HILO16_NV, face_width, face_height, 0, GL.GL_HILO_NV, GL.GL_FLOAT, FloatBuffer.wrap(face));
// positive Z
ptr = 0;
@@ -372,7 +372,7 @@ public class HDRTexture {
}
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, 0, GL.GL_HILO16_NV, face_width, face_height, 0, GL.GL_HILO_NV, GL.GL_FLOAT, FloatBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL.GL_HILO16_NV, face_width, face_height, 0, GL.GL_HILO_NV, GL.GL_FLOAT, FloatBuffer.wrap(face));
return texid;
}
@@ -383,7 +383,7 @@ public class HDRTexture {
int face_height = m_height / 4;
float[] face = new float [face_width * face_height * 3];
- m_target = GL.GL_TEXTURE_CUBE_MAP_ARB;
+ m_target = GL.GL_TEXTURE_CUBE_MAP;
int[] tmp = new int[1];
gl.glGenTextures(1, tmp, 0);
int texid = tmp[0];
@@ -409,7 +409,7 @@ public class HDRTexture {
face[ptr++] = m_floatdata[src + 2];
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, 0, format, face_width, face_height, 0, GL.GL_RGB, GL.GL_FLOAT, FloatBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, format, face_width, face_height, 0, GL.GL_RGB, GL.GL_FLOAT, FloatBuffer.wrap(face));
// positive X
ptr = 0;
@@ -421,7 +421,7 @@ public class HDRTexture {
face[ptr++] = m_floatdata[src + 2];
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, 0, format, face_width, face_height, 0, GL.GL_RGB, GL.GL_FLOAT, FloatBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, format, face_width, face_height, 0, GL.GL_RGB, GL.GL_FLOAT, FloatBuffer.wrap(face));
// negative Z
ptr = 0;
@@ -433,7 +433,7 @@ public class HDRTexture {
face[ptr++] = m_floatdata[src + 2];
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, 0, format, face_width, face_height, 0, GL.GL_RGB, GL.GL_FLOAT, FloatBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, format, face_width, face_height, 0, GL.GL_RGB, GL.GL_FLOAT, FloatBuffer.wrap(face));
// negative X
ptr = 0;
@@ -445,7 +445,7 @@ public class HDRTexture {
face[ptr++] = m_floatdata[src + 2];
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, 0, format, face_width, face_height, 0, GL.GL_RGB, GL.GL_FLOAT, FloatBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, format, face_width, face_height, 0, GL.GL_RGB, GL.GL_FLOAT, FloatBuffer.wrap(face));
// negative Y
ptr = 0;
@@ -457,7 +457,7 @@ public class HDRTexture {
face[ptr++] = m_floatdata[src + 2];
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, 0, format, face_width, face_height, 0, GL.GL_RGB, GL.GL_FLOAT, FloatBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, format, face_width, face_height, 0, GL.GL_RGB, GL.GL_FLOAT, FloatBuffer.wrap(face));
// positive Z
ptr = 0;
@@ -469,7 +469,7 @@ public class HDRTexture {
face[ptr++] = m_floatdata[src + 2];
}
}
- gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, 0, format, face_width, face_height, 0, GL.GL_RGB, GL.GL_FLOAT, FloatBuffer.wrap(face));
+ gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, format, face_width, face_height, 0, GL.GL_RGB, GL.GL_FLOAT, FloatBuffer.wrap(face));
return texid;
}