From 3e2b16a820bfe03f8f3837c3aaa615c8c4b7f18c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 13 Feb 2001 05:32:07 +0000 Subject: JAWT Support JDK >=1.3 --- CNativeCode/OpenGL_Win32_JDirect.c | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) (limited to 'CNativeCode/OpenGL_Win32_JDirect.c') diff --git a/CNativeCode/OpenGL_Win32_JDirect.c b/CNativeCode/OpenGL_Win32_JDirect.c index 6b46874..a97b7c5 100755 --- a/CNativeCode/OpenGL_Win32_JDirect.c +++ b/CNativeCode/OpenGL_Win32_JDirect.c @@ -22,21 +22,7 @@ * The other procs are implemented with JNI ! */ -#ifdef _WIN32_ - #include "winstuff.h" -#endif - -#include "GL/gl.h" - -#include - -/*-------------------------------------------------------------------------- - * here on in is just regular apple pie C - */ - -#include -#include -#include +#include "OpenGL_misc.h" #define CLASS_NAME "GL4JavaOglRenderingWindowClass" #define WINDOW_NAME "GL4JavaOglRenderingWindow" @@ -107,10 +93,10 @@ __declspec(dllexport) void OGLWindowMsgPumpJDirect(void) } } /* OGLWindowMsgPumpJDirect() */ -__declspec(dllexport) void moveOGLWindowNativeJDirect(int _hdc, int x, int y, int width, int height) +__declspec(dllexport) void moveOGLWindowNativeJDirect(long _hdc, int x, int y, int width, int height) { HWND hwnd, hwndParent; - HDC hdc = (HDC)_hdc; + HDC hdc = (HDC)((PointerHolder)_hdc); RECT rect; int parentx = 0, parenty = 0; int insetsleft = 0, insetstop = 0; @@ -137,7 +123,7 @@ __declspec(dllexport) void moveOGLWindowNativeJDirect(int _hdc, int x, int y, in } } /* moveOGLWindowNativeJDirect() */ -__declspec(dllexport) int createOGLWindowNativeJDirect(int hwndParent, int x, int y, int width, int height) +__declspec(dllexport) long createOGLWindowNativeJDirect(long hwndParent, int x, int y, int width, int height) { HWND hwnd; HDC hdc; @@ -150,7 +136,7 @@ __declspec(dllexport) int createOGLWindowNativeJDirect(int hwndParent, int x, in y, width, height, - (HWND)hwndParent, + (HWND)((PointerHolder)hwndParent), NULL, NULL, NULL)) == NULL) @@ -160,14 +146,14 @@ __declspec(dllexport) int createOGLWindowNativeJDirect(int hwndParent, int x, in return(0); } hdc = GetDC(hwnd); - moveOGLWindowNativeJDirect((int)hdc, x, y, width, height); - return (int)hdc; + moveOGLWindowNativeJDirect((long)((PointerHolder)hdc), x, y, width, height); + return (long)((PointerHolder)hdc); } /* createOGLWindowNativeJDirect() */ -__declspec(dllexport) void destroyOGLWindowNativeJDirect(int _hdc) +__declspec(dllexport) void destroyOGLWindowNativeJDirect(long _hdc) { HWND hwnd; - HDC hdc = (HDC)_hdc; + HDC hdc = (HDC)((PointerHolder)_hdc); if (hdc != NULL) { -- cgit v1.2.3