Synced math operations with win32
This commit is contained in:
parent
2530b45005
commit
c8139a4ea2
|
@ -64,6 +64,9 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpInvert_00024MatrixOpDire
|
|||
jboolean transposeDest
|
||||
)
|
||||
{
|
||||
static float * temp_matrix = 0;
|
||||
static int temp_matrix_size = 0;
|
||||
|
||||
if (transposeSource == transposeDest)
|
||||
{
|
||||
transposeSource = JNI_FALSE;
|
||||
|
@ -84,7 +87,13 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpInvert_00024MatrixOpDire
|
|||
float * srcMatrix, * destMatrix;
|
||||
|
||||
int temp_side = source.width-1;
|
||||
float temp_matrix [temp_side*temp_side];
|
||||
|
||||
if (temp_matrix_size < temp_side) {
|
||||
if (temp_matrix)
|
||||
delete[] temp_matrix;
|
||||
temp_matrix = new float[temp_side * temp_side];
|
||||
temp_matrix_size = temp_side;
|
||||
}
|
||||
|
||||
for (int i = 0; i < source.elements; i++)
|
||||
{
|
||||
|
|
|
@ -67,6 +67,9 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpInvert_00024MatrixOpSafe
|
|||
)
|
||||
{
|
||||
|
||||
static float * temp_matrix = 0;
|
||||
static int temp_matrix_size = 0;
|
||||
|
||||
if (transposeSource == transposeDest)
|
||||
{
|
||||
transposeSource = JNI_FALSE;
|
||||
|
@ -84,7 +87,13 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpInvert_00024MatrixOpSafe
|
|||
float * srcMatrix, * destMatrix;
|
||||
|
||||
int temp_side = source.width-1;
|
||||
float temp_matrix [temp_side*temp_side];
|
||||
|
||||
if (temp_matrix_size < temp_side) {
|
||||
if (temp_matrix)
|
||||
delete[] temp_matrix;
|
||||
temp_matrix = new float[temp_side * temp_side];
|
||||
temp_matrix_size = temp_side;
|
||||
}
|
||||
|
||||
for (int i = 0; i < source.elements; i++)
|
||||
{
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include "MatrixOpCommon.h"
|
||||
#include <cmath>
|
||||
|
||||
using namespace std;
|
||||
//using namespace std;
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include "MatrixOpCommon.h"
|
||||
#include <cmath>
|
||||
|
||||
using namespace std;
|
||||
//using namespace std;
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe
|
||||
|
|
Loading…
Reference in New Issue