You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
|
8
(1) |
9
|
10
|
11
(3) |
12
|
13
|
14
|
|
15
|
16
|
17
|
18
|
19
|
20
(6) |
21
|
|
22
|
23
(8) |
24
(6) |
25
|
26
(10) |
27
(3) |
28
(1) |
|
29
|
30
(2) |
31
(1) |
|
|
|
|
|
From: <eli...@us...> - 2006-10-11 20:26:50
|
Revision: 2583
http://svn.sourceforge.net/java-game-lib/?rev=2583&view=rev
Author: elias_naur
Date: 2006-10-11 13:26:35 -0700 (Wed, 11 Oct 2006)
Log Message:
-----------
Windows: Restore the old ToAscii code used on win9x platforms in an attempt to fix broken keyboard input on win98se machines.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeyboard.java
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsKeyboard.c
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeyboard.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeyboard.java 2006-10-11 13:48:48 UTC (rev 2582)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeyboard.java 2006-10-11 20:26:35 UTC (rev 2583)
@@ -51,7 +51,9 @@
private final WindowsDirectInputDevice keyboard;
private final IntBuffer temp_data_buffer;
private final ByteBuffer keyboard_state;
+ private final boolean unicode;
private final CharBuffer unicode_buffer;
+ private final ByteBuffer ascii_buffer;
public WindowsKeyboard(WindowsDirectInput dinput, long hwnd) throws LWJGLException {
this.dinput = dinput;
@@ -72,9 +74,19 @@
keyboard.acquire();
temp_data_buffer = BufferUtils.createIntBuffer(BUFFER_SIZE*WindowsDirectInputDevice.DATA_SIZE);
keyboard_state = BufferUtils.createByteBuffer(256);
- unicode_buffer = BufferUtils.createCharBuffer(BUFFER_SIZE);
+ unicode = isWindowsNT();
+ if (unicode) {
+ unicode_buffer = BufferUtils.createCharBuffer(BUFFER_SIZE);
+ ascii_buffer = null;
+ } else {
+ unicode_buffer = null;
+ // ToAscii returns at most 2 characters
+ ascii_buffer = BufferUtils.createByteBuffer(2);
+ }
}
+ private static native boolean isWindowsNT();
+
public void destroy() {
keyboard.unacquire();
keyboard.release();
@@ -117,12 +129,22 @@
if (virt_key != 0 && GetKeyboardState(keyboard_state) != 0) {
// Mark key down in the scan code
dwOfs = dwOfs & 0x7fff;
- unicode_buffer.clear();
- int num_chars = ToUnicode(virt_key,
+ int num_chars;
+ if (unicode) {
+ unicode_buffer.clear();
+ num_chars = ToUnicode(virt_key,
dwOfs,
keyboard_state,
unicode_buffer,
unicode_buffer.capacity(), 0);
+ } else {
+ ascii_buffer.clear();
+ num_chars = ToAscii(virt_key,
+ dwOfs,
+ keyboard_state,
+ ascii_buffer,
+ 0);
+ }
if (num_chars > 0) {
int current_char = 0;
do {
@@ -130,7 +152,12 @@
dst.putInt(0);
dst.put((byte)0);
}
- int char_int = ((int)unicode_buffer.get()) & 0xFFFF;
+ int char_int;
+ if (unicode) {
+ char_int = ((int)unicode_buffer.get()) & 0xFFFF;
+ } else {
+ char_int = ((int)ascii_buffer.get()) & 0xFF;
+ }
dst.putInt(char_int);
dst.putLong(nanos);
current_char++;
@@ -151,6 +178,7 @@
}
private static native int MapVirtualKey(int uCode, int uMapType);
private static native int ToUnicode(int wVirtKey, int wScanCode, ByteBuffer lpKeyState, CharBuffer pwszBuff, int cchBuff, int flags);
+ private static native int ToAscii(int wVirtKey, int wScanCode, ByteBuffer lpKeyState, ByteBuffer lpChar, int flags);
private static native int GetKeyboardState(ByteBuffer lpKeyState);
public void read(ByteBuffer buffer) {
Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsKeyboard.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsKeyboard.c 2006-10-11 13:48:48 UTC (rev 2582)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsKeyboard.c 2006-10-11 20:26:35 UTC (rev 2583)
@@ -45,12 +45,26 @@
return MapVirtualKey(uCode, uMapType);
}
+JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_isWindowsNT(JNIEnv *env, jclass unused) {
+ OSVERSIONINFO osvi;
+
+ osvi.dwOSVersionInfoSize = sizeof(osvi);
+ GetVersionEx(&osvi);
+ return osvi.dwPlatformId == VER_PLATFORM_WIN32_NT ? JNI_TRUE : JNI_FALSE;
+}
+
JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_ToUnicode(JNIEnv *env, jclass unused, jint wVirtKey, jint wScanCode, jobject lpKeyState_obj, jobject pwszBuff_obj, jint cchBuff, jint flags) {
const PBYTE lpKeyState = (*env)->GetDirectBufferAddress(env, lpKeyState_obj);
LPWSTR pwszBuff = (*env)->GetDirectBufferAddress(env, pwszBuff_obj);
return ToUnicode(wVirtKey, wScanCode, lpKeyState, pwszBuff, cchBuff, flags);
}
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_ToAscii(JNIEnv *env, jclass unused, jint wVirtKey, jint wScanCode, jobject lpKeyState_obj, jobject lpChar_obj, jint flags) {
+ const PBYTE lpKeyState = (*env)->GetDirectBufferAddress(env, lpKeyState_obj);
+ LPWORD lpChar = (*env)->GetDirectBufferAddress(env, lpChar_obj);
+ return ToAscii(wVirtKey, wScanCode, lpKeyState, lpChar, flags);
+}
+
JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_GetKeyboardState(JNIEnv *env, jclass unused, jobject lpKeyState_obj) {
PBYTE lpKeyState = (*env)->GetDirectBufferAddress(env, lpKeyState_obj);
return GetKeyboardState(lpKeyState);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2006-10-11 13:49:06
|
Revision: 2582
http://svn.sourceforge.net/java-game-lib/?rev=2582&view=rev
Author: elias_naur
Date: 2006-10-11 06:48:48 -0700 (Wed, 11 Oct 2006)
Log Message:
-----------
Windows: Don't use a dummy window (HDC) when finding a pixel format but use the actual window directly. This will avoid cases where the pixel format index for the dummy window's HDC wasn't valid for the actual window's HDC. It also avoid unnecessary complexity.
Fix FullScreenWindowedTest to use the Display's current BPP to avoid 24/16 bpp weirdness
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java
trunk/LWJGL/src/native/windows/context.c
trunk/LWJGL/src/native/windows/context.h
trunk/LWJGL/src/native/windows/display.c
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsPeerInfo.c
Modified: trunk/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java 2006-10-11 11:21:40 UTC (rev 2581)
+++ trunk/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java 2006-10-11 13:48:48 UTC (rev 2582)
@@ -80,7 +80,7 @@
private void initialize() {
try {
//find displaymode
- mode = findDisplayMode(800, 600, 16);
+ mode = findDisplayMode(800, 600, Display.getDisplayMode().getBitsPerPixel());
// start of in windowed mode
Display.create();
glInit();
Modified: trunk/LWJGL/src/native/windows/context.c
===================================================================
--- trunk/LWJGL/src/native/windows/context.c 2006-10-11 11:21:40 UTC (rev 2581)
+++ trunk/LWJGL/src/native/windows/context.c 2006-10-11 13:48:48 UTC (rev 2582)
@@ -370,68 +370,76 @@
return findPixelFormatFromBPP(env, hdc, pixel_format, bpp, double_buffer);
}
-static int findPixelFormatOnDC(JNIEnv *env, HDC hdc, jobject pixel_format, jobject pixelFormatCaps, bool use_hdc_bpp, bool window, bool pbuffer, bool double_buffer, bool floating_point) {
+static bool validateAndGetExtensions(JNIEnv *env, WGLExtensions *extensions, HDC dummy_hdc, HGLRC dummy_hglrc, int samples, bool floating_point, jobject pixelFormatCaps) {
+ if (!wglMakeCurrent(dummy_hdc, dummy_hglrc)) {
+ throwException(env, "Could not bind context to dummy window");
+ return false;
+ }
+ extgl_InitWGL(extensions);
+
+ if (!extensions->WGL_ARB_pixel_format) {
+ throwException(env, "No support for WGL_ARB_pixel_format");
+ return false;
+ }
+ if (samples > 0 && !extensions->WGL_ARB_multisample) {
+ throwException(env, "No support for WGL_ARB_multisample");
+ return false;
+ }
+ /*
+ * Apparently, some drivers don't report WGL_ARB_pixel_format_float
+ * even though GL_ARB_color_buffer_float and WGL_ATI_color_format_float
+ * is supported.
+ */
+ if (floating_point && !(extensions->WGL_ARB_pixel_format_float || extensions->WGL_ATI_pixel_format_float)) {
+ throwException(env, "No support for WGL_ARB_pixel_format_float nor WGL_ATI_pixel_format_float");
+ return false;
+ }
+ if (pixelFormatCaps != NULL && !extensions->WGL_ARB_render_texture) {
+ throwException(env, "No support for WGL_ARB_render_texture");
+ return false;
+ }
+ return true;
+}
+
+int findPixelFormatOnDC(JNIEnv *env, HDC hdc, int origin_x, int origin_y, jobject pixel_format, jobject pixelFormatCaps, bool use_hdc_bpp, bool window, bool pbuffer, bool double_buffer, bool floating_point) {
HGLRC dummy_hglrc;
HDC saved_current_hdc;
HGLRC saved_current_hglrc;
WGLExtensions extensions;
+ HWND dummy_hwnd;
+ HDC dummy_hdc;
int pixel_format_id;
jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format);
int samples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "samples", "I"));
bool use_arb_selection = samples > 0 || floating_point || pbuffer || pixelFormatCaps != NULL;
pixel_format_id = findPixelFormatDefault(env, hdc, pixel_format, use_hdc_bpp, double_buffer);
if (pixel_format_id != -1 && use_arb_selection) {
- if (!applyPixelFormat(env, hdc, pixel_format_id)) {
+ dummy_hwnd = createDummyWindow(origin_x, origin_y);
+ if (dummy_hwnd == NULL) {
+ throwException(env, "Could not create dummy window");
return -1;
}
- dummy_hglrc = wglCreateContext(hdc);
+ dummy_hdc = GetDC(dummy_hwnd);
+ if (!applyPixelFormat(env, dummy_hdc, pixel_format_id)) {
+ closeWindow(&dummy_hwnd, &dummy_hdc);
+ return -1;
+ }
+ dummy_hglrc = wglCreateContext(dummy_hdc);
if (dummy_hglrc == NULL) {
+ closeWindow(&dummy_hwnd, &dummy_hdc);
throwException(env, "Failed to create OpenGL rendering context");
return -1;
}
// Save the current HDC and HGLRC to avoid disruption
saved_current_hdc = wglGetCurrentDC();
saved_current_hglrc = wglGetCurrentContext();
- if (!wglMakeCurrent(hdc, dummy_hglrc)) {
- wglMakeCurrent(saved_current_hdc, saved_current_hglrc);
- wglDeleteContext(dummy_hglrc);
- throwException(env, "Could not bind context to dummy window");
- return -1;
- }
- extgl_InitWGL(&extensions);
-
- if (!extensions.WGL_ARB_pixel_format) {
- wglMakeCurrent(saved_current_hdc, saved_current_hglrc);
- wglDeleteContext(dummy_hglrc);
- throwException(env, "No support for WGL_ARB_pixel_format");
- return -1;
- }
- if (samples > 0 && !extensions.WGL_ARB_multisample) {
- wglMakeCurrent(saved_current_hdc, saved_current_hglrc);
- wglDeleteContext(dummy_hglrc);
- throwException(env, "No support for WGL_ARB_multisample");
- return -1;
- }
- /*
- * Apparently, some drivers don't report WGL_ARB_pixel_format_float
- * even though GL_ARB_color_buffer_float and WGL_ATI_color_format_float
- * is supported.
- */
- if (floating_point && !(extensions.WGL_ARB_pixel_format_float || extensions.WGL_ATI_pixel_format_float)) {
- wglMakeCurrent(saved_current_hdc, saved_current_hglrc);
- wglDeleteContext(dummy_hglrc);
- throwException(env, "No support for WGL_ARB_pixel_format_float nor WGL_ATI_pixel_format_float");
- return -1;
- }
- if (pixelFormatCaps != NULL && !extensions.WGL_ARB_render_texture) {
- wglMakeCurrent(saved_current_hdc, saved_current_hglrc);
- wglDeleteContext(dummy_hglrc);
- throwException(env, "No support for WGL_ARB_render_texture");
- return -1;
- }
- pixel_format_id = findPixelFormatARB(env, hdc, &extensions, pixel_format, pixelFormatCaps, use_hdc_bpp, window, pbuffer, double_buffer, floating_point);
+ if (validateAndGetExtensions(env, &extensions, dummy_hdc, dummy_hglrc, samples, floating_point, pixelFormatCaps)) {
+ pixel_format_id = findPixelFormatARB(env, hdc, &extensions, pixel_format, pixelFormatCaps, use_hdc_bpp, window, pbuffer, double_buffer, floating_point);
+ } else
+ pixel_format_id = -1;
wglMakeCurrent(saved_current_hdc, saved_current_hglrc);
wglDeleteContext(dummy_hglrc);
+ closeWindow(&dummy_hwnd, &dummy_hdc);
}
if (pixel_format_id == -1) {
throwException(env, "Could not find a valid pixel format");
@@ -455,18 +463,3 @@
return NULL;
return createWindow(_CONTEXT_PRIVATE_CLASS_NAME, origin_x, origin_y, 1, 1, false, false);
}
-
-int findPixelFormat(JNIEnv *env, int origin_x, int origin_y, jobject pixel_format, jobject pixelFormatCaps, bool use_hdc_bpp, bool window, bool pbuffer, bool double_buffer, bool floating_point) {
- HWND dummy_hwnd;
- HDC dummy_hdc;
- int pixel_format_id;
- dummy_hwnd = createDummyWindow(origin_x, origin_y);
- if (dummy_hwnd == NULL) {
- throwException(env, "Failed to create the dummy window.");
- return -1;
- }
- dummy_hdc = GetDC(dummy_hwnd);
- pixel_format_id = findPixelFormatOnDC(env, dummy_hdc, pixel_format, pixelFormatCaps, use_hdc_bpp, window, pbuffer, double_buffer, floating_point);
- closeWindow(&dummy_hwnd, &dummy_hdc);
- return pixel_format_id;
-}
Modified: trunk/LWJGL/src/native/windows/context.h
===================================================================
--- trunk/LWJGL/src/native/windows/context.h 2006-10-11 11:21:40 UTC (rev 2581)
+++ trunk/LWJGL/src/native/windows/context.h 2006-10-11 13:48:48 UTC (rev 2582)
@@ -88,6 +88,6 @@
*/
extern HWND createWindow(LPCTSTR window_class_name, int x, int y, int width, int height, bool fullscreen, bool undecorated);
-extern int findPixelFormat(JNIEnv *env, int origin_x, int origin_y, jobject pixel_format, jobject pixelFormatCaps, bool use_hdc_bpp, bool window, bool pbuffer, bool double_buffer, bool floating_point);
+extern int findPixelFormatOnDC(JNIEnv *env, HDC hdc, int origin_x, int origin_y, jobject pixel_format, jobject pixelFormatCaps, bool use_hdc_bpp, bool window, bool pbuffer, bool double_buffer, bool floating_point);
#endif
Modified: trunk/LWJGL/src/native/windows/display.c
===================================================================
--- trunk/LWJGL/src/native/windows/display.c 2006-10-11 11:21:40 UTC (rev 2581)
+++ trunk/LWJGL/src/native/windows/display.c 2006-10-11 13:48:48 UTC (rev 2582)
@@ -40,10 +40,6 @@
*/
#include <windows.h>
-// Multimon.h enables multi monitor emulation on win95 and winnt4
-// So we only need the extended, multi-monitor aware path
-//#define COMPILE_MULTIMON_STUBS
-//#include <Multimon.h>
#include <jni.h>
#include "org_lwjgl_opengl_WindowsDisplay.h"
#include "display.h"
Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c 2006-10-11 11:21:40 UTC (rev 2581)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c 2006-10-11 13:48:48 UTC (rev 2582)
@@ -62,15 +62,17 @@
HGLRC saved_context;
int pixel_format_id;
- pixel_format_id = findPixelFormat(env, origin_x, origin_y, pixel_format, pixelFormatCaps, false, true, false, false, false);
- if (pixel_format_id == -1)
- return false;
dummy_hwnd = createDummyWindow(origin_x, origin_y);
if (dummy_hwnd == NULL) {
throwException(env, "Could not create dummy window");
return false;
}
dummy_hdc = GetDC(dummy_hwnd);
+ pixel_format_id = findPixelFormatOnDC(env, dummy_hdc, origin_x, origin_y, pixel_format, pixelFormatCaps, false, true, false, false, false);
+ if (pixel_format_id == -1) {
+ closeWindow(&dummy_hwnd, &dummy_hdc);
+ return false;
+ }
if (!applyPixelFormat(env, dummy_hdc, pixel_format_id)) {
closeWindow(&dummy_hwnd, &dummy_hdc);
return false;
@@ -142,9 +144,6 @@
} else {
pBufferAttribs_ptr = NULL;
}
- pixel_format_id = findPixelFormat(env, origin_x, origin_y, pixel_format, pixelFormatCaps, false, false, true, false, floating_point);
- if (pixel_format_id == -1)
- return;
if (!getExtensions(env, &extensions, pixel_format, pixelFormatCaps))
return;
dummy_hwnd = createDummyWindow(origin_x, origin_y);
@@ -153,6 +152,11 @@
return;
}
dummy_hdc = GetDC(dummy_hwnd);
+ pixel_format_id = findPixelFormatOnDC(env, dummy_hdc, origin_x, origin_y, pixel_format, pixelFormatCaps, false, false, true, false, floating_point);
+ if (pixel_format_id == -1) {
+ closeWindow(&dummy_hwnd, &dummy_hdc);
+ return;
+ }
Pbuffer = extensions.wglCreatePbufferARB(dummy_hdc, pixel_format_id, width, height, pBufferAttribs_ptr);
closeWindow(&dummy_hwnd, &dummy_hdc);
if (Pbuffer == NULL) {
Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsPeerInfo.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsPeerInfo.c 2006-10-11 11:21:40 UTC (rev 2581)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsPeerInfo.c 2006-10-11 13:48:48 UTC (rev 2582)
@@ -52,7 +52,7 @@
WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format);
bool floating_point = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point", "Z"));
- int pixel_format_id = findPixelFormat(env, origin_x, origin_y, pixel_format, pixel_format_caps, use_hdc_bpp, window, pbuffer, double_buffer, floating_point);
+ int pixel_format_id = findPixelFormatOnDC(env, peer_info->drawable_hdc, origin_x, origin_y, pixel_format, pixel_format_caps, use_hdc_bpp, window, pbuffer, double_buffer, floating_point);
if (pixel_format_id == -1)
return;
// Let it throw
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2006-10-11 11:22:08
|
Revision: 2581
http://svn.sourceforge.net/java-game-lib/?rev=2581&view=rev
Author: spasi
Date: 2006-10-11 04:21:40 -0700 (Wed, 11 Oct 2006)
Log Message:
-----------
Added missing CURRENT_RASTER_SECONDARY_COLOR enum value (GL 2.1)
Added EXT_gpu_program_parameters extension
Modified Paths:
--------------
trunk/LWJGL/src/generated/org/lwjgl/opengl/ContextCapabilities.java
trunk/LWJGL/src/generated/org/lwjgl/opengl/GL21.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL21.java
Added Paths:
-----------
trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTGpuProgramParameters.java
trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTGpuProgramParameters.c
trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_program_parameters.java
Modified: trunk/LWJGL/src/generated/org/lwjgl/opengl/ContextCapabilities.java
===================================================================
--- trunk/LWJGL/src/generated/org/lwjgl/opengl/ContextCapabilities.java 2006-10-08 09:05:16 UTC (rev 2580)
+++ trunk/LWJGL/src/generated/org/lwjgl/opengl/ContextCapabilities.java 2006-10-11 11:21:40 UTC (rev 2581)
@@ -77,6 +77,7 @@
public final boolean GL_EXT_framebuffer_blit;
public final boolean GL_EXT_framebuffer_multisample;
public final boolean GL_EXT_framebuffer_object;
+ public final boolean GL_EXT_gpu_program_parameters;
public final boolean GL_EXT_multi_draw_arrays;
public final boolean GL_EXT_packed_depth_stencil;
public final boolean GL_EXT_packed_pixels;
@@ -453,6 +454,8 @@
long EXT_framebuffer_object_glFramebufferRenderbufferEXT_pointer;
long EXT_framebuffer_object_glGetFramebufferAttachmentParameterivEXT_pointer;
long EXT_framebuffer_object_glGenerateMipmapEXT_pointer;
+ long EXT_gpu_program_parameters_glProgramEnvParameter4fvEXT_pointer;
+ long EXT_gpu_program_parameters_glProgramLocalParameter4fvEXT_pointer;
long EXT_multi_draw_arrays_glMultiDrawArraysEXT_pointer;
long EXT_paletted_texture_glColorTableEXT_pointer;
long EXT_paletted_texture_glColorSubTableEXT_pointer;
@@ -1464,6 +1467,12 @@
(EXT_framebuffer_object_glGenerateMipmapEXT_pointer = GLContext.getFunctionAddress("glGenerateMipmapEXT")) != 0;
}
+ private boolean EXT_gpu_program_parameters_initNativeFunctionAddresses() {
+ return
+ (EXT_gpu_program_parameters_glProgramEnvParameter4fvEXT_pointer = GLContext.getFunctionAddress("glProgramEnvParameter4fvEXT")) != 0 &&
+ (EXT_gpu_program_parameters_glProgramLocalParameter4fvEXT_pointer = GLContext.getFunctionAddress("glProgramLocalParameter4fvEXT")) != 0;
+ }
+
private boolean EXT_multi_draw_arrays_initNativeFunctionAddresses() {
return
(EXT_multi_draw_arrays_glMultiDrawArraysEXT_pointer = GLContext.getFunctionAddress("glMultiDrawArraysEXT")) != 0;
@@ -2232,6 +2241,8 @@
supported_extensions.remove("GL_EXT_framebuffer_multisample");
if (supported_extensions.contains("GL_EXT_framebuffer_object") && !EXT_framebuffer_object_initNativeFunctionAddresses())
supported_extensions.remove("GL_EXT_framebuffer_object");
+ if (supported_extensions.contains("GL_EXT_gpu_program_parameters") && !EXT_gpu_program_parameters_initNativeFunctionAddresses())
+ supported_extensions.remove("GL_EXT_gpu_program_parameters");
if (supported_extensions.contains("GL_EXT_multi_draw_arrays") && !EXT_multi_draw_arrays_initNativeFunctionAddresses())
supported_extensions.remove("GL_EXT_multi_draw_arrays");
if (supported_extensions.contains("GL_EXT_paletted_texture") && !EXT_paletted_texture_initNativeFunctionAddresses())
@@ -2367,6 +2378,7 @@
this.GL_EXT_framebuffer_blit = supported_extensions.contains("GL_EXT_framebuffer_blit");
this.GL_EXT_framebuffer_multisample = supported_extensions.contains("GL_EXT_framebuffer_multisample");
this.GL_EXT_framebuffer_object = supported_extensions.contains("GL_EXT_framebuffer_object");
+ this.GL_EXT_gpu_program_parameters = supported_extensions.contains("GL_EXT_gpu_program_parameters");
this.GL_EXT_multi_draw_arrays = supported_extensions.contains("GL_EXT_multi_draw_arrays");
this.GL_EXT_packed_depth_stencil = supported_extensions.contains("GL_EXT_packed_depth_stencil");
this.GL_EXT_packed_pixels = supported_extensions.contains("GL_EXT_packed_pixels");
Added: trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTGpuProgramParameters.java
===================================================================
--- trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTGpuProgramParameters.java (rev 0)
+++ trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTGpuProgramParameters.java 2006-10-11 11:21:40 UTC (rev 2581)
@@ -0,0 +1,30 @@
+/* MACHINE GENERATED FILE, DO NOT EDIT */
+
+package org.lwjgl.opengl;
+
+import org.lwjgl.LWJGLException;
+import org.lwjgl.BufferChecks;
+import java.nio.*;
+
+public final class EXTGpuProgramParameters {
+
+ private EXTGpuProgramParameters() {
+ }
+
+
+ public static void glProgramEnvParameter4EXT(int target, int index, int count, FloatBuffer params) {
+ long function_pointer = GLContext.getCapabilities().EXT_gpu_program_parameters_glProgramEnvParameter4fvEXT_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, count << 2);
+ nglProgramEnvParameter4fvEXT(target, index, count, params, params.position(), function_pointer);
+ }
+ private static native void nglProgramEnvParameter4fvEXT(int target, int index, int count, FloatBuffer params, int params_position, long function_pointer);
+
+ public static void glProgramLocalParameter4EXT(int target, int index, int count, FloatBuffer params) {
+ long function_pointer = GLContext.getCapabilities().EXT_gpu_program_parameters_glProgramLocalParameter4fvEXT_pointer;
+ BufferChecks.checkFunctionAddress(function_pointer);
+ BufferChecks.checkBuffer(params, count << 2);
+ nglProgramLocalParameter4fvEXT(target, index, count, params, params.position(), function_pointer);
+ }
+ private static native void nglProgramLocalParameter4fvEXT(int target, int index, int count, FloatBuffer params, int params_position, long function_pointer);
+}
Modified: trunk/LWJGL/src/generated/org/lwjgl/opengl/GL21.java
===================================================================
--- trunk/LWJGL/src/generated/org/lwjgl/opengl/GL21.java 2006-10-08 09:05:16 UTC (rev 2580)
+++ trunk/LWJGL/src/generated/org/lwjgl/opengl/GL21.java 2006-10-11 11:21:40 UTC (rev 2581)
@@ -39,7 +39,7 @@
/**
* Accepted by the <pname> parameter of GetIntegerv and GetFloatv.
*/
- public static final int GL_CURRENT_RASTER_SECONDARY_COLOR = 0xffffffff;
+ public static final int GL_CURRENT_RASTER_SECONDARY_COLOR = 0x845f;
private GL21() {
}
Added: trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTGpuProgramParameters.c
===================================================================
--- trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTGpuProgramParameters.c (rev 0)
+++ trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTGpuProgramParameters.c 2006-10-11 11:21:40 UTC (rev 2581)
@@ -0,0 +1,20 @@
+/* MACHINE GENERATED FILE, DO NOT EDIT */
+
+#include <jni.h>
+#include "extgl.h"
+
+typedef void (APIENTRY *glProgramEnvParameter4fvEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+typedef void (APIENTRY *glProgramLocalParameter4fvEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+
+JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuProgramParameters_nglProgramEnvParameter4fvEXT(JNIEnv *env, jclass clazz, jint target, jint index, jint count, jobject params, jint params_position, jlong function_pointer) {
+ const GLfloat *params_address = ((const GLfloat *)(*env)->GetDirectBufferAddress(env, params)) + params_position;
+ glProgramEnvParameter4fvEXTPROC glProgramEnvParameter4fvEXT = (glProgramEnvParameter4fvEXTPROC)((intptr_t)function_pointer);
+ glProgramEnvParameter4fvEXT(target, index, count, params_address);
+}
+
+JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuProgramParameters_nglProgramLocalParameter4fvEXT(JNIEnv *env, jclass clazz, jint target, jint index, jint count, jobject params, jint params_position, jlong function_pointer) {
+ const GLfloat *params_address = ((const GLfloat *)(*env)->GetDirectBufferAddress(env, params)) + params_position;
+ glProgramLocalParameter4fvEXTPROC glProgramLocalParameter4fvEXT = (glProgramLocalParameter4fvEXTPROC)((intptr_t)function_pointer);
+ glProgramLocalParameter4fvEXT(target, index, count, params_address);
+}
+
Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_program_parameters.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_program_parameters.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_program_parameters.java 2006-10-11 11:21:40 UTC (rev 2581)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2002-2004 LWJGL 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 'LWJGL' 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.
+ */
+package org.lwjgl.opengl;
+
+import org.lwjgl.util.generator.*;
+
+import java.nio.*;
+
+public interface EXT_gpu_program_parameters {
+
+ @StripPostfix("params")
+ void glProgramEnvParameter4fvEXT(@GLenum int target, @GLuint int index, @GLsizei int count, @Check("count << 2") @Const FloatBuffer params);
+
+ @StripPostfix("params")
+ void glProgramLocalParameter4fvEXT(@GLenum int target, @GLuint int index, @GLsizei int count, @Check("count << 2") @Const FloatBuffer params);
+
+}
\ No newline at end of file
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL21.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL21.java 2006-10-08 09:05:16 UTC (rev 2580)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL21.java 2006-10-11 11:21:40 UTC (rev 2581)
@@ -112,6 +112,6 @@
/**
* Accepted by the <pname> parameter of GetIntegerv and GetFloatv.
*/
- int GL_CURRENT_RASTER_SECONDARY_COLOR = -1; // TODO: Find this value
+ int GL_CURRENT_RASTER_SECONDARY_COLOR = 0x845F;
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|