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) |
2
(2) |
3
(2) |
4
|
5
(2) |
|
6
(5) |
7
(22) |
8
(4) |
9
(5) |
10
(6) |
11
(5) |
12
(7) |
|
13
(11) |
14
(1) |
15
(1) |
16
|
17
|
18
(3) |
19
(1) |
|
20
(10) |
21
(3) |
22
(7) |
23
|
24
(2) |
25
(2) |
26
(2) |
|
27
(1) |
28
(1) |
29
(4) |
30
(9) |
|
|
|
|
From: <eli...@us...> - 2008-04-22 21:26:47
|
Revision: 3042
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3042&view=rev
Author: elias_naur
Date: 2008-04-22 14:26:39 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
Fixed KeyboardTest
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/test/input/KeyboardTest.java
Modified: trunk/LWJGL/src/java/org/lwjgl/test/input/KeyboardTest.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/input/KeyboardTest.java 2008-04-22 20:32:32 UTC (rev 3041)
+++ trunk/LWJGL/src/java/org/lwjgl/test/input/KeyboardTest.java 2008-04-22 21:26:39 UTC (rev 3042)
@@ -36,6 +36,7 @@
import org.lwjgl.opengl.DisplayMode;
import org.lwjgl.opengl.GL11;
import org.lwjgl.util.vector.Vector2f;
+import org.lwjgl.util.glu.GLU;
/**
* <br>
@@ -104,7 +105,13 @@
}
private void initializeOpenGL() {
- GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+ GL11.glMatrixMode(GL11.GL_PROJECTION);
+ GL11.glLoadIdentity();
+ GLU.gluOrtho2D(0, Display.getDisplayMode().getWidth(), 0, Display.getDisplayMode().getHeight());
+ GL11.glMatrixMode(GL11.GL_MODELVIEW);
+ GL11.glLoadIdentity();
+ GL11.glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight());
+ GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
}
public void executeTest() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2008-04-22 20:49:33
|
Revision: 3041
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3041&view=rev
Author: kappa1
Date: 2008-04-22 13:32:32 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
added check to prevent multiple applet instances starting.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2008-04-22 19:59:47 UTC (rev 3040)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2008-04-22 20:32:32 UTC (rev 3041)
@@ -273,22 +273,27 @@
* @see java.applet.Applet#start()
*/
public void start() {
- if(loaderThread == null && !fatalError) {
- loaderThread = new Thread(this);
- loaderThread.setName("AppletLoader.loaderThread");
- loaderThread.start();
-
- animationThread = new Thread() {
- public void run() {
- while(loaderThread != null) {
- repaint();
- AppletLoader.this.sleep(100);
+ if (lwjglApplet != null) {
+ lwjglApplet.start();
+ }
+ else {
+ if(loaderThread == null && !fatalError) {
+ loaderThread = new Thread(this);
+ loaderThread.setName("AppletLoader.loaderThread");
+ loaderThread.start();
+
+ animationThread = new Thread() {
+ public void run() {
+ while(loaderThread != null) {
+ repaint();
+ AppletLoader.this.sleep(100);
+ }
+ animationThread = null;
}
- animationThread = null;
- }
- };
- animationThread.setName("AppletLoader.animationthread");
- animationThread.start();
+ };
+ animationThread.setName("AppletLoader.animationthread");
+ animationThread.start();
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2008-04-22 19:59:53
|
Revision: 3040
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3040&view=rev
Author: elias_naur
Date: 2008-04-22 12:59:47 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
Mac OS X: Removed reflection from MacOSXSysImplementation
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java
Modified: trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2008-04-22 18:09:45 UTC (rev 3039)
+++ trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2008-04-22 19:59:47 UTC (rev 3040)
@@ -36,6 +36,8 @@
import java.security.PrivilegedExceptionAction;
import java.awt.Toolkit;
+import com.apple.eio.FileManager;
+
/**
*
* @author elias_naur <eli...@us...>
@@ -50,18 +52,7 @@
public boolean openURL(String url) {
try {
- Method openURL_method = (Method)AccessController.doPrivileged(new PrivilegedExceptionAction() {
- public Object run() throws Exception {
- try {
- Class com_apple_eio_FileManager = Class.forName("com.apple.eio.FileManager");
- return com_apple_eio_FileManager.getMethod("openURL", new Class[]{String.class});
- } catch (Exception e) {
- LWJGLUtil.log("Exception occurred while trying to invoke browser: " + e);
- return null;
- }
- }
- });
- openURL_method.invoke(null, new Object[]{url});
+ FileManager.openURL(url);
return true;
} catch (Exception e) {
LWJGLUtil.log("Exception occurred while trying to invoke browser: " + e);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2008-04-22 18:09:48
|
Revision: 3039
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3039&view=rev
Author: elias_naur
Date: 2008-04-22 11:09:45 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
Added GearsApplet test
Modified Paths:
--------------
trunk/LWJGL/applet/appletloader.html
Added Paths:
-----------
trunk/LWJGL/src/java/org/lwjgl/test/applet/GearsApplet.java
Modified: trunk/LWJGL/applet/appletloader.html
===================================================================
--- trunk/LWJGL/applet/appletloader.html 2008-04-22 17:56:41 UTC (rev 3038)
+++ trunk/LWJGL/applet/appletloader.html 2008-04-22 18:09:45 UTC (rev 3039)
@@ -13,7 +13,7 @@
<param name="al_title" value="appletloadertest">
<!-- Main Applet Class -->
- <param name="al_main" value="org.lwjgl.test.applet.AppletLoaderTest">
+ <param name="al_main" value="org.lwjgl.test.applet.GearsApplet">
<!-- logo to paint while loading, will be centered -->
<param name="al_logo" value="appletlogo.png">
@@ -63,4 +63,4 @@
</p>
</body>
-</html>
\ No newline at end of file
+</html>
Added: trunk/LWJGL/src/java/org/lwjgl/test/applet/GearsApplet.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/applet/GearsApplet.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/test/applet/GearsApplet.java 2008-04-22 18:09:45 UTC (rev 3039)
@@ -0,0 +1,340 @@
+package org.lwjgl.test.applet;
+
+import java.applet.Applet;
+import java.awt.BorderLayout;
+import java.awt.Canvas;
+import java.nio.FloatBuffer;
+import org.lwjgl.BufferUtils;
+import org.lwjgl.LWJGLException;
+import org.lwjgl.opengl.ARBTransposeMatrix;
+import org.lwjgl.opengl.Display;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GLContext;
+
+public class GearsApplet extends Applet {
+
+ Canvas display_parent;
+ Thread gameThread;
+
+ boolean running = false;
+
+ private float view_rotx = 20.0f;
+ private float view_roty = 30.0f;
+ private float view_rotz = 0.0f;
+ private int gear1;
+ private int gear2;
+ private int gear3;
+ private float angle = 0.0f;
+
+
+ boolean keyDown = false;
+
+ public void destroy() {
+ remove(display_parent);
+ super.destroy();
+ System.out.println("Clear up");
+ }
+
+ private void destroyLWJGL() {
+ stopApplet();
+ try {
+ gameThread.join();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * @see java.applet.Applet#start()
+ */
+ public void start() {
+ gameThread = new Thread() {
+ public void run() {
+ running = true;
+ try {
+ System.out.println("display_parent.isDisplayable() = " + display_parent.isDisplayable());
+ Display.setParent(display_parent);
+ //Display.setVSyncEnabled(true);
+ Display.create();
+ initGL();
+ } catch (LWJGLException e) {
+ e.printStackTrace();
+ }
+ gameLoop();
+ }
+ };
+ gameThread.start();
+ }
+
+ public void stop() {
+ }
+
+ public void stopApplet() {
+ running = false;
+ }
+
+ public void init() {
+ setLayout(new BorderLayout());
+ try {
+ display_parent = new Canvas() {
+ public final void removeNotify() {
+ destroyLWJGL();
+ super.removeNotify();
+ }
+ };
+ display_parent.setSize(getWidth(),getHeight());
+ add(display_parent);
+ display_parent.setFocusable(true);
+ display_parent.requestFocus();
+ display_parent.setIgnoreRepaint(true);
+ //setResizable(true);
+ setVisible(true);
+ } catch (Exception e) {
+ System.err.println(e);
+ throw new RuntimeException("Unable to create display");
+ }
+ }
+
+ public void gameLoop() {
+ long startTime = System.currentTimeMillis() + 5000;
+ long fps = 0;
+
+ while(running) {
+ angle += 2.0f;
+
+ // draw the gears
+ drawLoop();
+
+ Display.update();
+
+ if (startTime > System.currentTimeMillis()) {
+ fps++;
+ } else {
+ long timeUsed = 5000 + (startTime - System.currentTimeMillis());
+ startTime = System.currentTimeMillis() + 5000;
+/* System.out.println(fps + " frames 2 in " + (float) (timeUsed / 1000f) + " seconds = "
+ + (fps / (timeUsed / 1000f)));*/
+ fps = 0;
+ }
+
+ if (Keyboard.isKeyDown(Keyboard.KEY_LEFT))
+ view_roty += .1f;
+ else if (Keyboard.isKeyDown(Keyboard.KEY_RIGHT))
+ view_roty -= .1f;
+
+ if (Keyboard.isKeyDown(Keyboard.KEY_F)) {
+ keyDown = true;
+ }
+
+ // F Key Pressed (i.e. released)
+ if (keyDown && !Keyboard.isKeyDown(Keyboard.KEY_F)) {
+ keyDown = false;
+
+ try {
+ if (Display.isFullscreen()) {
+ Display.setFullscreen(false);
+ }
+ else {
+ Display.setFullscreen(true);
+ }
+ } catch (LWJGLException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ Display.destroy();
+ }
+
+ public void drawLoop() {
+ GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
+ GL11.glPushMatrix();
+ GL11.glRotatef(view_rotx, 1.0f, 0.0f, 0.0f);
+ GL11.glRotatef(view_roty, 0.0f, 1.0f, 0.0f);
+ GL11.glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(-3.0f, -2.0f, 0.0f);
+ GL11.glRotatef(angle, 0.0f, 0.0f, 1.0f);
+ GL11.glCallList(gear1);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(3.1f, -2.0f, 0.0f);
+ GL11.glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f);
+ GL11.glCallList(gear2);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(-3.1f, 4.2f, 0.0f);
+ GL11.glRotatef(-2.0f * angle - 25.0f, 0.0f, 0.0f, 1.0f);
+ GL11.glCallList(gear3);
+ GL11.glPopMatrix();
+ GL11.glPopMatrix();
+ }
+
+ protected void initGL() {
+ try {
+ // setup ogl
+ FloatBuffer pos = FloatBuffer.wrap(new float[] { 5.0f, 5.0f, 10.0f, 0.0f});
+ FloatBuffer red = FloatBuffer.wrap(new float[] { 0.8f, 0.1f, 0.0f, 1.0f});
+ FloatBuffer green = FloatBuffer.wrap(new float[] { 0.0f, 0.8f, 0.2f, 1.0f});
+ FloatBuffer blue = FloatBuffer.wrap(new float[] { 0.2f, 0.2f, 1.0f, 1.0f});
+ GL11.glLight(GL11.GL_LIGHT0, GL11.GL_POSITION, pos);
+ GL11.glEnable(GL11.GL_CULL_FACE);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL11.GL_LIGHT0);
+ GL11.glEnable(GL11.GL_DEPTH_TEST);
+
+ /* make the gears */
+ gear1 = GL11.glGenLists(1);
+ GL11.glNewList(gear1, GL11.GL_COMPILE);
+ GL11.glMaterial(GL11.GL_FRONT, GL11.GL_AMBIENT_AND_DIFFUSE, red);
+ gear(1.0f, 4.0f, 1.0f, 20, 0.7f);
+ GL11.glEndList();
+ gear2 = GL11.glGenLists(1);
+ GL11.glNewList(gear2, GL11.GL_COMPILE);
+ GL11.glMaterial(GL11.GL_FRONT, GL11.GL_AMBIENT_AND_DIFFUSE, green);
+ gear(0.5f, 2.0f, 2.0f, 10, 0.7f);
+ GL11.glEndList();
+ gear3 = GL11.glGenLists(1);
+ GL11.glNewList(gear3, GL11.GL_COMPILE);
+ GL11.glMaterial(GL11.GL_FRONT, GL11.GL_AMBIENT_AND_DIFFUSE, blue);
+ gear(1.3f, 2.0f, 0.5f, 10, 0.7f);
+ GL11.glEndList();
+ GL11.glEnable(GL11.GL_NORMALIZE);
+ GL11.glMatrixMode(GL11.GL_PROJECTION);
+/* System.err.println("GL_VENDOR: " + GL11.glGetString(GL11.GL_VENDOR));
+ System.err.println("GL_RENDERER: " + GL11.glGetString(GL11.GL_RENDERER));
+ System.err.println("GL_VERSION: " + GL11.glGetString(GL11.GL_VERSION));
+ System.err.println();
+ System.err.println("glLoadTransposeMatrixfARB() supported: " + GLContext.getCapabilities().GL_ARB_transpose_matrix);*/
+ if (!GLContext.getCapabilities().GL_ARB_transpose_matrix) {
+ // --- not using extensions
+ GL11.glLoadIdentity();
+ } else {
+ // --- using extensions
+ final FloatBuffer identityTranspose = BufferUtils.createFloatBuffer(16).put(
+ new float[] { 1, 0, 0, 0, 0, 1, 0, 0,
+ 0, 0, 1, 0, 0, 0, 0, 1});
+ identityTranspose.flip();
+ ARBTransposeMatrix.glLoadTransposeMatrixARB(identityTranspose);
+ }
+ float h = (float) 300 / (float) 300;
+ GL11.glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f);
+ GL11.glMatrixMode(GL11.GL_MODELVIEW);
+ GL11.glLoadIdentity();
+ GL11.glTranslatef(0.0f, 0.0f, -40.0f);
+ } catch (Exception e) {
+ System.err.println(e);
+ stopApplet();
+ }
+ }
+
+ /**
+ * Draw a gear wheel. You'll probably want to call this function when
+ * building a display list since we do a lot of trig here.
+ *
+ * @param inner_radius radius of hole at center
+ * @param outer_radius radius at center of teeth
+ * @param width width of gear
+ * @param teeth number of teeth
+ * @param tooth_depth depth of tooth
+ */
+ private void gear(float inner_radius, float outer_radius, float width, int teeth, float tooth_depth) {
+ int i;
+ float r0, r1, r2;
+ float angle, da;
+ float u, v, len;
+
+ r0 = inner_radius;
+ r1 = outer_radius - tooth_depth / 2.0f;
+ r2 = outer_radius + tooth_depth / 2.0f;
+ da = 2.0f * (float) Math.PI / teeth / 4.0f;
+ GL11.glShadeModel(GL11.GL_FLAT);
+ GL11.glNormal3f(0.0f, 0.0f, 1.0f);
+ /* draw front face */
+ GL11.glBegin(GL11.GL_QUAD_STRIP);
+ for (i = 0; i <= teeth; i++) {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f);
+ GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f);
+ if (i < teeth) {
+ GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f);
+ GL11.glVertex3f(r1 * (float) Math.cos(angle + 3.0f * da), r1 * (float) Math.sin(angle + 3.0f * da),
+ width * 0.5f);
+ }
+ }
+ GL11.glEnd();
+
+ /* draw front sides of teeth */
+ GL11.glBegin(GL11.GL_QUADS);
+ for (i = 0; i < teeth; i++) {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f);
+ GL11.glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f);
+ GL11.glVertex3f(r2 * (float) Math.cos(angle + 2.0f * da), r2 * (float) Math.sin(angle + 2.0f * da), width * 0.5f);
+ GL11.glVertex3f(r1 * (float) Math.cos(angle + 3.0f * da), r1 * (float) Math.sin(angle + 3.0f * da), width * 0.5f);
+ }
+ GL11.glEnd();
+
+ /* draw back face */
+ GL11.glBegin(GL11.GL_QUAD_STRIP);
+ for (i = 0; i <= teeth; i++) {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f);
+ GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f);
+ GL11.glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f);
+ GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f);
+ }
+ GL11.glEnd();
+
+ /* draw back sides of teeth */
+ GL11.glBegin(GL11.GL_QUADS);
+ for (i = 0; i < teeth; i++) {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ GL11.glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f);
+ GL11.glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), -width * 0.5f);
+ GL11.glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f);
+ GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f);
+ }
+ GL11.glEnd();
+
+ /* draw outward faces of teeth */
+ GL11.glBegin(GL11.GL_QUAD_STRIP);
+ for (i = 0; i < teeth; i++) {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f);
+ GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f);
+ u = r2 * (float) Math.cos(angle + da) - r1 * (float) Math.cos(angle);
+ v = r2 * (float) Math.sin(angle + da) - r1 * (float) Math.sin(angle);
+ len = (float) Math.sqrt(u * u + v * v);
+ u /= len;
+ v /= len;
+ GL11.glNormal3f(v, -u, 0.0f);
+ GL11.glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f);
+ GL11.glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f);
+ GL11.glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f);
+ GL11.glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), width * 0.5f);
+ GL11.glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), -width * 0.5f);
+ u = r1 * (float) Math.cos(angle + 3 * da) - r2 * (float) Math.cos(angle + 2 * da);
+ v = r1 * (float) Math.sin(angle + 3 * da) - r2 * (float) Math.sin(angle + 2 * da);
+ GL11.glNormal3f(v, -u, 0.0f);
+ GL11.glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), width * 0.5f);
+ GL11.glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f);
+ GL11.glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f);
+ }
+ GL11.glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), width * 0.5f);
+ GL11.glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), -width * 0.5f);
+ GL11.glEnd();
+
+ GL11.glShadeModel(GL11.GL_SMOOTH);
+ /* draw inside radius cylinder */
+ GL11.glBegin(GL11.GL_QUAD_STRIP);
+ for (i = 0; i <= teeth; i++) {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ GL11.glNormal3f(-(float) Math.cos(angle), -(float) Math.sin(angle), 0.0f);
+ GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f);
+ GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f);
+ }
+ GL11.glEnd();
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2008-04-22 17:56:51
|
Revision: 3038
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3038&view=rev
Author: spasi
Date: 2008-04-22 10:56:41 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
Added GL_LAYER_NV
Modified Paths:
--------------
trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_transform_feedback.java
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_transform_feedback.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_transform_feedback.java 2008-04-22 16:52:16 UTC (rev 3037)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_transform_feedback.java 2008-04-22 17:56:41 UTC (rev 3038)
@@ -110,6 +110,7 @@
int GL_VERTEX_ID_NV = 0x8C7B;
int GL_PRIMITIVE_ID_NV = 0x8C7C;
int GL_GENERIC_ATTRIB_NV = 0x8C7D;
+ int GL_LAYER_NV = 0x8DAA;
void glBindBufferRangeNV(@GLenum int target, @GLuint int index, @GLuint int buffer, @GLintptr long offset, @GLsizeiptr long size);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2008-04-22 16:52:24
|
Revision: 3037
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3037&view=rev
Author: elias_naur
Date: 2008-04-22 09:52:16 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
Added ApplejavaExtensions.jar to be able to use apple extensions without reflection
Modified Paths:
--------------
trunk/LWJGL/build.xml
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java
Added Paths:
-----------
trunk/LWJGL/libs/AppleJavaExtensions.jar
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2008-04-21 20:53:18 UTC (rev 3036)
+++ trunk/LWJGL/build.xml 2008-04-22 16:52:16 UTC (rev 3037)
@@ -224,7 +224,7 @@
<!-- Compiles the Java source code -->
<target name="compile" description="Compiles the java source code" depends="-initialize">
- <javac debug="yes" destdir="${lwjgl.bin}" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar" taskname="core">
+ <javac debug="yes" destdir="${lwjgl.bin}" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/AppleJavaExtensions.jar" taskname="core">
<src path="${lwjgl.src}/java/"/>
<src path="${lwjgl.src}/generated/"/>
<include name="org/lwjgl/*.java"/>
Added: trunk/LWJGL/libs/AppleJavaExtensions.jar
===================================================================
(Binary files differ)
Property changes on: trunk/LWJGL/libs/AppleJavaExtensions.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java 2008-04-21 20:53:18 UTC (rev 3036)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java 2008-04-22 16:52:16 UTC (rev 3037)
@@ -57,6 +57,8 @@
import org.lwjgl.LWJGLException;
import org.lwjgl.LWJGLUtil;
+import com.apple.eawt.*;
+
final class MacOSXDisplay implements DisplayImplementation {
private static final int PBUFFER_HANDLE_SIZE = 24;
private static final int GAMMA_LENGTH = 256;
@@ -73,7 +75,24 @@
private boolean close_requested;
MacOSXDisplay() {
- new MacOSXApplicationListener();
+ try {
+ AccessController.doPrivileged(new PrivilegedExceptionAction() {
+ public Object run() throws Exception {
+ Application.getApplication().addApplicationListener(new ApplicationAdapter() {
+ public final void handleQuit(ApplicationEvent event) {
+ doHandleQuit();
+ }
+ });
+ return null;
+ }
+ });
+ } catch (Throwable e) {
+ /**
+ * In an applet environment, referencing com.apple.eawt.Application can fail with
+ * a native exception. So log any exceptions instead of re-throwing.
+ */
+ LWJGLUtil.log("Failed to register quit handler: " + e.getMessage());
+ }
}
public void createWindow(DisplayMode mode, boolean fullscreen, Canvas parent, int x, int y) throws LWJGLException {
@@ -96,7 +115,7 @@
}
}
- private void handleQuit() {
+ private void doHandleQuit() {
synchronized (this) {
close_requested = true;
}
@@ -407,51 +426,6 @@
return 0;
}
- /**
- * This class captures com.apple.eawt.ApplicationEvents through reflection
- * to enable compilation on other platforms than Mac OS X
- */
- private class MacOSXApplicationListener implements InvocationHandler {
- private final Method handleQuit;
-
- public MacOSXApplicationListener() {
- Method m = null;
- try {
- m = (Method)AccessController.doPrivileged(new PrivilegedExceptionAction() {
- public Object run() throws Exception {
- /* Get the com.apple.eawt.Application class */
- Class com_apple_eawt_Application = Class.forName("com.apple.eawt.Application");
- /* Call the static Application.getApplication() method */
- Object application = com_apple_eawt_Application.getMethod("getApplication", null).invoke(null, null);
- /* Create a proxy implementing com.apple.eawt.ApplicationListener */
- Class com_apple_eawt_ApplicationListener = Class.forName("com.apple.eawt.ApplicationListener");
- Object listener_proxy = Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {com_apple_eawt_ApplicationListener}, MacOSXApplicationListener.this);
- /* Invoke the method application.addApplicationListener(proxy) */
- Method addApplicationListener = com_apple_eawt_Application.getMethod("addApplicationListener", new Class[]{com_apple_eawt_ApplicationListener});
- addApplicationListener.invoke(application, new Object[]{listener_proxy});
- /* Finally, get the handleQuit method we want to react to */
- Class com_apple_eawt_ApplicationEvent = Class.forName("com.apple.eawt.ApplicationEvent");
- return com_apple_eawt_ApplicationListener.getMethod("handleQuit", new Class[]{com_apple_eawt_ApplicationEvent});
- }
- });
- } catch (Throwable e) {
- /**
- * In an applet environment, referencing com.apple.eawt.Application can fail with
- * a native exception. So log any exceptions instead of re-throwing.
- */
- LWJGLUtil.log("Failed to register quit handler: " + e.getMessage());
-// throw new RuntimeException(e);
- }
- handleQuit = m;
- }
-
- public Object invoke(Object proxy, Method method, Object[] args) {
- if (method.equals(handleQuit))
- handleQuit();
- return null;
- }
- }
-
public boolean isBufferLost(PeerInfo handle) {
return false;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|