Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (529)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2
1  Java Game APIs & Engines / JOGL Development / Re: Native exception when JFrame is disposed on: 2005-01-07 00:51:13
Doh!

Thanks. I've added my comments and test case to issue #124.

Sean
2  Java Game APIs & Engines / JOGL Development / Re: Native exception when JFrame is disposed on: 2005-01-06 20:54:11
I was going to add it to issue #124 that Rob submitted. However, as an Observer, I cannot add comments to an issue. How do I promote my dev.java.net profile, ssylvis, to comment-submission status?

Sean
3  Java Game APIs & Engines / JOGL Development / Re: Native exception when JFrame is disposed on: 2005-01-06 19:48:56
The exception is thrown by line 177 in X11Context, which is in the destroyImpl method:

Quote

GLX.glXDestroyContext(mostRecentDisplay, context);


The variable 'context' is checked for null, so 'mostRecentDisplay' would seem to be suspect.

Now, when the Animator is run, the GLCanvas display method is called and in turn the invokeGL method of GLContext is called. In this method, after the context is made current, the drawing surface is locked, and the GLEventListeners display methods are called, the current context is cleared (glXMakeCurrent with null values) and the drawing surface unlocked. I don't really know what locking and unlocking the JAWT surface is doing. And I don't know if it, or clearing the current context, will cause an exception if the context is subsequently freed or destroyed.

Anyone know what's going on? Thanks for your help.

Sean
4  Java Game APIs & Engines / JOGL Development / Re: Native exception when JFrame is disposed on: 2005-01-06 17:37:03
Also, I forgot to mention that I'm using Java 1.4.2.

Sean
5  Java Game APIs & Engines / JOGL Development / Re: Native exception when JFrame is disposed on: 2005-01-06 17:34:58
Yeah, it appears to be the same exception. Although mine is deterministic. I just upgraded from Jogl 1.1b04, which didn't exhibit this behavior. I believe the exception is also thrown when the GLCanvas is removed from the parent JFrame.

Sean
6  Java Game APIs & Engines / JOGL Development / Native exception when JFrame is disposed on: 2005-01-06 01:32:09
I am getting an exception in the OpenGL library when I exit my application and dispose the main JFrame. This only happens on my Linux machine, which uses Red Hat 9, an NVidia Quadro4 750 XGL with the latest 66.29 drivers, and the latest 1.1b07 Jogl libraries.

Anyone have any ideas? Thanks for your help.

Sean


The first part of the exception log reads:
Quote

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4DDF3D96
Function=(null)+0x4DDF3D96
Library=/usr/lib/libGL.so.1

NOTE: We are unable to locate the function name symbol for the error
     just occurred. Please refer to release documentation for possible
     reason and solutions.


Current Java thread:
     at net.java.games.jogl.impl.x11.GLX.glXDestroyContext(Native Method)
     at net.java.games.jogl.impl.x11.X11GLContext.destroyImpl(X11GLContext.java:177)
     at net.java.games.jogl.impl.GLContext.destroy(GLContext.java:642)
     - locked <0x44d06d00> (a net.java.games.jogl.impl.x11.X11OnscreenGLContext)
     at net.java.games.jogl.GLCanvas.removeNotify(GLCanvas.java:96)
     at java.awt.Container.removeNotify(Container.java:2068)
     - locked <0x44d07628> (a java.awt.Component$AWTTreeLock)
     at javax.swing.JComponent.removeNotify(JComponent.java:4304)
     at java.awt.Container.removeNotify(Container.java:2068)
     - locked <0x44d07628> (a java.awt.Component$AWTTreeLock)
     at javax.swing.JComponent.removeNotify(JComponent.java:4304)
     at java.awt.Container.removeNotify(Container.java:2068)
     - locked <0x44d07628> (a java.awt.Component$AWTTreeLock)
     at javax.swing.JComponent.removeNotify(JComponent.java:4304)
     at javax.swing.JRootPane.removeNotify(JRootPane.java:691)
     at java.awt.Container.removeNotify(Container.java:2068)
     - locked <0x44d07628> (a java.awt.Component$AWTTreeLock)
     at java.awt.Frame.removeNotify(Frame.java:866)
     - locked <0x44d07628> (a java.awt.Component$AWTTreeLock)
     at java.awt.Window$1DisposeAction.run(Window.java:557)
     at java.awt.Window.dispose(Window.java:570)
     at magix.lib.graphics.jogl.JoglSimpleTest.close(JoglSimpleTest.java:166)
     at magix.lib.graphics.jogl.JoglSimpleTest.access$0(JoglSimpleTest.java:162)
     at magix.lib.graphics.jogl.JoglSimpleTest$1.windowClosing(JoglSimpleTest.java:61)
     at java.awt.Window.processWindowEvent(Window.java:1121)
     at javax.swing.JFrame.processWindowEvent(JFrame.java:266)
     at java.awt.Window.processEvent(Window.java:1079)
     at java.awt.Component.dispatchEventImpl(Component.java:3615)
     at java.awt.Container.dispatchEventImpl(Container.java:1627)
     at java.awt.Window.dispatchEventImpl(Window.java:1606)
     at java.awt.Component.dispatchEvent(Component.java:3477)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)


