Re: Help with VAOs

Chris Barker <[email protected]> Tue, 27 Jan 2015 14:44:31 -0800
Newsgroups gmane.comp.python.opengl.user
Message-ID <CALGmxE+wv0CSGYoR12sxbTsOa=STecwHJgRY_6i-8TiXwZT83Q@mail.gmail.com>
--===============2833852659581963521==
Content-Type: multipart/alternative; boundary=047d7b33d64ceb4cc2050daa01c2

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

Nicolas,

It looks from docs like VisPY is kind of a next-generation Glumpy -- but is
there still stuff in Glumpy that isn't in VisPy?

-Chris


On Tue, Jan 27, 2015 at 2:33 PM, Nicolas P. Rougier <
[email protected]> wrote:

>
> Maybe this tutorial can help you:
>
> http://www.labri.fr/perso/nrougier/teaching/opengl/
>
>
> Along with these two projects:
>
> * http://glumpy.github.io
> * http://vispy.org
>
>
> Nicolas
>
>
> > On 27 Jan 2015, at 22:39, Chris Barker <[email protected]> wrote:
> >
> > Sorry, I'm going to be really vague here, as it's been a while.
> >
> > glBegin()
> > glVertex(...)
> > [...]
> > glEnd()
> >
> > is the "old" way, and you are right, you really  don't want to do that.
> >
> > The "new" way is all the shader magic - it may be time to bite the
> bullet and learn that.
> >
> > But the semi-new way is to use Vertex Buffer OBjects (VBOs) to
> efficiently store your vertices on the Card. A little googling should get
> you started.
> >
> > -CHB
> >
> >
> >
> > On Tue, Jan 27, 2015 at 12:36 PM, Johannes Bauer <[email protected]>
> wrote:
> > Hello list,
> >
> > I'm trying to store objects (currently only vertices) on the graphics
> > card so that I can avoid lots of:
> >
> > glBegin()
> > glVertex(...)
> > [...]
> > glEnd()
> >
> > I've tried lots and lots of code now (none of which fully did what I
> > wanted) and really am losing my mind soon :-( I could adapt this to work
> > with my code:
> >
> > https://gist.github.com/MorganBorman/4243336
> >
> > And it does work, but when integrated in my 3D environment I noticed
> > that the drawn objects are not rendered perspectively, but just a flat
> > object.
> >
> > I'm looking for the easiest way to dump a bunch of vertices onto the
> > graphics card and later reference those vertices to draw some object and
> > have it render as if I had used glBegin(), glVertex(), glEnd(). Is this
> > possible at all? Which approach should I look into?
> >
> > In general I've seen two different approaches, one that involes (usually
> > super-primitive) shaders, others do not. I do not see why I would need a
> > custom-shader for this task, is this really necessary?
> >
> > My goal ultimately is to store surfaces (i.e. vertices, their normals,
> > their texture UV coordinates) on the graphics card.
> >
> > Any help is greatly appreciated,
> > Johannes
> >
> >
> ------------------------------------------------------------------------------
> > Dive into the World of Parallel Programming. The Go Parallel Website,
> > sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> > hub for all things parallel software development, from weekly thought
> > leadership blogs to news, videos, case studies, tutorials and more. Take
> a
> > look and join the conversation now. http://goparallel.sourceforge.net/
> > _______________________________________________
> > PyOpenGL Homepage
> > http://pyopengl.sourceforge.net
> > _______________________________________________
> > PyOpenGL-Users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/pyopengl-users
> >
> >
> >
> > --
> >
> > Christopher Barker, Ph.D.
> > Oceanographer
> >
> > Emergency Response Division
> > NOAA/NOS/OR&R            (206) 526-6959   voice
> > 7600 Sand Point Way NE   (206) 526-6329   fax
> > Seattle, WA  98115       (206) 526-6317   main reception
> >
> > [email protected]
> >
> ------------------------------------------------------------------------------
> > Dive into the World of Parallel Programming. The Go Parallel Website,
> > sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> > hub for all things parallel software development, from weekly thought
> > leadership blogs to news, videos, case studies, tutorials and more. Take
> a
> > look and join the conversation now.
> http://goparallel.sourceforge.net/_______________________________________________
> > PyOpenGL Homepage
> > http://pyopengl.sourceforge.net
> > _______________________________________________
> > PyOpenGL-Users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/pyopengl-users
>
>


