knowledge-database (beta)

Current group: comp.soft-sys.wxwindows

R: RE : wxGLCanvas and mouse picking

R: RE : wxGLCanvas and mouse picking  
Fabio Napodano
From:Fabio Napodano
Subject:R: RE : wxGLCanvas and mouse picking
Date:Fri, 21 Jan 2005 08:34:01 +0000 (UTC)
thanks you all for all the tips:

at the moment I've choosen to make the picking myself.

It works and should be enough for my needs (I'm making a meshing
software for computational applications), but in case I will have
problems, I'll check the OpenGL picking again.

I've already followed what you all said, so there must be some problems
with coordinates.

Well, we will see, thanks again.

-----Messaggio originale-----
Da: Guillaume Ginioux [mailto:gginioux@kineocam.com]
Inviato: gioved=EC 20 gennaio 2005 18.26
A: wx-users@lists.wxwidgets.org
Oggetto: RE : wxGLCanvas and mouse picking




In my application i use wxGLCanvas and on win32, and on UNIX plateforms
and gluPickMatrix works well.
Be carefull with the coordinates that u are using (window or viewport
ones)

Do not forget that you should enter select mode


Sample code >>

glSelectBuffer(128, selectBuffer);

(void) glRenderMode(GL_SELECT);

>>HERE RENDER YOUR 3D SPACE

and then use glRenderMode(GL_RENDER);=20

the last glRenderMode(GL_RENDER) returns the number of object found in
the area created with gluPickMatrix (that should be called in the 3D
space rendering)

Do not forget to use glPushName to identify selected meshes ;)



Guillaume Ginioux
Ing=E9nieur de d=E9veloppement
http://www.kineocam.com
+33 5 61 00 90 64
gginioux@kineocam.com


-----Message d'origine-----
De=A0: Fabio Napodano [mailto:f.napodano@aapsinformatica.com]=20
Envoy=E9=A0: mercredi 19 janvier 2005 12:29
=C0=A0: wx-users@lists.wxwidgets.org
Objet=A0: wxGLCanvas and mouse picking

hello,
has anyone any experience with using OpenGL mouse picking inside a
wxGLCanvas object?

I'm trying to do this since some days with no results.

Looks like I'm making something wrong when setting the picking matrix
with gluPickMatrix, since it does not retrieve hits correctly.

I would like to know at least if some og you has managed to do this,
just to be sure that I'm doing something wrong.

Fabio Napodano
AAPS Informatica.
+39 0825 37783
http://www.aaps.it

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wx-users-help@lists.wxwidgets.org




---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wx-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wx-users-help@lists.wxwidgets.org
   

Copyright © 2006 knowledge-database   -   All rights reserved