This test class reproduces the problem for me:
Quote

/*
* JoglSimpleTest.java
*/

import java.awt.event.*;

import javax.swing.*;

import net.java.games.jogl.*;
import net.java.games.jogl.util.*;

/**
* A simple test that Jogl is working.
*
* @author Sean Sylvis
*/
public class JoglSimpleTest implements GLEventListener
{
   protected static final double kFieldOfView = 45;
   protected static final double kNearClip = 0.1;
   protected static final double kFarClip = 200;

   private JFrame mFrame;
   private Animator mAnimator;

   /**
    * Constructs a JoglSimpleTest object.
    */
   public JoglSimpleTest() throws Exception
   {
       // Get GL drawing context
       GLCanvas vCanvas =
           GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());
       vCanvas.addGLEventListener(this);

       // Create AWT frame
       mFrame = getTestFrame();
       mFrame.getContentPane().add(vCanvas);

       // Create animation loop object
       mAnimator = new Animator(vCanvas);

       // Define window-closing event
       mFrame.addWindowListener(new WindowAdapter()
       {
           public void windowClosing(WindowEvent e)
           {
               close();
           }
       });

       mFrame.show();
       mAnimator.start();
   }

   // inherited comment
   public void init(GLDrawable pDrawable)
   {
       // Set gl and glu contexts
       GL gl = pDrawable.getGL();

       printGLInformation(gl);

       // Set color buffer clear color
       gl.glClearColor(1, 1, 1, 0);

       // Default light position is (0,0,1,0) and direction is (0,0,-1)

       // Enable lighting
       gl.glEnable(GL.GL_LIGHTING);
       gl.glEnable(GL.GL_LIGHT0);

       // Enable other parameters
       gl.glEnable(GL.GL_CULL_FACE);
       gl.glEnable(GL.GL_DEPTH_TEST);
   }

   // inherited comment
   public void reshape(
       GLDrawable pDrawable,
       int x,
       int y,
       int pWidth,
       int pHeight)
   {
       GL gl = pDrawable.getGL();
       GLU glu = pDrawable.getGLU();

       gl.glViewport(0, 0, pWidth, pHeight);

       gl.glMatrixMode(GL.GL_PROJECTION);
       gl.glLoadIdentity();
       glu.gluPerspective(
           kFieldOfView,
           (double)pWidth / pHeight,
           kNearClip,
           kFarClip);
   }

   // inherited comment
   public void display(GLDrawable pDrawable)
   {
       GL gl = pDrawable.getGL();
       GLU glu = pDrawable.getGLU();

       // Clear buffers
       gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);

       // Clear model-view matrix
       gl.glMatrixMode(GL.GL_MODELVIEW);
       gl.glLoadIdentity();

       glu.gluLookAt(0, 0, 10, 0, 0, 0, 0, 1, 0);

       GLUT glut = new GLUT();

       // Set current color to red
       final float[] vRed = { 1, 0, 0 };
       gl.glMaterialfv(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE, vRed);

       // Draw red sphere
       gl.glPushMatrix();
       glut.glutSolidSphere(glu, 1.0f, 25, 25);
       gl.glPopMatrix();
   }

   // inherited comment
   public void displayChanged(
       GLDrawable drawable,
       boolean modeChanged,
       boolean deviceChanged)
   {
   }

   /**
    * @return
    */
   protected JFrame getTestFrame() throws Exception
   {
       JFrame vFrame = new JFrame("Simple Jogl Test");
       vFrame.setSize(600, 400);

       return vFrame;
   }

   /**
    *
    */
   private void close()
   {
       mAnimator.stop();

       mFrame.dispose();
   }

   /**
    * @param gl
    */
   protected static final void printGLInformation(GL gl)
   {
       System.out.println("GL_VENDOR: " + gl.glGetString(GL.GL_VENDOR));
       System.out.println("GL_RENDERER: " + gl.glGetString(GL.GL_RENDERER));
       System.out.println("GL_VERSION: " + gl.glGetString(GL.GL_VERSION));
       System.out.println(
           "GL_EXTENSIONS: " + gl.glGetString(GL.GL_EXTENSIONS));
   }

   /**
    * @param pArguments
    */
   public static void main(String[] pArguments) throws Exception
   {
       new JoglSimpleTest();
   }
}
7  Java Game APIs & Engines / Xith3D Forums / Re: Xith rendering in a SWT Canvas? on: 2004-12-08 00:24:00
I looked into this as well, but haven't had any time lately to pursue it. I was unable to get a response from anyone who said they were working on the problem. However, I found this online (top Google result for "opengl swt"):

