From: Ricardo <rio...@ya...> - 2001-12-18 09:20:37
|
-----Mensaje original----- De: gl4...@li... [mailto:gl4...@li...]En nombre de Kenneth B. Russell Enviado el: lunes, 17 de diciembre de 2001 16:57 Para: Ricardo CC: gl4...@li... Asunto: Re: [gl4java-usergroup] DEPTH BUFFER > I have a class that extends GLCanvas, and I have the functions related with > tha canvas, > preinit, init, display, ... > > With GLDrawableFactory I can create a GLCanvas, but how can I use the > functions of my class, > that extends GLCanvas, there are any examples of use? You put that functionality into a class implementing GLEventListener instead and set the GLEventListener of the GLDrawable. See demos/new-style.txt and demos/MiscDemos/gears.java for an example. I have used: Dimension d = getSize(); GLCapabilities caps = new GLCapabilities(); caps.setStereo(false); caps.setDoubleBuffered(true); caps.setDepthBits(32); canvas = GLDrawableFactory.getFactory().createGLAnimCanvas(caps, d.width, d.height); cnv = new AddRemove(canvas); canvas.addGLEventListener(cnv); but when I read depth value, it's says me that's 16. The aplication works well, no error, but with the same problem. AddRemove implements GLEventListener _______________________________________________ gl4java-usergroup mailing list gl4...@li... https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |