According to https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/A pplicationKit/Classes/nsbitmapimagerep_Class/Reference/Reference.html the data referenced by the "planes" parameter will not be copied into the NSBitmapImageRep class. This means that when the referenced data changes (which is very likely in our case since the data is retrieved from Java by GetDirectBufferAddress()) we see exactly the effect described in the LWJGL forum here: http://lwjgl.org/forum/index.php/topic,5007.0.html The Apple class reference documentation linked above also describes that when the "planes" parameter is NULL then the NSBitmapImageRep class will allocate enough memory to store the image data and will automatically free the allocated memory when the NSBitmapImageRep instance is freed. In this case the data can be accessed with the "bitmapData" method. Which is exactly what we'll do now: pass NULL into the method to let it allocate memory and then simply memcpy our image data into that area. This seems to fix the mouse cursor image. |
||
|---|---|---|
| applet | ||
| doc | ||
| eclipse-update | ||
| libs | ||
| maven | ||
| platform_build | ||
| res | ||
| src | ||
| .gitignore | ||
| build.xml | ||
| README.md | ||
LWJGL - Lightweight Java Game Library
The Lightweight Java Game Library (LWJGL) is a solution aimed directly at professional and amateur Java programmers alike to enable commercial quality games to be written in Java. LWJGL provides developers access to high performance crossplatform libraries such as OpenGL (Open Graphics Library), OpenCL (Open Computing Language) and OpenAL (Open Audio Library) allowing for state of the art 3D games and 3D sound. Additionally LWJGL provides access to controllers such as Gamepads, Steering wheel and Joysticks. All in a simple and straight forward API.
Website: http://lwjgl.org Forum: http://lwjgl.org/forum Bugs/Suggestions: https://github.com/LWJGL/lwjgl/issues
Compilation
LWJGL requires a JDK and Ant installed to compile, as well as your platforms native compiler to compile the JNI.
- ant generate-all
- ant compile
- ant compile_native