Selection(picking) and OpenGL in Blender.

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
russose
Posts: 0
Joined: Mon Apr 19, 2004 5:01 pm

Selection(picking) and OpenGL in Blender.

Post by russose » Mon Nov 07, 2005 10:58 am

Hallo,

I need some information about the selection process in Blender. To port Blender for pocketpc, I use OpenGL ES. But Opengl ES doesn't have functions like glSelectBuffer, gl*Name(), glRenderMode because they considered that applications can easily implement their own "picking mechanism".
Can someone provide me information about how Blender performs picking? I can imagine that Blender implements its own process, ... maybe with pick ray? I don't think that Blender rellied on the eavy "OpenGL picking Mecanism". Am I wrong?

Do someone have so information about that? Is there any documentation on the selection mechanism in Blender?
Or do you thing that all these Opengl functions (glSelectBuffer, gl*Name(), glRenderMode ) are so deeply used by Blender that there will be no other choise as wrapping them?.

Thanks for your help,
Salvatore

PS: For an other exaple, glBitmap is not supported by OpenglES but Blender only use them for font (and update Raster position what is easy to wrapp). Blender supports Texture Font so I didn't needed to fully implement glBitmap :=)

kidb
Posts: 0
Joined: Wed Jul 23, 2003 4:31 pm
Contact:

Re: My opinion

Post by kidb » Mon Nov 28, 2005 6:19 am

pump63506 wrote::o) Well thats exactly what i thought.:lol::lol:
One more casino spammer!

LetterRip
Posts: 0
Joined: Thu Mar 25, 2004 7:03 am

Post by LetterRip » Mon Nov 28, 2005 10:16 am

there is a pick_ray function in blender (grep in source directory) I think picking has been implemented three or four different times in blender. Theeth also implemented one in in transform code, and a few of the selection methods probably have their own also.

LetterRip

russose
Posts: 0
Joined: Mon Apr 19, 2004 5:01 pm

Post by russose » Mon Nov 28, 2005 12:59 pm

Hallo LetterRip,

I will have a look on the code. I already check and find this functions but I don't really focus on that for the moment. I am now improving the "easy" stuf of the wrapper, then I will have to deal with two major problems:
*This selection and picking
*Front and back buffer.... in Opengl ES, only back buffer and it is so low level to access buffer individually that I have no idea for the moment!

But in the next day, I plan to publish a blog summaring my work to able more people to participate if they like (or just better follow the evolution of the project and eventually give some advice :=) ). I will also give some screenshoots but as I said, my blender is not good!

Thanks again for the information,
Salvatore

dmoc
Posts: 14
Joined: Fri Oct 18, 2002 2:21 pm

Post by dmoc » Wed Nov 30, 2005 8:08 am

Don't know if Blender uses this technique but I have in my own sw: redraw pickable elements in different colours (one per element) then just check the colour under the cursor.

russose
Posts: 0
Joined: Mon Apr 19, 2004 5:01 pm

Post by russose » Wed Nov 30, 2005 9:52 am

Hallo dmoc,

I am now wondering if I should emulate the selection picking of opengl or use your other method described in the redbook. But to really go head, I miss global information on how Blender is using the "selection and feedback" information... how Blender is doing selection. I will better study the source code as soon as I will deal with selection.

Salvatore

LetterRip
Posts: 0
Joined: Thu Mar 25, 2004 7:03 am

Post by LetterRip » Wed Nov 30, 2005 6:37 pm

dmoc,

yep blender uses (or used to) use that picking method for the painting modes.

LetterRip

Post Reply