-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[email protected]

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

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">Nico=
las,</div><div class=3D"gmail_quote"><br></div><div class=3D"gmail_quote">I=
t looks from docs like VisPY is kind of a next-generation Glumpy -- but is =
there still stuff in Glumpy that isn&#39;t in VisPy?</div><div class=3D"gma=
il_quote"><br></div><div class=3D"gmail_quote">-Chris</div><div class=3D"gm=
ail_quote"><br></div><div class=3D"gmail_quote"><br></div><div class=3D"gma=
il_quote">On Tue, Jan 27, 2015 at 2:33 PM, Nicolas P. Rougier <span dir=3D"=
ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">Nico=
[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex=
"><br>
Maybe this tutorial can help you:<br>
<br>
<a href=3D"http://www.labri.fr/perso/nrougier/teaching/opengl/" target=3D"_=
blank">http://www.labri.fr/perso/nrougier/teaching/opengl/</a><br>
<br>
<br>
Along with these two projects:<br>
<br>
* <a href=3D"http://glumpy.github.io" target=3D"_blank">http://glumpy.githu=
b.io</a><br>
* <a href=3D"http://vispy.org" target=3D"_blank">http://vispy.org</a><br>
<span class=3D"HOEnZb"><font color=3D"#888888"><br>
<br>
Nicolas<br>
</font></span><div class=3D"HOEnZb"><div class=3D"h5"><br>
<br>
&gt; On 27 Jan 2015, at 22:39, Chris Barker &lt;<a href=3D"mailto:chris.bar=
[email protected]">[email protected]</a>&gt; wrote:<br>
&gt;<br>
&gt; Sorry, I&#39;m going to be really vague here, as it&#39;s been a while=
.<br>
&gt;<br>
&gt; glBegin()<br>
&gt; glVertex(...)<br>
&gt; [...]<br>
&gt; glEnd()<br>
&gt;<br>
&gt; is the &quot;old&quot; way, and you are right, you really=C2=A0 don&#3=
9;t want to do that.<br>
&gt;<br>
&gt; The &quot;new&quot; way is all the shader magic - it may be time to bi=
te the bullet and learn that.<br>
&gt;<br>
&gt; But the semi-new way is to use Vertex Buffer OBjects (VBOs) to efficie=
ntly store your vertices on the Card. A little googling should get you star=
ted.<br>
&gt;<br>
&gt; -CHB<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Jan 27, 2015 at 12:36 PM, Johannes Bauer &lt;<a href=3D"mailto=
:[email protected]">[email protected]</a>&gt; wrote:<br>
&gt; Hello list,<br>
&gt;<br>
&gt; I&#39;m trying to store objects (currently only vertices) on the graph=
ics<br>
&gt; card so that I can avoid lots of:<br>
&gt;<br>
&gt; glBegin()<br>
&gt; glVertex(...)<br>
&gt; [...]<br>
&gt; glEnd()<br>
&gt;<br>
&gt; I&#39;ve tried lots and lots of code now (none of which fully did what=
 I<br>
&gt; wanted) and really am losing my mind soon :-( I could adapt this to wo=
rk<br>
&gt; with my code:<br>
&gt;<br>
&gt; <a href=3D"https://gist.github.com/MorganBorman/4243336" target=3D"_bl=
ank">https://gist.github.com/MorganBorman/4243336</a><br>
&gt;<br>
&gt; And it does work, but when integrated in my 3D environment I noticed<b=
r>
&gt; that the drawn objects are not rendered perspectively, but just a flat=
<br>
&gt; object.<br>
&gt;<br>
&gt; I&#39;m looking for the easiest way to dump a bunch of vertices onto t=
he<br>
&gt; graphics card and later reference those vertices to draw some object a=
nd<br>
&gt; have it render as if I had used glBegin(), glVertex(), glEnd(). Is thi=
s<br>
&gt; possible at all? Which approach should I look into?<br>
&gt;<br>
&gt; In general I&#39;ve seen two different approaches, one that involes (u=
sually<br>
&gt; super-primitive) shaders, others do not. I do not see why I would need=
 a<br>