http://www.realityinteractive.com/software/oss/index.html#SWTOGL

You may find it useful as a starting point.

Sean
8  Java Game APIs & Engines / JOGL Development / Re: jogl applications on: 2004-10-13 20:22:28
Right. I wasn't clear that I was talking about the overlap restriction when combining jogl and swing.

Hmmm...so it might not be as limiting as I thought. Thanks for the response.

Sean
9  Java Game APIs & Engines / JOGL Development / jogl applications on: 2004-10-13 18:25:14
I'm curious as to what sort of applications people have been able to build using jogl. Jogl forces one to use an awt canvas to do the rendering, so one must then also use all awt widgets or some swing widgets provided they are made not-lightweight. Do people find this limiting? Or have people found that it provides for most of their gui needs?

Sean
10  Java Game APIs & Engines / OpenGL Development / Re: SWT binding on: 2004-09-17 18:11:17
so i figured out why nothing was being displayed. the x server couldn't find a visual that matched the attributes i provided (no depth buffer size was specified and the default bit size is zero). so it works if i change

1  
2  
3  
int vAttributes[] = {
    XGL.GLX_RGBA, XGL.GLX_DOUBLEBUFFER,
    0 };

to
1  
2  
3  
4  
int vAttributes[] = {
    XGL.GLX_RGBA, XGL.GLX_DOUBLEBUFFER,
    XGL.GLX_DEPTH_SIZE, 24,
    0 };


sean
11  Java Game APIs & Engines / OpenGL Development / Re: SWT binding on: 2004-09-16 20:45:30
thanks.

Quote

Right after vContext.makeCurrent(), you need to do this:

Code:
org.lwjgl.opengl.GLContext.useContext(vContext);


i'm curious as to what this is doing and why it is necessary to call this before calling opengl commands. it looks like this function checks to see if the opengl library has been loaded and, if not, loads it.

so, in order to call opengl commands, do you need to load the opengl library. can the library be loaded at any point by any thread or only the thread that will be calling the opengl commands? i'm trying to understand, generally, what is necessary in order to use the opengl library -- i.e. a context must be created to draw into using glx/wgl/agl, the context must be made current, ???

thanks for your help.

sean
12  Java Game APIs & Engines / OpenGL Development / SWT binding on: 2004-09-15 22:21:55
i'm trying to use SWT as the rendering context for a GL binding and there were some posts in the archive that suggested lwjgl provided this. however, the latest cvs pull doesn't contain anything.

but maybe someone can help me. i've been trying to modify the bindings i've found here

http://dev.eclipse.org/viewcvs/index.cgi/platform-swt-home/opengl/opengl.html?rev=1.6

and this derivative

http://www.realityinteractive.com/software/oss/

my plan was to get this working with the provided (basic) opengl binding, then modify it to use lwjgl or jogl, but this window system binding is not my cup of tea and going through lwjgl/jogl source today was not illuminating.

i'm able to create a shell and apparently attach an opengl context, but nothing happens when i call opengl commands. what is required to bind the opengl library to a rendering context?

any help would be appreciated.

sean

-------- attached test files -----------

my modified SwtGLContext file:

