Noob question - Color pick selection - Buffer creation

Jorge <[email protected]> Thu, 10 Mar 2016 12:46:26 +0100
Newsgroups gmane.comp.python.opengl.user
Message-ID <CAO3JiJik06X1WOGf7Nbj1jgk8icTLviHvoS9-bmunszTU33x2Q@mail.gmail.com>
--===============2617611701544458693==
Content-Type: multipart/alternative; boundary=047d7b3a8ac076341a052db05eab

--047d7b3a8ac076341a052db05eab
Content-Type: text/plain; charset=UTF-8

Hi.

I am really new to opengl. I am using pyqt tutorials and pyopengl to show
objects like they say here:
https://github.com/Werkov/PyQt4/blob/master/examples/opengl/hellogl.py

However I have been looking for a way to pick 3d objects. I have seen that
the way is creating an additional buffer that is not showed and select from
this buffer based on a color assigned to each object. This is the theory
however I can't manage to create or find a basic example.

In the example I am using it is using GL.glCallList(self.object) to
represent the object based on the list of instrucction programmed before. I
now that in the def paintGL(self): I must repaint the buffer and the color
pick selection buffer.

My question is:

Could you give me a clue how to create the secondary buffer?

Kind regards and sorry for this basic question.

Jorge

--047d7b3a8ac076341a052db05eab
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div><div><div>Hi.<br><br></div>I am really=
 new to opengl. I am using pyqt tutorials and pyopengl to show objects like=
 they say here: <a href=3D"https://github.com/Werkov/PyQt4/blob/master/exam=
ples/opengl/hellogl.py">https://github.com/Werkov/PyQt4/blob/master/example=
s/opengl/hellogl.py</a><br><br></div>However I have been looking for a way =
to pick 3d objects. I have seen that the way is creating an additional buff=
er that is not showed and select from this buffer based on a color assigned=
 to each object. This is the theory however I can&#39;t manage to create or=
 find a basic example. <br><br></div>In the example I am using it is using =
  <span class=3D"">GL</span>.glCallList(<span class=3D"">self</span>.object=
) to represent the object based on the list of instrucction programmed befo=
re. I now that in the   <span class=3D"">def</span> <span class=3D"">paintG=
L</span>(<span class=3D""><span class=3D"">self</span></span>): I must repa=
int the buffer and the color pick selection buffer.<br><br></div>My questio=
n is: <br><br></div>Could you give me a clue how to create the secondary bu=
ffer?<br><br></div>Kind regards and sorry for this basic question.<br><div>=
<div><div><div><div><div><br clear=3D"all"><div><div><div><div class=3D"gma=
il_signature"><div dir=3D"ltr"><div><span style=3D"font-family:arial black,=
sans-serif">Jorge</span><br><br><br></div></div></div></div>
</div></div></div></div></div></div></div></div></div>

--047d7b3a8ac076341a052db05eab--


--===============2617611701544458693==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
--===============2617611701544458693==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-users

--===============2617611701544458693==--