Fixed native matrix code so it compiles. Added EXT_paletted_texture functions to CoreGL - whoops
This commit is contained in:
parent
b3d2deadd8
commit
b8d3484e69
|
@ -26,6 +26,46 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL_accum
|
|||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL_alphaFunc
|
||||
(JNIEnv *, jobject, jint, jfloat);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_opengl_CoreGL
|
||||
* Method: colorTable
|
||||
* Signature: (IIIIII)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL_colorTable
|
||||
(JNIEnv *, jobject, jint, jint, jint, jint, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_opengl_CoreGL
|
||||
* Method: colorSubTable
|
||||
* Signature: (IIIIII)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL_colorSubTable
|
||||
(JNIEnv *, jobject, jint, jint, jint, jint, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_opengl_CoreGL
|
||||
* Method: getColorTable
|
||||
* Signature: (IIII)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL_getColorTable
|
||||
(JNIEnv *, jobject, jint, jint, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_opengl_CoreGL
|
||||
* Method: getColorTableParameteriv
|
||||
* Signature: (III)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL_getColorTableParameteriv
|
||||
(JNIEnv *, jobject, jint, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_opengl_CoreGL
|
||||
* Method: getColorTableParameterfv
|
||||
* Signature: (III)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL_getColorTableParameterfv
|
||||
(JNIEnv *, jobject, jint, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_opengl_CoreGL
|
||||
* Method: clearColor
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
//#include <iostream>
|
||||
#include <jni.h>
|
||||
#include <memory.h>
|
||||
#include "MatrixOpCommon.h"
|
||||
|
||||
bool Matrix::identicalDataSpaces(Matrix & other)
|
||||
|
@ -308,6 +309,11 @@ void subMatrix (const float * src, int side, float * dst , int col_omit, int row
|
|||
|
||||
float determinant (const float * matrix , int side)
|
||||
{
|
||||
|
||||
// We'll keep a scratch bit of memory around for doing temporary calculations:
|
||||
static int current_side_size = 0;
|
||||
static float * temp_matrix = NULL;
|
||||
|
||||
// we are assuming for this case that the data is in column major format
|
||||
|
||||
float det = 0;
|
||||
|
@ -318,7 +324,13 @@ float determinant (const float * matrix , int side)
|
|||
else
|
||||
{
|
||||
int temp_side = side - 1; // the dimensions of the sub matrix
|
||||
float temp_matrix [temp_side * temp_side]; // hold a sub matrix of this matrix
|
||||
if (temp_side > current_side_size) {
|
||||
if (temp_matrix)
|
||||
delete[] temp_matrix;
|
||||
current_side_size = temp_side;
|
||||
temp_matrix = new float[current_side_size * current_side_size];
|
||||
}
|
||||
|
||||
bool sign_pos = 1; // the sign is positive
|
||||
|
||||
for (int row = 0; row < side; row++)
|
||||
|
|
|
@ -3149,3 +3149,79 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL_viewport(JNIEnv * env, jobje
|
|||
CHECK_GL_ERROR
|
||||
}
|
||||
|
||||
void GetColorTableEXT(
|
||||
enum target,
|
||||
enum format,
|
||||
enum type,
|
||||
void *data);
|
||||
|
||||
void GetColorTableParameterivEXT(
|
||||
enum target,
|
||||
enum pname,
|
||||
int *params);
|
||||
|
||||
void GetColorTableParameterfvEXT(
|
||||
enum target,
|
||||
enum pname,
|
||||
float *params);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_opengl_CoreGL
|
||||
* Method: colorTable
|
||||
* Signature: (IIIIII)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL_colorTable
|
||||
(JNIEnv * env, jobject obj, jint target, jint internalFormat, jint width, jint format, jint type, jint data)
|
||||
{
|
||||
glColorTable(target, internalFormat, width, format, type, (const void *) data);
|
||||
CHECK_GL_ERROR
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_opengl_CoreGL
|
||||
* Method: colorSubTable
|
||||
* Signature: (IIIIII)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL_colorSubTable
|
||||
(JNIEnv * env, jobject obj, jint target, jint start, jint count, jint format, jint type, jint data)
|
||||
{
|
||||
glColorSubTable(target, start, count, format, type, (const void *) data);
|
||||
CHECK_GL_ERROR
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_opengl_CoreGL
|
||||
* Method: getColorTable
|
||||
* Signature: (IIII)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL_getColorTable
|
||||
(JNIEnv * env, jobject obj, jint target, jint format, jint type, jint data)
|
||||
{
|
||||
glGetColorTable(target, format, type, (void *) data);
|
||||
CHECK_GL_ERROR
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_opengl_CoreGL
|
||||
* Method: getColorTableParameteriv
|
||||
* Signature: (III)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL_getColorTableParameteriv
|
||||
(JNIEnv * env, jobject obj, jint target, jint pname, jint params)
|
||||
{
|
||||
glGetColorTableParameteriv(target, pname, (int *)params);
|
||||
CHECK_GL_ERROR
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_opengl_CoreGL
|
||||
* Method: getColorTableParameterfv
|
||||
* Signature: (III)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL_getColorTableParameterfv
|
||||
(JNIEnv * env, jobject obj, jint target, jint pname, jint params)
|
||||
{
|
||||
glGetColorTableParameterfv(target, pname, (float *)params);
|
||||
CHECK_GL_ERROR
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue