Posted by raven_hex
on January 13, 2009 at 7:10 PM PST
I am new to jogl and have been doing tutorials from NeHe and I am able to render/load a texture on a JFrame. Problem is, I am unable to load 2 textures on a JFrame to make them look "layered". Below is a small portion of my codes:
JFrame frame = new JFrame("VVI Control Panel");<br />
GLCapabilities caps = new GLCapabilities();<br />
GLCanvas canvas = new GLCanvas(caps);<br />
canvas.addGLEventListener(new panel());<br />
canvas.addGLEventListener(new CompassFrame());<br />
frame.setSize(800, 600);<br />
final Animator animator = new Animator(canvas);<br />
The first GLEventListener is set to a size of 800,600 and should appear at the bottom of both texture.
The second GLEventListener is set to a size of 200,200 and should appear at the top of both texture to achieve a layered effect.
Yet, the second GLEventListener will always take the size of 800,600 (even though I've set it to 200,200 in the class file) and appears on the top of both textures.
Any help will be appreciated as I am stuck at this bottle neck for the past week...
Message was edited by: raven_hex