public class SwtGLContext
{
   private int mContextHandle;
   private Control mControl;
   private int mGcHandle;
   private GCData mGcData;

   private int mXDisplayHandle;
   private int mXDrawableHandle;

   /**
    * Constructs a SwtGLContext object.
    * @param pControl
    */
   public SwtGLContext(Control pControl)
   {
       if (pControl == null)
       {
           SWT.error(SWT.ERROR_NULL_ARGUMENT);
       }

       mControl = pControl;

       mGcData = new GCData();
       mGcHandle = pControl.internal_new_GC(mGcData);
       if (mGcHandle == 0)
       {
           SWT.error(SWT.ERROR_NO_HANDLES);
       }

       mXDisplayHandle = OS.gdk_x11_drawable_get_xdisplay(mGcData.drawable);
       mXDrawableHandle = OS.gdk_x11_drawable_get_xid(mGcData.drawable);

       int vAttributes[] = {
           XGL.GLX_RGBA,
           XGL.GLX_DOUBLEBUFFER,
           0 };

       int vScreen = OS.XDefaultScreen(mXDisplayHandle);
       int vVisualInfoHandle =
           XGL.glXChooseVisual(mXDisplayHandle, vScreen, vAttributes);
       if (vVisualInfoHandle == 0)
       {
           SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
       }

       XVisualInfo vVisualInfo = new XVisualInfo();
       XGL.memmove(vVisualInfo, vVisualInfoHandle, XVisualInfo.sizeof);
       //OS.XFree(vVisualInfoHandle);  // no longer provided


       mContextHandle = XGL.glXCreateContext(mXDisplayHandle, vVisualInfo, 0, true);
       if (mContextHandle == 0)
       {
           SWT.error(SWT.ERROR_NO_HANDLES);
       }
   }

   public void makeCurrent()
   {
       int vCurrent = XGL.glXGetCurrentContext();
       // Check to see if context is already current
       if (vCurrent == mContextHandle)
       {
           return;
       }

       XGL.glXMakeCurrent(mXDisplayHandle, mXDrawableHandle, mContextHandle);
   }

   public void swapBuffers()
   {
       XGL.glXSwapBuffers(mXDisplayHandle, mXDrawableHandle);
   }

   public void dispose()
   {
       // If the context is current, disable
       if (mContextHandle != 0)
       {
           if (XGL.glXGetCurrentContext() == mContextHandle)
           {
               XGL.glXMakeCurrent(mXDisplayHandle, 0, 0);
           }
   
           // Destroy context
           XGL.glXDestroyContext(mXDisplayHandle, mContextHandle);

           mContextHandle = 0;
       }

       if (!mControl.isDisposed())
       {
           // Dispose of GC
           mControl.internal_dispose_GC(mGcHandle, mGcData);
       }

       mControl = null;
       mGcHandle = 0;
       mGcData = null;
   }

}

and the test class:

public class SwtTest
{
   /**
    * Constructs a SwtTest object.
    */
   public SwtTest()
   {
       Display vDisplay = new Display();
       Shell vShell = new Shell(vDisplay);
       vShell.setText("SwtTest");

       // create the OpenGL context with the shell as its parent
       SwtGLContext vContext = new SwtGLContext(vShell);
       vContext.makeCurrent();

       vShell.open();

       while (!vShell.isDisposed())
       {
           if (!vDisplay.readAndDispatch())
           {
               vDisplay.sleep();
           }

           if (vShell.isDisposed())
           {
               break;
           }

           GL.glClearColor(1,1,1,1);
           GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
           GL.glMatrixMode(GL.GL_MODELVIEW);
           GL.glLoadIdentity();
           GL.glBegin(GL.GL_TRIANGLE_STRIP);
           GL.glVertex3d(0, 0, 0);
           GL.glVertex3d(0, 1, 0);
           GL.glVertex3d(1, 0, 0);
           GL.glEnd();
           System.out.println("swap");
           vContext.swapBuffers();
       }

       vContext.dispose();
       vShell.dispose();
       vDisplay.dispose();
   }

   public static void main(String[] pArguments)
   {
       new SwtTest();
   }

}
13  Java Game APIs & Engines / Xith3D Forums / Re: Let there be Fog. on: 2004-07-28 17:45:41
> Also what is the difference between GL_EXP and GL_EXP2 fog
> modes in JOGL?  Currently set ExponentialFog to use GL_EXP
> mode instead of GL_EXP2 mode (and LinearFog is set to
> GL_LINEAR mode).

there are two possible, exponential functions (along with the linear function) that can be used to blend the fog color with the incoming fragment's color. GL_EXP defines the function as f = e ^ -(density * z) and GL_EXP2 as f = e ^ -(density * z) ^ 2. this is all from the "red book."

Sean
14  Java Game APIs & Engines / Xith3D Forums / Re: OK UI package now ported to SWT ! ! ! on: 2004-06-18 20:43:55
I only looked at LWJGL briefly and it looked like it didn't support windowed contexts. I'm writing a visualization application for my company and need to be able to run in a window.

Sean
15  Java Game APIs & Engines / JOGL Development / Re: render and capture offscreen on: 2004-06-18 20:31:31
I'm curious about this as well. I've started looking at APIs for generating animations and the JMF seemed like a good option. I've also seen references for makempeg (interface for mpeg_encode) on Unix and ImageMagick for Windows. Anyone had any experience with any of these APIs?

Sean
16  Java Game APIs & Engines / JOGL Development / Re: Event Thread getting choked... on: 2004-06-18 20:21:22
And if anyone is curious about the high-resolution timer implementation, here's a how-to article for writing one for Windows.

http://www.fawcette.com/archives/premier/mgznarch/javapro/2001/08aug01/km0108/km0108-2.asp

Sean
17  Java Game APIs & Engines / JOGL Development / Re: Questions from a n00b on: 2004-06-18 20:16:11
The best OpenGL resource is the "red book" (the "OpenGL Programming Guide").

The project you are describing is a large undertaking and without any experience in OpenGL you might be better off using the higher-level abstraction that Java3D or Xith3d provides. Even so, I would recommend getting the red book as a resource to help you understand what Java3D or Xith3d is doing for you.

Sean
18  Java Game APIs & Engines / Xith3D Forums / Re: OK UI package now ported to SWT ! ! ! on: 2004-06-17 17:51:20
Has there been any progress on this? I'm interested in possibly using SWT for Jogl.

Sean
19  Java Game APIs & Engines / JOGL Development / Re: problems wit swapBuffers() on: 2004-06-02 23:55:42
No, swapBuffers() should be called outside of the display() method. For example, your rendering loop might look like:

GLCanvas vCanvas = getGLCanvas();
vCanvas.setAutoSwapBufferMode(false);

while (vIsRunning)
{
   vCanvas.display();
   vCanvas.swapBuffers();
}

Sean
20  Java Game APIs & Engines / JOGL Development / Re: jogl and GLU on: 2004-06-01 18:07:07
This would be great (NURBS functionality). I haven't done much JNI coding, but if you need any help, I would be glad to contribute.

Sean
21  Java Game APIs & Engines / JOGL Development / Re: glReadPixels not available on: 2004-05-28 22:41:53
Also, for what it's worth, I haven't had any problems using glReadPixels to capture the framebuffer.

Sean
22  Java Game APIs & Engines / JOGL Development / Re: glReadPixels not available on: 2004-05-28 22:31:44
Strange. I just tested the function isFunctionAvailable(String) and it threw an exception for a couple of common core GL functions. Strange because the functions work fine for me.

I would recommend not using this function to test for core functionality. I didn't even know it existed. I have not had any problems using the core GL functions.

Sean
23  Java Game APIs & Engines / JOGL Development / Re: Saving GLCanvas into a BufferedImage on: 2004-03-23 18:15:44
I think this has been discussed before but this is what I have done:

float[] vPixelBuffer = new float[pWidth * pHeight * 3];

// First read the frame buffer
gl.glReadPixels(
   0,
   0,
   pWidth,
   pHeight,
   GL.GL_RGB,
   GL.GL_FLOAT,
   vPixelBuffer);

BufferedImage vBufferedImage =
   new BufferedImage(pWidth, pHeight,
       BufferedImage.TYPE_INT_RGB);