&gt; custom-shader for this task, is this really necessary?<br>
&gt;<br>
&gt; My goal ultimately is to store surfaces (i.e. vertices, their normals,=
<br>
&gt; their texture UV coordinates) on the graphics card.<br>
&gt;<br>
&gt; Any help is greatly appreciated,<br>
&gt; Johannes<br>
&gt;<br>
&gt; ----------------------------------------------------------------------=
--------<br>
&gt; Dive into the World of Parallel Programming. The Go Parallel Website,<=
br>
&gt; sponsored by Intel and developed in partnership with Slashdot Media, i=
s your<br>
&gt; hub for all things parallel software development, from weekly thought<=
br>
&gt; leadership blogs to news, videos, case studies, tutorials and more. Ta=
ke a<br>
&gt; look and join the conversation now. <a href=3D"http://goparallel.sourc=
eforge.net/" target=3D"_blank">http://goparallel.sourceforge.net/</a><br>
&gt; _______________________________________________<br>
&gt; PyOpenGL Homepage<br>
&gt; <a href=3D"http://pyopengl.sourceforge.net" target=3D"_blank">http://p=
yopengl.sourceforge.net</a><br>
&gt; _______________________________________________<br>
&gt; PyOpenGL-Users mailing list<br>
&gt; <a href=3D"mailto:[email protected]">PyOpenGL-Users=
@lists.sourceforge.net</a><br>
&gt; <a href=3D"https://lists.sourceforge.net/lists/listinfo/pyopengl-users=
" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/pyopengl-u=
sers</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt;<br>
&gt; Christopher Barker, Ph.D.<br>
&gt; Oceanographer<br>
&gt;<br>
&gt; Emergency Response Division<br>
&gt; NOAA/NOS/OR&amp;R=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"=
tel:%28206%29%20526-6959" value=3D"+12065266959">(206) 526-6959</a>=C2=A0 =
=C2=A0voice<br>
&gt; 7600 Sand Point Way NE=C2=A0 =C2=A0<a href=3D"tel:%28206%29%20526-6329=
" value=3D"+12065266329">(206) 526-6329</a>=C2=A0 =C2=A0fax<br>
&gt; Seattle, WA=C2=A0 98115=C2=A0 =C2=A0 =C2=A0 =C2=A0<a href=3D"tel:%2820=
6%29%20526-6317" value=3D"+12065266317">(206) 526-6317</a>=C2=A0 =C2=A0main=
 reception<br>
&gt;<br>
&gt; <a href=3D"mailto:[email protected]">[email protected]</a><br>
&gt; ----------------------------------------------------------------------=
--------<br>
&gt; Dive into the World of Parallel Programming. The Go Parallel Website,<=
br>
&gt; sponsored by Intel and developed in partnership with Slashdot Media, i=
s your<br>
&gt; hub for all things parallel software development, from weekly thought<=
br>
&gt; leadership blogs to news, videos, case studies, tutorials and more. Ta=
ke a<br>
&gt; look and join the conversation now. <a href=3D"http://goparallel.sourc=
eforge.net/_______________________________________________" target=3D"_blan=
k">http://goparallel.sourceforge.net/______________________________________=
_________</a><br>
&gt; PyOpenGL Homepage<br>
&gt; <a href=3D"http://pyopengl.sourceforge.net" target=3D"_blank">http://p=
yopengl.sourceforge.net</a><br>
&gt; _______________________________________________<br>
&gt; PyOpenGL-Users mailing list<br>
&gt; <a href=3D"mailto:[email protected]">PyOpenGL-Users=
@lists.sourceforge.net</a><br>
&gt; <a href=3D"https://lists.sourceforge.net/lists/listinfo/pyopengl-users=
" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/pyopengl-u=
sers</a><br>
<br>
</div></div></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>=
<div class=3D"gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanograph=
er<br><br>Emergency Response Division<br>NOAA/NOS/OR&amp;R =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0(206) 526-6959=C2=A0=C2=A0 voice<br>7600 Sand Po=
int Way NE =C2=A0=C2=A0(206) 526-6329=C2=A0=C2=A0 fax<br>Seattle, WA =C2=A0=
98115 =C2=A0 =C2=A0 =C2=A0=C2=A0(206) 526-6317=C2=A0=C2=A0 main reception<b=
r><br><a href=3D"mailto:[email protected]" target=3D"_blank">Chris.Bark=
[email protected]</a></div>
</div></div>

--047d7b33d64ceb4cc2050daa01c2--


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

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
--===============2833852659581963521==
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

--===============2833852659581963521==--