Fixed ARBFragmentProgram and ARB_vbo
This commit is contained in:
parent
27b3d4063a
commit
b00c24ef76
|
@ -41,6 +41,8 @@ package org.lwjgl.opengl.arb;
|
||||||
|
|
||||||
public interface ARBFragmentProgram
|
public interface ARBFragmentProgram
|
||||||
{
|
{
|
||||||
|
public static final int GL_FRAGMENT_PROGRAM_ARB = 0x8804;
|
||||||
|
public static final int GL_PROGRAM_FORMAT_ASCII_ARB = 0x8875;
|
||||||
public static final int GL_PROGRAM_LENGTH_ARB = 0x8627;
|
public static final int GL_PROGRAM_LENGTH_ARB = 0x8627;
|
||||||
public static final int GL_PROGRAM_FORMAT_ARB = 0x8876;
|
public static final int GL_PROGRAM_FORMAT_ARB = 0x8876;
|
||||||
public static final int GL_PROGRAM_BINDING_ARB = 0x8677;
|
public static final int GL_PROGRAM_BINDING_ARB = 0x8677;
|
||||||
|
|
|
@ -202,7 +202,7 @@ public class PbufferTest {
|
||||||
GL.glEnd();
|
GL.glEnd();
|
||||||
}
|
}
|
||||||
GL.glPopMatrix();
|
GL.glPopMatrix();
|
||||||
GL.glCopyTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGB, 0, 0, 512, 512, 0);
|
GL.glCopyTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_COMPRESSED_RGB, 0, 0, 512, 512, 0);
|
||||||
Pbuffer.releaseContext();
|
Pbuffer.releaseContext();
|
||||||
|
|
||||||
// OpenGL window rendering
|
// OpenGL window rendering
|
||||||
|
|
|
@ -3653,8 +3653,8 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL_glIsBufferARB(JNIEnv *env, j
|
||||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL_nglBufferDataARB(JNIEnv *env, jclass clazz, jint target, jint size, jobject buffer, jint usage, jint buffer_offset)
|
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL_nglBufferDataARB(JNIEnv *env, jclass clazz, jint target, jint size, jobject buffer, jint usage, jint buffer_offset)
|
||||||
{
|
{
|
||||||
CHECK_EXISTS(glBufferDataARB)
|
CHECK_EXISTS(glBufferDataARB)
|
||||||
const GLvoid *address = (const GLvoid *)safeGetBufferAddress(env, buffer);
|
const GLbyte *address = (const GLbyte *)safeGetBufferAddress(env, buffer);
|
||||||
glBufferDataARB((GLenum)target, (GLsizeiptrARB)size, address, (GLenum)usage + buffer_offset);
|
glBufferDataARB((GLenum)target, (GLsizeiptrARB)size, address + buffer_offset, (GLenum)usage);
|
||||||
CHECK_GL_ERROR
|
CHECK_GL_ERROR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
#include "org_lwjgl_Display.h"
|
#include "org_lwjgl_Display.h"
|
||||||
|
#include "common_tools.h"
|
||||||
|
|
||||||
static int saved_width;
|
static int saved_width;
|
||||||
static int saved_height;
|
static int saved_height;
|
||||||
|
|
|
@ -405,12 +405,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Display_setGammaRamp
|
||||||
currentGamma[i + 512] = rampEntry;
|
currentGamma[i + 512] = rampEntry;
|
||||||
}
|
}
|
||||||
HDC screenDC = GetDC(NULL);
|
HDC screenDC = GetDC(NULL);
|
||||||
try {
|
if (SetDeviceGammaRamp(screenDC, currentGamma) == FALSE) {
|
||||||
if (SetDeviceGammaRamp(screenDC, currentGamma) == FALSE) {
|
throwException(env, "Failed to set device gamma.");
|
||||||
throwException(env, "Failed to set device gamma.")
|
|
||||||
}
|
|
||||||
} catch (...) {
|
|
||||||
throwException(env, "Exception occurred in SetDeviceGammaRamp.")
|
|
||||||
}
|
}
|
||||||
ReleaseDC(NULL, screenDC);
|
ReleaseDC(NULL, screenDC);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue