Fixed ARBFragmentProgram and ARB_vbo

This commit is contained in:
Elias Naur 2003-10-23 07:18:07 +00:00
parent 27b3d4063a
commit b00c24ef76
5 changed files with 8 additions and 9 deletions

View File

@ -41,6 +41,8 @@ package org.lwjgl.opengl.arb;
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_FORMAT_ARB = 0x8876;
public static final int GL_PROGRAM_BINDING_ARB = 0x8677;

View File

@ -202,7 +202,7 @@ public class PbufferTest {
GL.glEnd();
}
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();
// OpenGL window rendering

View File

@ -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)
{
CHECK_EXISTS(glBufferDataARB)
const GLvoid *address = (const GLvoid *)safeGetBufferAddress(env, buffer);
glBufferDataARB((GLenum)target, (GLsizeiptrARB)size, address, (GLenum)usage + buffer_offset);
const GLbyte *address = (const GLbyte *)safeGetBufferAddress(env, buffer);
glBufferDataARB((GLenum)target, (GLsizeiptrARB)size, address + buffer_offset, (GLenum)usage);
CHECK_GL_ERROR
}

View File

@ -48,6 +48,7 @@
#include <math.h>
#include <jni.h>
#include "org_lwjgl_Display.h"
#include "common_tools.h"
static int saved_width;
static int saved_height;

View File

@ -405,12 +405,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Display_setGammaRamp
currentGamma[i + 512] = rampEntry;
}
HDC screenDC = GetDC(NULL);
try {
if (SetDeviceGammaRamp(screenDC, currentGamma) == FALSE) {
throwException(env, "Failed to set device gamma.")
}
} catch (...) {
throwException(env, "Exception occurred in SetDeviceGammaRamp.")
if (SetDeviceGammaRamp(screenDC, currentGamma) == FALSE) {
throwException(env, "Failed to set device gamma.");
}
ReleaseDC(NULL, screenDC);
}