From 6f3722d9323d7c6d38e8235f92c280307a633ae3 Mon Sep 17 00:00:00 2001 From: Caspian Rychlik-Prince Date: Sat, 24 Aug 2002 21:19:06 +0000 Subject: [PATCH] Checkpoint --- src/java/org/lwjgl/opengl/GL.java | 26 ++++- src/native/common/org_lwjgl_input_GamePad.h | 91 +++++++++++++++ src/native/common/org_lwjgl_input_Joystick.h | 90 +++++++++++++++ src/native/common/org_lwjgl_input_Mouse.h | 38 ++++++ src/native/win32/LWJGL.cpp | 1 - src/native/win32/org_lwjgl_Display.cpp | 38 +++++- src/native/win32/org_lwjgl_Math.cpp | 108 ------------------ ..._lwjgl_Math_MatrixOpAdd_MatrixOpDirect.cpp | 75 ++++++++++++ ...rg_lwjgl_Math_MatrixOpAdd_MatrixOpSafe.cpp | 75 ++++++++++++ ...lwjgl_Math_MatrixOpCopy_MatrixOpDirect.cpp | 68 +++++++++++ ...g_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.cpp | 66 +++++++++++ ...jgl_Math_MatrixOpInvert_MatrixOpDirect.cpp | 66 +++++++++++ ...lwjgl_Math_MatrixOpInvert_MatrixOpSafe.cpp | 66 +++++++++++ ...l_Math_MatrixOpMultiply_MatrixOpDirect.cpp | 75 ++++++++++++ ...jgl_Math_MatrixOpMultiply_MatrixOpSafe.cpp | 75 ++++++++++++ ...jgl_Math_MatrixOpNegate_MatrixOpDirect.cpp | 66 +++++++++++ ...lwjgl_Math_MatrixOpNegate_MatrixOpSafe.cpp | 66 +++++++++++ ..._Math_MatrixOpNormalise_MatrixOpDirect.cpp | 66 +++++++++++ ...gl_Math_MatrixOpNormalise_MatrixOpSafe.cpp | 66 +++++++++++ ...l_Math_MatrixOpSubtract_MatrixOpDirect.cpp | 75 ++++++++++++ ...jgl_Math_MatrixOpSubtract_MatrixOpSafe.cpp | 75 ++++++++++++ 21 files changed, 1259 insertions(+), 113 deletions(-) create mode 100644 src/native/common/org_lwjgl_input_GamePad.h create mode 100644 src/native/common/org_lwjgl_input_Joystick.h create mode 100644 src/native/win32/org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect.cpp create mode 100644 src/native/win32/org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe.cpp create mode 100644 src/native/win32/org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect.cpp create mode 100644 src/native/win32/org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.cpp create mode 100644 src/native/win32/org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp create mode 100644 src/native/win32/org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.cpp create mode 100644 src/native/win32/org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect.cpp create mode 100644 src/native/win32/org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe.cpp create mode 100644 src/native/win32/org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect.cpp create mode 100644 src/native/win32/org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe.cpp create mode 100644 src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.cpp create mode 100644 src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.cpp create mode 100644 src/native/win32/org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect.cpp create mode 100644 src/native/win32/org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.cpp diff --git a/src/java/org/lwjgl/opengl/GL.java b/src/java/org/lwjgl/opengl/GL.java index 41c8c447..568287ab 100644 --- a/src/java/org/lwjgl/opengl/GL.java +++ b/src/java/org/lwjgl/opengl/GL.java @@ -1520,6 +1520,10 @@ public class GL extends CoreGL implements GLConstants { public boolean SGIS_generate_mipmap; public boolean SGIX_shadow; public boolean SGIX_depth_texture; + public boolean OpenGL11; + public boolean OpenGL12; + public boolean OpenGL13; + public boolean OpenGL14; /** * Constructor for GL. @@ -1559,6 +1563,22 @@ public class GL extends CoreGL implements GLConstants { } + // Let's see what openGL version we are too: + String version = getString(VERSION); + int i = version.indexOf("1."); + if (i > -1) { + char c = version.charAt(i + 2); + if (c == '2') { + OpenGL12 = true; + } else if (c == '3') { + OpenGL12 = true; + OpenGL13 = true; + } else if (c == '4') { + OpenGL12 = true; + OpenGL13 = true; + OpenGL14 = true; + } + } } /* @@ -1570,6 +1590,7 @@ public class GL extends CoreGL implements GLConstants { public static boolean WGL_ARB_pixel_format; public static boolean WGL_ARB_render_texture; public static boolean WGL_EXT_extensions_string; + public static boolean WGL_EXT_swap_control; /** * Checks and sets WGL_EXT_extensions_string and WGL_ARB_extensions_string @@ -1601,11 +1622,14 @@ public class GL extends CoreGL implements GLConstants { exts = wglGetExtensionsStringARB(Display.getHandle()); // Remember - this is an HWND not an HDC, which is what's required else exts = wglGetExtensionsStringEXT(); - + + System.out.println("Available WGL extensions:"); StringTokenizer st = new StringTokenizer(exts); while (st.hasMoreTokens()) { String ext = st.nextToken(); + System.out.println(ext); + Field f = (Field) map.get(ext); if (f != null) { try { diff --git a/src/native/common/org_lwjgl_input_GamePad.h b/src/native/common/org_lwjgl_input_GamePad.h new file mode 100644 index 00000000..9200271b --- /dev/null +++ b/src/native/common/org_lwjgl_input_GamePad.h @@ -0,0 +1,91 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_input_GamePad */ + +#ifndef _Included_org_lwjgl_input_GamePad +#define _Included_org_lwjgl_input_GamePad +#ifdef __cplusplus +extern "C" { +#endif +/* Inaccessible static: _00024assertionsDisabled */ +/* Inaccessible static: PAD_UP */ +/* Inaccessible static: PAD_DOWN */ +/* Inaccessible static: PAD_LEFT */ +/* Inaccessible static: PAD_RIGHT */ +/* Inaccessible static: PAD_BUTTON0 */ +/* Inaccessible static: PAD_BUTTON1 */ +/* Inaccessible static: PAD_BUTTON2 */ +/* Inaccessible static: PAD_BUTTON3 */ +/* Inaccessible static: PAD_BUTTON4 */ +/* Inaccessible static: PAD_BUTTON5 */ +/* Inaccessible static: PAD_BUTTON6 */ +/* Inaccessible static: PAD_BUTTON7 */ +/* Inaccessible static: PAD_BUTTON8 */ +/* Inaccessible static: created */ +/* Inaccessible static: buttonDownBuffer */ +/* Inaccessible static: buttonDownAddress */ +/* Inaccessible static: readBuffer */ +/* Inaccessible static: readBufferAddress */ +/* Inaccessible static: button */ +/* Inaccessible static: state */ +/* Inaccessible static: class_000240 */ +/* + * Class: org_lwjgl_input_GamePad + * Method: initIDs + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_input_GamePad_initIDs + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_input_GamePad + * Method: nCreate + * Signature: ()Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_input_GamePad_nCreate + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_input_GamePad + * Method: nDestroy + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_input_GamePad_nDestroy + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_input_GamePad + * Method: nPoll + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_input_GamePad_nPoll + (JNIEnv *, jclass, jint); + +/* + * Class: org_lwjgl_input_GamePad + * Method: nRead + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_input_GamePad_nRead + (JNIEnv *, jclass, jint); + +/* + * Class: org_lwjgl_input_GamePad + * Method: nEnableBuffer + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_input_GamePad_nEnableBuffer + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_input_GamePad + * Method: nGetNumButtons + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_input_GamePad_nGetNumButtons + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/native/common/org_lwjgl_input_Joystick.h b/src/native/common/org_lwjgl_input_Joystick.h new file mode 100644 index 00000000..53a5e110 --- /dev/null +++ b/src/native/common/org_lwjgl_input_Joystick.h @@ -0,0 +1,90 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_input_Joystick */ + +#ifndef _Included_org_lwjgl_input_Joystick +#define _Included_org_lwjgl_input_Joystick +#ifdef __cplusplus +extern "C" { +#endif +/* Inaccessible static: _00024assertionsDisabled */ +/* Inaccessible static: created */ +/* Inaccessible static: button */ +/* Inaccessible static: x */ +/* Inaccessible static: y */ +/* Inaccessible static: z */ +/* Inaccessible static: readBuffer */ +/* Inaccessible static: readBufferAddress */ +#undef org_lwjgl_input_Joystick_JOYSTICK_EVENT_SIZE +#define org_lwjgl_input_Joystick_JOYSTICK_EVENT_SIZE 20L +#undef org_lwjgl_input_Joystick_JOYSTICK_EVENT_STRIDE +#define org_lwjgl_input_Joystick_JOYSTICK_EVENT_STRIDE 32L +/* Inaccessible static: class_000240 */ +/* + * Class: org_lwjgl_input_Joystick + * Method: initIDs + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_input_Joystick_initIDs + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_input_Joystick + * Method: nCreate + * Signature: ()Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_input_Joystick_nCreate + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_input_Joystick + * Method: nDestroy + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_input_Joystick_nDestroy + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_input_Joystick + * Method: nPoll + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_input_Joystick_nPoll + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_input_Joystick + * Method: nGetNumButtons + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_input_Joystick_nGetNumButtons + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_input_Joystick + * Method: nHasZValue + * Signature: ()Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_input_Joystick_nHasZValue + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_input_Joystick + * Method: nRead + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_input_Joystick_nRead + (JNIEnv *, jclass, jint); + +/* + * Class: org_lwjgl_input_Joystick + * Method: nEnableBuffer + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_input_Joystick_nEnableBuffer + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/native/common/org_lwjgl_input_Mouse.h b/src/native/common/org_lwjgl_input_Mouse.h index 690b89cf..7d006a6e 100644 --- a/src/native/common/org_lwjgl_input_Mouse.h +++ b/src/native/common/org_lwjgl_input_Mouse.h @@ -13,6 +13,12 @@ extern "C" { /* Inaccessible static: dx */ /* Inaccessible static: dy */ /* Inaccessible static: dz */ +/* Inaccessible static: readBuffer */ +/* Inaccessible static: readBufferAddress */ +#undef org_lwjgl_input_Mouse_MOUSE_EVENT_SIZE +#define org_lwjgl_input_Mouse_MOUSE_EVENT_SIZE 20L +#undef org_lwjgl_input_Mouse_MOUSE_EVENT_STRIDE +#define org_lwjgl_input_Mouse_MOUSE_EVENT_STRIDE 32L /* Inaccessible static: class_000240 */ /* * Class: org_lwjgl_input_Mouse @@ -46,6 +52,38 @@ JNIEXPORT void JNICALL Java_org_lwjgl_input_Mouse_nDestroy JNIEXPORT void JNICALL Java_org_lwjgl_input_Mouse_nPoll (JNIEnv *, jclass); +/* + * Class: org_lwjgl_input_Mouse + * Method: nGetNumButtons + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_input_Mouse_nGetNumButtons + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_input_Mouse + * Method: nHasZValue + * Signature: ()Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_input_Mouse_nHasZValue + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_input_Mouse + * Method: nEnableBuffer + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_input_Mouse_nEnableBuffer + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_input_Mouse + * Method: nRead + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_input_Mouse_nRead + (JNIEnv *, jclass, jint); + #ifdef __cplusplus } #endif diff --git a/src/native/win32/LWJGL.cpp b/src/native/win32/LWJGL.cpp index 858abcb1..6a4c8451 100644 --- a/src/native/win32/LWJGL.cpp +++ b/src/native/win32/LWJGL.cpp @@ -42,7 +42,6 @@ #define WIN32_LEAN_AND_MEAN #include #include -#include "LWJGL.h" /* * DLL entry point for Windows. Called when Java loads the .dll diff --git a/src/native/win32/org_lwjgl_Display.cpp b/src/native/win32/org_lwjgl_Display.cpp index 79b63a5f..9e6c7739 100644 --- a/src/native/win32/org_lwjgl_Display.cpp +++ b/src/native/win32/org_lwjgl_Display.cpp @@ -129,7 +129,39 @@ int SetDisplayMode(int width, int height, int bpp, int freq) JNIEXPORT jobjectArray JNICALL Java_org_lwjgl_Display_getAvailableDisplayModes (JNIEnv * env, jclass clazz) { - return NULL; + + DEVMODE mode; + + // First count the number of display modes. + int i = 0, n = 0; + while (EnumDisplaySettings(NULL, i ++, &mode) != 0) { + // Filter out indexed modes + if (mode.dmBitsPerPel < 16) { + continue; + } else + n ++; + } + ; // Do nothing + + // Allocate an array of DisplayModes big enough + jclass displayModeClass = env->FindClass("org/lwjgl/DisplayMode"); + jobjectArray ret = env->NewObjectArray(n, displayModeClass, NULL); + jmethodID displayModeConstructor = env->GetMethodID(displayModeClass, "", "(IIII)V"); + + i = n = 0; + while (EnumDisplaySettings(NULL, i ++, &mode) != 0) { + // Filter out indexed modes + if (mode.dmBitsPerPel < 16) { + continue; + } else { + jobject displayMode = env->NewObject(displayModeClass, displayModeConstructor, mode.dmPelsWidth, mode.dmPelsHeight, + mode.dmBitsPerPel, mode.dmDisplayFrequency); + + env->SetObjectArrayElement(ret, n ++, displayMode); + } + } + + return ret; } /* @@ -138,13 +170,13 @@ JNIEXPORT jobjectArray JNICALL Java_org_lwjgl_Display_getAvailableDisplayModes * Signature: (IIIIZ)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_nCreate - (JNIEnv * env, jclass clazz, jint width, jint height, jint bpp, jint freq, jboolean debug) + (JNIEnv * env, jclass clazz, jint width, jint height, jint bpp, jint freq, jboolean fullscreen) { #ifdef _DEBUG printf("Creating display: size %dx%d %dhz %dbpp...\n", width, height, freq, bpp); #endif - if (!debug && SetDisplayMode(width, height, bpp, freq) != 1) + if (fullscreen && SetDisplayMode(width, height, bpp, freq) != 1) return JNI_FALSE; /* diff --git a/src/native/win32/org_lwjgl_Math.cpp b/src/native/win32/org_lwjgl_Math.cpp index b5fb20b6..99867dd8 100644 --- a/src/native/win32/org_lwjgl_Math.cpp +++ b/src/native/win32/org_lwjgl_Math.cpp @@ -43,111 +43,3 @@ #include "org_lwjgl_Math.h" #include "math.h" -/* - * Class: org_lwjgl_Math - * Method: random - * Signature: ()F - */ -JNIEXPORT jfloat JNICALL Java_org_lwjgl_Math_random - (JNIEnv * env, jclass clazz) -{ - return 0.0f; -} - -/* - * Class: org_lwjgl_Math - * Method: sin - * Signature: (F)F - */ -JNIEXPORT jfloat JNICALL Java_org_lwjgl_Math_sin - (JNIEnv * env, jclass clazz, jfloat theta) -{ - return 0.0f; -} - -/* - * Class: org_lwjgl_Math - * Method: cos - * Signature: (F)F - */ -JNIEXPORT jfloat JNICALL Java_org_lwjgl_Math_cos - (JNIEnv * env, jclass clazz, jfloat theta) -{ - return 0.0f; -} - -/* - * Class: org_lwjgl_Math - * Method: tan - * Signature: (F)F - */ -JNIEXPORT jfloat JNICALL Java_org_lwjgl_Math_tan - (JNIEnv * env, jclass clazz, jfloat theta) -{ - return 0.0f; -} - -/* - * Class: org_lwjgl_Math - * Method: asin - * Signature: (F)F - */ -JNIEXPORT jfloat JNICALL Java_org_lwjgl_Math_asin - (JNIEnv * env, jclass clazz, jfloat theta) -{ - return 0.0f; -} - -/* - * Class: org_lwjgl_Math - * Method: acos - * Signature: (F)F - */ -JNIEXPORT jfloat JNICALL Java_org_lwjgl_Math_acos - (JNIEnv * env, jclass clazz, jfloat theta) -{ - return 0.0f; -} - -/* - * Class: org_lwjgl_Math - * Method: atan - * Signature: (F)F - */ -JNIEXPORT jfloat JNICALL Java_org_lwjgl_Math_atan - (JNIEnv * env, jclass clazz, jfloat theta) -{ - return 0.0f; -} - -/* - * Class: org_lwjgl_Math - * Method: sqrt - * Signature: (F)F - */ -JNIEXPORT jfloat JNICALL Java_org_lwjgl_Math_sqrt - (JNIEnv * env, jclass clazz, jfloat value) -{ - return 0.0f; -} - -/* - * Class: org_lwjgl_Math - * Method: matrixOp - * Signature: (IIIIIIZIIZ)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_Math_matrixOp__IIIIIIZIIZ - (JNIEnv * env, jclass clazz, jint, jint, jint, jint, jint, jint, jboolean, jint, jint, jboolean) -{ -} - -/* - * Class: org_lwjgl_Math - * Method: matrixOp - * Signature: (IIIIIZIIIIZIIZ)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_Math_matrixOp__IIIIIZIIIIZIIZ - (JNIEnv * env, jclass clazz, jint, jint, jint, jint, jint, jboolean, jint, jint, jint, jint, jboolean, jint, jint, jboolean) -{ -} - diff --git a/src/native/win32/org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect.cpp b/src/native/win32/org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect.cpp new file mode 100644 index 00000000..96036b50 --- /dev/null +++ b/src/native/win32/org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect.cpp @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2002 Light Weight Java Game Library Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Win32 math library. + * + * @author cix_foo + * @version $Revision$ + */ + +#include +#include "org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect.h" +/* + * Class: org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect + * Method: execute + * Signature: (IIIIIZIIIIIZIIZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpAdd_00024MatrixOpDirect_execute + ( + JNIEnv * env, + jobject obj, + jint leftSourceAddress, + jint leftSourceStride, + jint leftElements, + jint leftSourceWidth, + jint leftSourceHeight, + jboolean transposeLeftSource, + jint rightSourceAddress, + jint rightSourceStride, + jint rightElements, + jint rightSourceWidth, + jint rightSourceHeight, + jboolean transposeRightSource, + jint destAddress, + jint destStride, + jboolean transposeDest + ) +{ + float * leftSource = (float *) leftSourceAddress; + float * rightSource = (float *) rightSourceAddress; + float * dest = (float *) destAddress; +} + + diff --git a/src/native/win32/org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe.cpp b/src/native/win32/org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe.cpp new file mode 100644 index 00000000..68175de8 --- /dev/null +++ b/src/native/win32/org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe.cpp @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2002 Light Weight Java Game Library Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Win32 math library. + * + * @author cix_foo + * @version $Revision$ + */ + +#include +#include "org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe.h" +/* + * Class: org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe + * Method: execute + * Signature: (IIIIIZIIIIIZIIZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpAdd_00024MatrixOpSafe_execute + ( + JNIEnv * env, + jobject obj, + jint leftSourceAddress, + jint leftSourceStride, + jint leftElements, + jint leftSourceWidth, + jint leftSourceHeight, + jboolean transposeLeftSource, + jint rightSourceAddress, + jint rightSourceStride, + jint rightElements, + jint rightSourceWidth, + jint rightSourceHeight, + jboolean transposeRightSource, + jint destAddress, + jint destStride, + jboolean transposeDest + ) +{ + float * leftSource = (float *) leftSourceAddress; + float * rightSource = (float *) rightSourceAddress; + float * dest = (float *) destAddress; +} + + diff --git a/src/native/win32/org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect.cpp b/src/native/win32/org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect.cpp new file mode 100644 index 00000000..23e68323 --- /dev/null +++ b/src/native/win32/org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect.cpp @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2002 Light Weight Java Game Library Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Win32 math library. + * + * @author cix_foo + * @version $Revision$ + */ + +#include +#include "org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect.h" +/* + * Class: org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect + * Method: execute + * Signature: (IIIIIZIIZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpCopy_00024MatrixOpDirect_execute + ( + JNIEnv * env, + jobject obj, + jint sourceAddress, + jint sourceStride, + jint numElements, + jint sourceWidth, + jint sourceHeight, + jboolean transposeSource, + jint destAddress, + jint destStride, + jboolean transposeDest + ) +{ + float * source = (float *) sourceAddress; + float * dest = (float *) destAddress; +} + + diff --git a/src/native/win32/org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.cpp b/src/native/win32/org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.cpp new file mode 100644 index 00000000..f3fec7c7 --- /dev/null +++ b/src/native/win32/org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.cpp @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2002 Light Weight Java Game Library Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Win32 math library. + * + * @author cix_foo + * @version $Revision$ + */ + +#include +#include "org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.h" +/* + * Class: org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe + * Method: execute + * Signature: (IIIIIZIIZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpCopy_00024MatrixOpSafe_execute + ( + JNIEnv * env, + jobject obj, + jint sourceAddress, + jint sourceStride, + jint numElements, + jint sourceWidth, + jint sourceHeight, + jboolean transposeSource, + jint destAddress, + jint destStride, + jboolean transposeDest + ) +{ + float * source = (float *) sourceAddress; + float * dest = (float *) destAddress; +} diff --git a/src/native/win32/org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp b/src/native/win32/org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp new file mode 100644 index 00000000..8275aee8 --- /dev/null +++ b/src/native/win32/org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2002 Light Weight Java Game Library Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Win32 math library. + * + * @author cix_foo + * @version $Revision$ + */ + +#include +#include "org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.h" +/* + * Class: org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect + * Method: execute + * Signature: (IIIIIZIIZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpInvert_00024MatrixOpDirect_execute + ( + JNIEnv * env, + jobject obj, + jint sourceAddress, + jint sourceStride, + jint numElements, + jint sourceWidth, + jint sourceHeight, + jboolean transposeSource, + jint destAddress, + jint destStride, + jboolean transposeDest + ) +{ + float * source = (float *) sourceAddress; + float * dest = (float *) destAddress; +} diff --git a/src/native/win32/org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.cpp b/src/native/win32/org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.cpp new file mode 100644 index 00000000..90288ef3 --- /dev/null +++ b/src/native/win32/org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.cpp @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2002 Light Weight Java Game Library Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Win32 math library. + * + * @author cix_foo + * @version $Revision$ + */ + +#include +#include "org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.h" +/* + * Class: org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe + * Method: execute + * Signature: (IIIIIZIIZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpInvert_00024MatrixOpSafe_execute + ( + JNIEnv * env, + jobject obj, + jint sourceAddress, + jint sourceStride, + jint numElements, + jint sourceWidth, + jint sourceHeight, + jboolean transposeSource, + jint destAddress, + jint destStride, + jboolean transposeDest + ) +{ + float * source = (float *) sourceAddress; + float * dest = (float *) destAddress; +} diff --git a/src/native/win32/org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect.cpp b/src/native/win32/org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect.cpp new file mode 100644 index 00000000..d74f39a6 --- /dev/null +++ b/src/native/win32/org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect.cpp @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2002 Light Weight Java Game Library Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Win32 math library. + * + * @author cix_foo + * @version $Revision$ + */ + +#include +#include "org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect.h" +/* + * Class: org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect + * Method: execute + * Signature: (IIIIIZIIIIIZIIZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpMultiply_00024MatrixOpDirect_execute + ( + JNIEnv * env, + jobject obj, + jint leftSourceAddress, + jint leftSourceStride, + jint leftElements, + jint leftSourceWidth, + jint leftSourceHeight, + jboolean transposeLeftSource, + jint rightSourceAddress, + jint rightSourceStride, + jint rightElements, + jint rightSourceWidth, + jint rightSourceHeight, + jboolean transposeRightSource, + jint destAddress, + jint destStride, + jboolean transposeDest + ) +{ + float * leftSource = (float *) leftSourceAddress; + float * rightSource = (float *) rightSourceAddress; + float * dest = (float *) destAddress; +} + + diff --git a/src/native/win32/org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe.cpp b/src/native/win32/org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe.cpp new file mode 100644 index 00000000..ab635bc6 --- /dev/null +++ b/src/native/win32/org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe.cpp @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2002 Light Weight Java Game Library Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Win32 math library. + * + * @author cix_foo + * @version $Revision$ + */ + +#include +#include "org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe.h" +/* + * Class: org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe + * Method: execute + * Signature: (IIIIIZIIIIIZIIZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpMultiply_00024MatrixOpSafe_execute + ( + JNIEnv * env, + jobject obj, + jint leftSourceAddress, + jint leftSourceStride, + jint leftElements, + jint leftSourceWidth, + jint leftSourceHeight, + jboolean transposeLeftSource, + jint rightSourceAddress, + jint rightSourceStride, + jint rightElements, + jint rightSourceWidth, + jint rightSourceHeight, + jboolean transposeRightSource, + jint destAddress, + jint destStride, + jboolean transposeDest + ) +{ + float * leftSource = (float *) leftSourceAddress; + float * rightSource = (float *) rightSourceAddress; + float * dest = (float *) destAddress; +} + + diff --git a/src/native/win32/org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect.cpp b/src/native/win32/org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect.cpp new file mode 100644 index 00000000..df1d3e5a --- /dev/null +++ b/src/native/win32/org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect.cpp @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2002 Light Weight Java Game Library Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Win32 math library. + * + * @author cix_foo + * @version $Revision$ + */ + +#include +#include "org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect.h" +/* + * Class: org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect + * Method: execute + * Signature: (IIIIIZIIZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpNegate_00024MatrixOpDirect_execute + ( + JNIEnv * env, + jobject obj, + jint sourceAddress, + jint sourceStride, + jint numElements, + jint sourceWidth, + jint sourceHeight, + jboolean transposeSource, + jint destAddress, + jint destStride, + jboolean transposeDest + ) +{ + float * source = (float *) sourceAddress; + float * dest = (float *) destAddress; +} diff --git a/src/native/win32/org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe.cpp b/src/native/win32/org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe.cpp new file mode 100644 index 00000000..60f6189e --- /dev/null +++ b/src/native/win32/org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe.cpp @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2002 Light Weight Java Game Library Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Win32 math library. + * + * @author cix_foo + * @version $Revision$ + */ + +#include +#include "org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe.h" +/* + * Class: org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe + * Method: execute + * Signature: (IIIIIZIIZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpNegate_00024MatrixOpSafe_execute + ( + JNIEnv * env, + jobject obj, + jint sourceAddress, + jint sourceStride, + jint numElements, + jint sourceWidth, + jint sourceHeight, + jboolean transposeSource, + jint destAddress, + jint destStride, + jboolean transposeDest + ) +{ + float * source = (float *) sourceAddress; + float * dest = (float *) destAddress; +} diff --git a/src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.cpp b/src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.cpp new file mode 100644 index 00000000..1db67ec6 --- /dev/null +++ b/src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.cpp @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2002 Light Weight Java Game Library Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Win32 math library. + * + * @author cix_foo + * @version $Revision$ + */ + +#include +#include "org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.h" +/* + * Class: org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect + * Method: execute + * Signature: (IIIIIZIIZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpNormalise_00024MatrixOpDirect_execute + ( + JNIEnv * env, + jobject obj, + jint sourceAddress, + jint sourceStride, + jint numElements, + jint sourceWidth, + jint sourceHeight, + jboolean transposeSource, + jint destAddress, + jint destStride, + jboolean transposeDest + ) +{ + float * source = (float *) sourceAddress; + float * dest = (float *) destAddress; +} diff --git a/src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.cpp b/src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.cpp new file mode 100644 index 00000000..249990a0 --- /dev/null +++ b/src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.cpp @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2002 Light Weight Java Game Library Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Win32 math library. + * + * @author cix_foo + * @version $Revision$ + */ + +#include +#include "org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.h" +/* + * Class: org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe + * Method: execute + * Signature: (IIIIIZIIZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpNormalise_00024MatrixOpSafe_execute + ( + JNIEnv * env, + jobject obj, + jint sourceAddress, + jint sourceStride, + jint numElements, + jint sourceWidth, + jint sourceHeight, + jboolean transposeSource, + jint destAddress, + jint destStride, + jboolean transposeDest + ) +{ + float * source = (float *) sourceAddress; + float * dest = (float *) destAddress; +} diff --git a/src/native/win32/org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect.cpp b/src/native/win32/org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect.cpp new file mode 100644 index 00000000..445119d1 --- /dev/null +++ b/src/native/win32/org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect.cpp @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2002 Light Weight Java Game Library Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Win32 math library. + * + * @author cix_foo + * @version $Revision$ + */ + +#include +#include "org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect.h" +/* + * Class: org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect + * Method: execute + * Signature: (IIIIIZIIIIIZIIZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpSubtract_00024MatrixOpDirect_execute + ( + JNIEnv * env, + jobject obj, + jint leftSourceAddress, + jint leftSourceStride, + jint leftElements, + jint leftSourceWidth, + jint leftSourceHeight, + jboolean transposeLeftSource, + jint rightSourceAddress, + jint rightSourceStride, + jint rightElements, + jint rightSourceWidth, + jint rightSourceHeight, + jboolean transposeRightSource, + jint destAddress, + jint destStride, + jboolean transposeDest + ) +{ + float * leftSource = (float *) leftSourceAddress; + float * rightSource = (float *) rightSourceAddress; + float * dest = (float *) destAddress; +} + + diff --git a/src/native/win32/org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.cpp b/src/native/win32/org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.cpp new file mode 100644 index 00000000..c5c7088f --- /dev/null +++ b/src/native/win32/org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.cpp @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2002 Light Weight Java Game Library Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Win32 math library. + * + * @author cix_foo + * @version $Revision$ + */ + +#include +#include "org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.h" +/* + * Class: org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe + * Method: execute + * Signature: (IIIIIZIIIIIZIIZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpSubtract_00024MatrixOpSafe_execute + ( + JNIEnv * env, + jobject obj, + jint leftSourceAddress, + jint leftSourceStride, + jint leftElements, + jint leftSourceWidth, + jint leftSourceHeight, + jboolean transposeLeftSource, + jint rightSourceAddress, + jint rightSourceStride, + jint rightElements, + jint rightSourceWidth, + jint rightSourceHeight, + jboolean transposeRightSource, + jint destAddress, + jint destStride, + jboolean transposeDest + ) +{ + float * leftSource = (float *) leftSourceAddress; + float * rightSource = (float *) rightSourceAddress; + float * dest = (float *) destAddress; +} + +