// Copy pixel data into buffered image
for (int vRow = 0; vRow < pHeight; vRow++)
{
   for (int vColumn = 0; vColumn < pWidth; vColumn++)
   {
       // Get separate color components
       int vIndex = ((vRow * pWidth) + vColumn) * 3;
       int r = (int) (vPixelBuffer[vIndex] * 255);
       int g = (int) (vPixelBuffer[vIndex + 1] * 255);
       int b = (int) (vPixelBuffer[vIndex + 2] * 255);

       /*
        * Set rgb color by shifting components into corresponding
        * integer bits.
        */
       int vRgb = (r << 16) + (g << 8) + b;

       // Set buffer image pixel -- flip y coordinate
       vBufferedImage.setRGB(
           vColumn,
           pHeight - vRow - 1,
           vRgb);
   }
}

// do something with vBufferedImage


Also, I would interested if there was a more efficient way of converting the float pixel buffer into a BufferedImage. This is the first thing I could think of and I have since moved on to more pressing things.

Sean
24  Java Game APIs & Engines / JOGL Development / Nurbs support? on: 2004-03-16 17:08:03
I noticed the GLUnurbs object in the Jogl API, but none of the Nurbs methods. I was wondering if there are any plans to add the Nurbs functionality in the GLU library in the near future.

Sean
25  Java Game APIs & Engines / JOGL Development / Re: jogl portability on: 2004-01-28 21:41:11
I haven't researched the reason, but on Windows Java looks in the PATH, not the LD_LIBRARY_PATH as on Linux, locations for .dlls.

Sean
26  Java Game APIs & Engines / JOGL Development / Re: GLJPanel not working on w2k on: 2004-01-20 18:18:28
Try using the default canvas capabilities

new GLCapabilities();

or play around with the RGBA values to see if something works. Your video card might not support 8-bits each for RGBA.

It's also a little curious that the offscreen context

net.java.games.jogl.impl.windows.WindowsOffscreenGLContext.makeCurren
t(WindowsOffscreenGLContext.java:116)

is invoked when it appears you are creating an onscreen buffer. Maybe someone else has some insight on this.

Sean
27  Java Game APIs & Engines / JOGL Development / Re: How to create a movie from an OpenGl window? on: 2003-11-25 17:55:16
No, I wasn't using sound in my application, so didn't try to capture any. One thing at a time Smiley

Sean
28  Java Game APIs & Engines / JOGL Development / Re: How to create a movie from an OpenGl window? on: 2003-11-17 20:41:17
I used the free mpeg_encode from Berkeley, which converts a series of image files into a mpeg movie file. The encoder supposedly accepts a variety of image formats and is generally pretty powerful. I was eventually able to create mpeg files from my Java application from a series of png files (wasn't able to get it to accept jpegs for some reason).

However, this is not a super fast method of capturing video, especially in realtime. I have to keep the resolution small and the frame rates of my application noticeably slow down.

Next I am going to look at the Java Media Framework, which you may want to consider, to see if I can get better performance as well as access to some different recording formats.

Sean
29  Java Game APIs & Engines / JOGL Development / Re: GLException: Surface already unlocked on: 2003-11-07 17:57:05
Not sure if this is the case for you, but I got this exception when my Animator was started before the enclosing Frame was shown. This would happen on WinXP but not on Linux.

Sean
30  Java Game APIs & Engines / JOGL Development / Re: [newbie alert] 3D rendering on top of canvas on: 2003-09-20 00:07:43

There are quite a few demos out there on using the stencil buffer to do things like create reflections or shadow volumes. Some good resources are flipcode.com, gamedev.net, and gamasutra.com. Here's a link from google that describes using stenciling to create a reflection...

http://www.opengl.org/developers/code/mjktips/Reflect.html

The concept should be the same for creating a rear-view mirror: instead of using the floor as the reflection-area, you would define a polygon that represents the area of the screen that you want to draw into; and you wouldn't just draw a reflection of the current scene, but rather the scene from the rear of the car.

Sean
Pages: [1] 2
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

ctomni231 (31 views)
2014-07-18 06:55:21

Zero Volt (27 views)
2014-07-17 23:47:54

danieldean (23 views)
2014-07-17 23:41:23

MustardPeter (24 views)
2014-07-16 23:30:00

Cero (39 views)
2014-07-16 00:42:17

Riven (41 views)
2014-07-14 18:02:53

OpenGLShaders (28 views)
2014-07-14 16:23:47

Riven (28 views)
2014-07-14 11:51:35

quew8 (25 views)
2014-07-13 13:57:52

SHC (61 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!