From: Nicolas P. <NPI...@kl...> - 2003-01-06 09:47:36
|
could you try the demo of picking ? http://www.jausoft.com/Files/Java/1.1.X/GL4Java/demos/MiscDemos/select.h= tml I have heard there was a bug on IE jvm, but not in Netscape. happy new year. -----Original Message----- From: Jens G=FCnther [mailto:jen...@ag...] Sent: Thursday, January 02, 2003 1:53 PM To: gl4...@li... Subject: [gl4java-usergroup] problems with selecting/picking objects hi to all & a happy new year, i have some troubles to get my picking&selecting routine working. to = show you the problem i have changed the "select"-demo form MiscDemos shipped = with the GL4Java demos. the original Render method: public void Render( int mode ) { int i; for(i=3D0; i < objectCount; i++) { if(mode =3D=3D GL_SELECT ) { gl.glLoadName(i); } // ... drawing object[i] ... } } so far so good, this works fine. the changed method: public void Render( int mode ) { int i; for( i=3D0; i < objectsCount; i++ ) { if(mode =3D=3D GL_SELECT ) { gl.glPushName(i); } // ... drawing object[i]; if( mode =3D=3D GL_SELECT ) { gl.glPopName(); } } } and this won't work ( Java 1.4.0 & GL4Java 2.8.2.0 ). The = glRenderMode(...) correctly returns the number of hits ( 0|1) but the selectBuffer is = empty SOMETIMES ( while a hit is returned )! furthermore clicks ( random = number ) on the same coordinates will mostly return 1 hit / selectBuffer empty = but also sometimes the correct values. I deleted in this demo in method DoSelect(...) the gl.glPush(~0); and = the demo works fine but in my project the effect still remains. any ideas ? thanks, Jens ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ gl4java-usergroup mailing list gl4...@li... https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup |