From: <jen...@ag...> - 2003-01-06 18:50:19
|
----- Original Message ----- =46rom: "Nicolas PIEDELOUP" <NPI...@kl...> To: <gl4...@li...> Sent: Monday, January 06, 2003 10:52 AM Subject: RE: [gl4java-usergroup] problems with selecting/picking obje= cts > could you try the demo of picking ? > http://www.jausoft.com/Files/Java/1.1.X/GL4Java/demos/MiscDemos/selec= t.html > Yeah, this is the demo i ment in my mail. > I have heard there was a bug on IE jvm, but not in Netscape. I'm only working with applications ( standalone programs ). So i get = this problem with the original Sun JVM. > -----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 object= s > > > hi to all & a happy new year, > > i have some troubles to get my picking&selecting routine working. t= o show > you the problem i have changed the "select"-demo form MiscDemos shi= pped 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 emp= ty but > also sometimes the correct values. > I deleted in this demo in method DoSelect(...) the gl.glPush(~0); a= nd 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 > > > ------------------------------------------------------- > 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 |