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
(1) |
5
|
6
|
7
|
|
8
|
9
|
10
|
11
(7) |
12
(5) |
13
|
14
(10) |
|
15
(5) |
16
|
17
(2) |
18
(12) |
19
(7) |
20
(19) |
21
(42) |
|
22
(19) |
23
(4) |
24
(1) |
25
|
26
|
27
|
28
(1) |
|
29
|
30
(28) |
31
|
|
|
|
|
|
From: Brian M. <ma...@us...> - 2002-12-19 22:18:15
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal In directory sc8-pr-cvs1:/tmp/cvs-serv26268 Added Files: MovingSoundTest.java Log Message: yet another test --- NEW FILE: MovingSoundTest.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/MovingSoundTest.java /* * 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. */ package org.lwjgl.test.openal; import org.lwjgl.openal.AL; import org.lwjgl.openal.eax.*; import org.lwjgl.input.Keyboard; import org.lwjgl.Sys; import org.lwjgl.Display; import org.lwjgl.DisplayMode; import java.nio.IntBuffer; /** * $Id: MovingSoundTest.java,v 1.1 2002/12/19 22:18:10 matzon Exp $ * * This test simulates a listener positioned in the center, and * a source moving around the listener using the keyboard * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class MovingSoundTest extends BasicTest { public static float MOVEMENT = 50.00f; /** * Creates an instance of MovingSoundTest */ public MovingSoundTest() { super(); } /** * Runs the actual test, using supplied arguments */ protected void execute(String[] args) { if (args.length < 1) { System.out.println("please specify filename to play"); return; } int lastError; float sourcex = 0.0f, sourcey = 0.0f, sourcez = 0.0f; float listenerx = 0.0f, listenery = 0.0f, listenerz = 0.0f; boolean eaxApplied = false; IntBuffer Env = null; EAXBufferProperties eaxBufferProp = null; //initialize AL, using ALC alInitialize(); //initialize display try { Display.create(new DisplayMode(320, 240, 32, 60), false); } catch (Exception e) { e.printStackTrace(); exit(-1); } //initialize keyboard try { Keyboard.create(); } catch (Exception e) { e.printStackTrace(); exit(-1); } //create 1 buffer and 1 source IntBuffer buffers = createIntBuffer(1); IntBuffer sources = createIntBuffer(1); // al generate buffers and sources al.genBuffers(1, Sys.getDirectBufferAddress(buffers)); if ((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } al.genSources(1, Sys.getDirectBufferAddress(sources)); if ((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //load wave data WaveData wavefile = WaveData.create(args[0]); //copy to buffers al.bufferData( buffers.get(0), wavefile.format, Sys.getDirectBufferAddress(wavefile.data), wavefile.data.capacity(), wavefile.samplerate); if ((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //unload file again wavefile.dispose(); //set up source input al.sourcei(sources.get(0), AL.BUFFER, buffers.get(0)); if ((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } al.sourcef(sources.get(0), AL.REFERENCE_DISTANCE, 1024.0f); al.sourcef(sources.get(0), AL.ROLLOFF_FACTOR, 0.5f); //lets loop the sound al.sourcei(sources.get(0), AL.LOOPING, AL.TRUE); if ((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //play source 0 al.sourcePlay(sources.get(0)); if ((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //setup EAX if possible EAX eax = null; if (al.isExtensionPresent("EAX")) { eax = new EAX(); try { eax.create(); Env = createIntBuffer(1); eaxBufferProp = new EAXBufferProperties(); } catch (Exception e) { eax = null; } } System.out.println("Move source with arrow keys\nMove listener with right shift and arrowkeys\nEnable EAX effect by pressing e (if available)\nExit with ESC"); while(!Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) { Keyboard.poll(); if(Keyboard.isKeyDown(Keyboard.KEY_LEFT)) { if(Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) { listenerx -= MOVEMENT; al.listener3f(AL.POSITION, listenerx, listenery, listenerz); System.out.println("listenerx: " + listenerx); } else { sourcex -= MOVEMENT; al.source3f(sources.get(0), AL.POSITION, sourcex, sourcey, sourcez); System.out.println("sourcex: " + sourcex); } } if(Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) { if(Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) { listenerx += MOVEMENT; al.listener3f(AL.POSITION, listenerx, listenery, listenerz); System.out.println("listenerx: " + listenerx); } else { sourcex += MOVEMENT; al.source3f(sources.get(0), AL.POSITION, sourcex, sourcey, sourcez); System.out.println("sourcex: " + sourcex); } } if(Keyboard.isKeyDown(Keyboard.KEY_E)) { if(eax != null) { if(eaxApplied) { Env.put(0, EAX.ENVIRONMENT_GENERIC); eax.eaxSet( EAX.LISTENER_GUID, EAXListenerProperties.ENVIRONMENT, 0, Sys.getDirectBufferAddress(Env), 4); } else { Env.put(0, EAX.ENVIRONMENT_HANGAR); eax.eaxSet( EAX.LISTENER_GUID, EAXListenerProperties.ENVIRONMENT, 0, Sys.getDirectBufferAddress(Env), 4); } eaxApplied = !eaxApplied; } } try { Thread.sleep(100); } catch (InterruptedException inte) { } } //stop source 0 al.sourceStop(sources.get(0)); if ((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //delete buffers and sources al.deleteSources(1, Sys.getDirectBufferAddress(sources)); if ((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } al.deleteBuffers(1, Sys.getDirectBufferAddress(buffers)); if ((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //shutdown alExit(); } /** * main entry point * * @param args String array containing arguments */ public static void main(String[] args) { MovingSoundTest movingSoundTest = new MovingSoundTest(); movingSoundTest.execute(args); } } |
|
From: Elias N. <eli...@us...> - 2002-12-19 16:35:39
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv17077/src/native/win32 Modified Files: org_lwjgl_Display.cpp org_lwjgl_input_Keyboard.cpp org_lwjgl_input_Mouse.cpp org_lwjgl_opengl_BaseGL.cpp Log Message: Moved BaseGL constructor parameters to Display Index: org_lwjgl_Display.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Display.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- org_lwjgl_Display.cpp 18 Dec 2002 16:40:12 -0000 1.9 +++ org_lwjgl_Display.cpp 19 Dec 2002 16:35:35 -0000 1.10 @@ -56,6 +56,37 @@ HDC hdc = NULL; // Device context LPDIRECTINPUT lpdi = NULL; +void destroyDI(void) +{ + lpdi->Release(); + lpdi = NULL; +} + +void destroyWindow(void) +{ + // Reset the display if necessary + ChangeDisplaySettings(NULL, 0); + + if (hwnd != NULL) { + // Vape the window + DestroyWindow(hwnd); + hwnd = NULL; + } + +#ifdef _DEBUG + printf("Destroyed display\n"); +#endif + + // Show the mouse + ShowCursor(TRUE); +} + +void destroyAll(void) +{ + destroyDI(); + destroyWindow(); +} + void dumpLastError(void) { LPVOID lpMsgBuf; FormatMessage( @@ -192,7 +223,8 @@ * Signature: (IIIIZ)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_nCreate - (JNIEnv * env, jclass clazz, jint width, jint height, jint bpp, jint freq, jboolean fullscreen) + (JNIEnv * env, jclass clazz, jint width, jint height, jint bpp, jint freq, + jint alphaBits, jint depthBits, jint stencilBits, jboolean fullscreen) { #ifdef _DEBUG printf("Creating display: size %dx%d %dhz %dbpp...\n", width, height, freq, bpp); @@ -259,7 +291,7 @@ printf("Failed to create directinput"); switch (ret) { case DIERR_BETADIRECTINPUTVERSION : - printf(" - Beta versio0n\n"); + printf(" - Beta version\n"); break; case DIERR_INVALIDPARAM : printf(" - Invalid parameter\n"); @@ -272,13 +304,98 @@ break; default: printf("\n"); - } + } + destroyWindow(); return JNI_FALSE; } - jfieldID fid_handle = env->GetStaticFieldID(clazz, "handle", "I"); - env->SetStaticIntField(clazz, fid_handle, (jint) hwnd); - + int flags = PFD_DRAW_TO_WINDOW | // support window + PFD_SUPPORT_OPENGL | // support OpenGL + PFD_GENERIC_ACCELERATED | + PFD_DOUBLEBUFFER; // double buffered + + PIXELFORMATDESCRIPTOR pfd = { + sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd + 1, // version number + flags, // RGBA type + PFD_TYPE_RGBA, + (BYTE)bpp, + 0, 0, 0, 0, 0, 0, // color bits ignored + (BYTE)alphaBits, + 0, // shift bit ignored + 0, // no accumulation buffer + 0, 0, 0, 0, // accum bits ignored + (BYTE)depthBits, + (BYTE)stencilBits, + 0, // One auxiliary buffer + PFD_MAIN_PLANE, // main layer + 0, // reserved + 0, 0, 0 // layer masks ignored + }; + + // Ensure desktop color depth is adequate + int availableBitDepth = GetDeviceCaps(hdc, BITSPIXEL); + if (availableBitDepth < bpp) { + printf("This application requires a greater colour depth.\n"); + destroyAll(); + return JNI_FALSE; + }; + + int iPixelFormat; + + // get the best available match of pixel format for the device context + iPixelFormat = ChoosePixelFormat(hdc, &pfd); + if (iPixelFormat == 0) { + printf("Failed to choose pixel format.\n"); + destroyAll(); + return JNI_FALSE; + } + + PIXELFORMATDESCRIPTOR desc; + if (DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &desc) == 0) { + printf("Could not describe pixel format\n"); + destroyAll(); + return JNI_FALSE; + } + + if (desc.cColorBits < bpp) { + printf("This application requires a greater colour depth.\n"); + destroyAll(); + return JNI_FALSE; + } + + if (desc.cStencilBits < stencilBits) { + printf("This application requires a greater stencil depth.\n"); + destroyAll(); + return JNI_FALSE; + } + + if (desc.cDepthBits < depthBits) { + printf("This application requires a greater depth buffer depth.\n"); + destroyAll(); + return JNI_FALSE; + } + + if ((desc.dwFlags & flags) == 0) { + printf("Capabilities not supported.\n"); + destroyAll(); + return JNI_FALSE; + } + +#ifdef _DEBUG + printf("Pixel format is %d\n", iPixelFormat); +#endif + + // make that the pixel format of the device context + if (SetPixelFormat(hdc, iPixelFormat, &pfd) == FALSE) { + printf("Failed to set pixel format\n"); + destroyAll(); + return JNI_FALSE; + } + + jfieldID fid_handle = env->GetStaticFieldID(clazz, "handle", "I"); + env->SetStaticIntField(clazz, fid_handle, (jint) hwnd); + return JNI_TRUE; } @@ -289,20 +406,7 @@ */ JNIEXPORT void JNICALL Java_org_lwjgl_Display_nDestroy (JNIEnv * env, jclass clazz) -{ - // Reset the display if necessary - ChangeDisplaySettings(NULL, 0); - - if (hwnd != NULL) { - // Vape the window - DestroyWindow(hwnd); - hwnd = NULL; - } - -#ifdef _DEBUG - printf("Destroyed display\n"); -#endif - - // Show the mouse - ShowCursor(TRUE); -} +{ + destroyAll(); +} + Index: org_lwjgl_input_Keyboard.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Keyboard.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Keyboard.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_input_Keyboard.cpp 27 Aug 2002 20:42:47 -0000 1.4 +++ org_lwjgl_input_Keyboard.cpp 19 Dec 2002 16:35:35 -0000 1.5 @@ -137,14 +137,6 @@ lpdiKeyboard->Release(); lpdiKeyboard = NULL; } - - // Release directinput if the mouse is not present - if (lpdi != NULL) { - // Release directinput - lpdi->Release(); - lpdi = NULL; - - } } /* Index: org_lwjgl_input_Mouse.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Mouse.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Mouse.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_input_Mouse.cpp 12 Dec 2002 20:04:56 -0000 1.4 +++ org_lwjgl_input_Mouse.cpp 19 Dec 2002 16:35:35 -0000 1.5 @@ -154,12 +154,6 @@ lpdiMouse = NULL; } - // Release directinput - if (lpdi != NULL) { - // Release directinput - lpdi->Release(); - lpdi = NULL; - } } /* Index: org_lwjgl_opengl_BaseGL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_BaseGL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_BaseGL.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- org_lwjgl_opengl_BaseGL.cpp 12 Dec 2002 22:04:05 -0000 1.8 +++ org_lwjgl_opengl_BaseGL.cpp 19 Dec 2002 16:35:35 -0000 1.9 @@ -53,86 +53,11 @@ * Signature: (IIII)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_BaseGL_nCreate - (JNIEnv * env, jobject obj, jint colorBits, jint alphaBits, jint depthBits, jint stencilBits) + (JNIEnv * env, jobject obj) { if (!hwnd) { printf("No window handle\n"); - return JNI_FALSE; - } - int flags = PFD_DRAW_TO_WINDOW | // support window - PFD_SUPPORT_OPENGL | // support OpenGL - PFD_GENERIC_ACCELERATED | - PFD_DOUBLEBUFFER; // double buffered - - PIXELFORMATDESCRIPTOR pfd = { - sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd - 1, // version number - flags, // RGBA type - PFD_TYPE_RGBA, - (BYTE)colorBits, - 0, 0, 0, 0, 0, 0, // color bits ignored - (BYTE)alphaBits, - 0, // shift bit ignored - 0, // no accumulation buffer - 0, 0, 0, 0, // accum bits ignored - (BYTE)depthBits, - (BYTE)stencilBits, - 0, // One auxiliary buffer - PFD_MAIN_PLANE, // main layer - 0, // reserved - 0, 0, 0 // layer masks ignored - }; - - // Ensure desktop color depth is adequate - int availableBitDepth = GetDeviceCaps(hdc, BITSPIXEL); - if (availableBitDepth < colorBits) { - printf("This application requires a greater colour depth.\n"); - return JNI_FALSE; - }; - - int iPixelFormat; - - // get the best available match of pixel format for the device context - iPixelFormat = ChoosePixelFormat(hdc, &pfd); - if (iPixelFormat == 0) { - printf("Failed to choose pixel format.\n"); - return JNI_FALSE; - } - - PIXELFORMATDESCRIPTOR desc; - if (DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &desc) == 0) { - printf("Could not describe pixel format\n"); - return JNI_FALSE; - } - - if (desc.cColorBits < colorBits) { - printf("This application requires a greater colour depth.\n"); - return JNI_FALSE; - } - - if (desc.cStencilBits < stencilBits) { - printf("This application requires a greater stencil depth.\n"); - return JNI_FALSE; - } - - if (desc.cDepthBits < depthBits) { - printf("This application requires a greater depth buffer depth.\n"); - return JNI_FALSE; - } - - if ((desc.dwFlags & flags) == 0) { - printf("Capabilities not supported.\n"); - return JNI_FALSE; - } - -#ifdef _DEBUG - printf("Pixel format is %d\n", iPixelFormat); -#endif - - // make that the pixel format of the device context - if (SetPixelFormat(hdc, iPixelFormat, &pfd) == FALSE) { - printf("Failed to set pixel format\n"); return JNI_FALSE; } if (extgl_Open() != 0) |
|
From: Elias N. <eli...@us...> - 2002-12-19 16:35:39
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv17077/src/native/linux Modified Files: org_lwjgl_Display.cpp org_lwjgl_opengl_BaseGL.cpp Log Message: Moved BaseGL constructor parameters to Display Index: org_lwjgl_Display.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Display.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- org_lwjgl_Display.cpp 11 Dec 2002 07:26:49 -0000 1.8 +++ org_lwjgl_Display.cpp 19 Dec 2002 16:35:35 -0000 1.9 @@ -96,28 +96,43 @@ return 1; } -JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_nCreate(JNIEnv * env, jclass clazz, jint width, jint height, jint bpp, jint freq, jboolean fullscreen) { +JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_nCreate(JNIEnv * env, jclass clazz, jint width, jint height, jint bpp, jint freq, jint alpha_bits, jint depth_bits, jint stencil_bits, jboolean fullscreen) { Window root_win; XSetWindowAttributes attribs; Colormap cmap; int attribmask; - int bpe = bpp/4; + int bpe; + switch (bpp) { + case 32: + case 24: + bpe = 8; + break; + case 16: + bpe = 4; + break; + default: + return JNI_FALSE; + } + if (depth_bits == 32) + depth_bits = 24; + int attriblist[] = { GLX_RGBA, GLX_DOUBLEBUFFER, - GLX_DEPTH_SIZE, bpp, + GLX_DEPTH_SIZE, depth_bits, GLX_RED_SIZE, bpe, GLX_GREEN_SIZE, bpe, GLX_BLUE_SIZE, bpe, - GLX_ALPHA_SIZE, bpe, + GLX_ALPHA_SIZE, alpha_bits, + GLX_STENCIL_SIZE, stencil_bits, None }; - int attriblistna[] = { GLX_RGBA, +/* int attriblistna[] = { GLX_RGBA, GLX_DOUBLEBUFFER, GLX_DEPTH_SIZE, bpp, GLX_RED_SIZE, bpe, GLX_GREEN_SIZE, bpe, GLX_BLUE_SIZE, bpe, None }; - +*/ int num_modes, i; @@ -151,10 +166,10 @@ vis_info = glXChooseVisual(disp, screen, attriblist); /* might be a better way to handle not being able to set GLX_ALPHA_SIZE... */ - if (vis_info == NULL) { +/* if (vis_info == NULL) { vis_info = glXChooseVisual(disp, screen, attriblistna); } - +*/ if (vis_info == NULL) { XCloseDisplay(disp); #ifdef _DEBUG Index: org_lwjgl_opengl_BaseGL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_BaseGL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_BaseGL.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_opengl_BaseGL.cpp 25 Nov 2002 20:35:01 -0000 1.4 +++ org_lwjgl_opengl_BaseGL.cpp 19 Dec 2002 16:35:35 -0000 1.5 @@ -61,7 +61,7 @@ * Signature: (IIII)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_BaseGL_nCreate - (JNIEnv * env, jobject obj, jint colorBits, jint alphaBits, jint depthBits, jint stencilBits) + (JNIEnv * env, jobject obj) { if (!vis_info) { |
|
From: Elias N. <eli...@us...> - 2002-12-19 16:35:38
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv17077/src/java/org/lwjgl/opengl Modified Files: BaseGL.java CoreGL.java GL.java Log Message: Moved BaseGL constructor parameters to Display Index: BaseGL.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/BaseGL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/BaseGL.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- BaseGL.java 25 Nov 2002 17:04:56 -0000 1.6 +++ BaseGL.java 19 Dec 2002 16:35:35 -0000 1.7 @@ -68,33 +68,13 @@ /** This GL will be valid for use in only one thread */ protected Thread renderThread; - /** The number of color bits */ - protected final int colorBits; - - /** The number of alpha bits */ - protected final int alphaBits; - - /** The number of depth bits */ - protected final int depthBits; - - /** The number of stencil bits */ - protected final int stencilBits; - /** * Constructor for BaseGL. The context is not created at this point; * to create the GL you must call create(). * - * @param colorBits the number of color bits (eg. 16, 24, 32) - * @param alphaBits the number of alpha bits (eg. 0 or 8) - * @param depthBits the number of depth bits (eg. 16 or 24) - * @param stencilBits the number of stencil bits (eg. 0 or 8) * @see #create() */ - public BaseGL(int colorBits, int alphaBits, int depthBits, int stencilBits) { - this.colorBits = colorBits; - this.alphaBits = alphaBits; - this.depthBits = depthBits; - this.stencilBits = stencilBits; + public BaseGL() { } /** @@ -106,7 +86,7 @@ public final void create() throws Exception{ if (created) return; - if (!nCreate(colorBits, alphaBits, depthBits, stencilBits)) + if (!nCreate()) throw new Exception("GL could not be created."); created = true; makeCurrent(); @@ -127,7 +107,7 @@ * @return true if the GL was created successfully * @see org.lwjgl.Display#create(org.lwjgl.DisplayMode, boolean) */ - private native boolean nCreate(int colorBits, int alphaBits, int depthBits, int stencilBits); + private native boolean nCreate(); /** * Destroy the GL context. Does nothing if the GL has not yet been created. Index: CoreGL.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- CoreGL.java 27 Nov 2002 22:34:28 -0000 1.8 +++ CoreGL.java 19 Dec 2002 16:35:35 -0000 1.9 @@ -45,12 +45,8 @@ /** * Constructor for CoreGL. */ - public CoreGL( - int colorBits, - int alphaBits, - int depthBits, - int stencilBits) { - super(colorBits, alphaBits, depthBits, stencilBits); + public CoreGL() { + super(); } public native void accum(int op, float value); Index: GL.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- GL.java 27 Nov 2002 22:34:29 -0000 1.13 +++ GL.java 19 Dec 2002 16:35:35 -0000 1.14 @@ -1535,8 +1535,8 @@ /** * Constructor for GL. */ - public GL(int colorBits, int alphaBits, int depthBits, int stencilBits) { - super(colorBits, alphaBits, depthBits, stencilBits); + public GL() { + super(); } /** |
|
From: Elias N. <eli...@us...> - 2002-12-19 16:35:38
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv17077/src/java/org/lwjgl/test/opengl Modified Files: Game.java Grass.java Log Message: Moved BaseGL constructor parameters to Display Index: Game.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/Game.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/Game.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Game.java 22 Nov 2002 11:24:12 -0000 1.2 +++ Game.java 19 Dec 2002 16:35:35 -0000 1.3 @@ -55,7 +55,7 @@ for (int i = 0; i < modes.length; i ++) System.out.println(modes[i]); // For now let's just pick a mode we're certain to have - Display.create(new DisplayMode(640, 480, 16, 60), true); + Display.create(new DisplayMode(640, 480, 16, 60), 8, 16, 0, true); System.out.println("Created display."); } catch (Exception e) { System.err.println("Failed to create display due to "+e); @@ -63,7 +63,7 @@ } } - public static final GL gl = new GL(16, 0, 16, 8); + public static final GL gl = new GL(); public static final GLU glu = new GLU(gl); static { try { Index: Grass.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/Grass.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/Grass.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Grass.java 21 Nov 2002 15:13:50 -0000 1.1 +++ Grass.java 19 Dec 2002 16:35:35 -0000 1.2 @@ -26,7 +26,7 @@ for (int i = 0; i < modes.length; i ++) System.out.println(modes[i]); // For now let's just pick a mode we're certain to have - Display.create(new DisplayMode(800, 600, 16, 60), false); + Display.create(new DisplayMode(800, 600, 16, 60), 8, 16, 0, false); System.out.println("Created display."); } catch (Exception e) { System.err.println("Failed to create display due to "+e); @@ -34,7 +34,7 @@ } } - public static final GL gl = new GL(16, 0, 16, 8); + public static final GL gl = new GL(); public static final GLU glu = new GLU(gl); static { try { |
|
From: Elias N. <eli...@us...> - 2002-12-19 16:35:38
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1:/tmp/cvs-serv17077/src/java/org/lwjgl Modified Files: Display.java Log Message: Moved BaseGL constructor parameters to Display Index: Display.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Display.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Display.java 18 Oct 2002 23:28:04 -0000 1.7 +++ Display.java 19 Dec 2002 16:35:35 -0000 1.8 @@ -81,12 +81,18 @@ * destroyed. * * @param displayMode a display mode to choose + * @param alpha_bits number of alpha bits required + * @param depth_bits number of depth bits required + * @param stencil_bits number of stencil bits required * @param fullscreen whether to create the display fullscreen * @throws Exception if the display mode could not be set * @see #destroy() */ public static void create( DisplayMode displayMode, + int alpha_bits, + int depth_bits, + int stencil_bits, boolean fullscreen) throws Exception { @@ -97,6 +103,9 @@ displayMode.height, displayMode.bpp, displayMode.freq, + alpha_bits, + depth_bits, + stencil_bits, fullscreen)) throw new Exception("Failed to set display mode to " + displayMode); @@ -115,6 +124,9 @@ int height, int bpp, int freq, + int alpha_bits, + int depth_bits, + int stencil_bits, boolean fullscreen); /** |
|
From: Elias N. <eli...@us...> - 2002-12-19 16:35:38
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv17077/src/native/common Modified Files: org_lwjgl_Display.h org_lwjgl_opengl_BaseGL.h Log Message: Moved BaseGL constructor parameters to Display Index: org_lwjgl_Display.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Display.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_Display.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- org_lwjgl_Display.h 11 Aug 2002 11:49:33 -0000 1.1.1.1 +++ org_lwjgl_Display.h 19 Dec 2002 16:35:35 -0000 1.2 @@ -26,7 +26,7 @@ * Signature: (IIIIZ)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_nCreate - (JNIEnv *, jclass, jint, jint, jint, jint, jboolean); + (JNIEnv *, jclass, jint, jint, jint, jint, jint, jint, jint, jboolean); /* * Class: org_lwjgl_Display Index: org_lwjgl_opengl_BaseGL.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_BaseGL.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_BaseGL.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_opengl_BaseGL.h 25 Nov 2002 17:04:56 -0000 1.2 +++ org_lwjgl_opengl_BaseGL.h 19 Dec 2002 16:35:35 -0000 1.3 @@ -16,7 +16,7 @@ * Signature: (IIII)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_BaseGL_nCreate - (JNIEnv *, jobject, jint, jint, jint, jint); + (JNIEnv *, jobject); /* * Class: org_lwjgl_opengl_BaseGL |