Re: confused n00b is confused - rendering simple triangles

"Mike C. Fletcher" <[email protected]> Thu, 15 Nov 2012 10:01:31 -0500
Newsgroups gmane.comp.python.opengl.user
Message-ID <[email protected]>
On 12-11-13 01:28 PM, Dave Curtis wrote:
...
>           GL.glVertexPointer(3, GL.GL_FLOAT, 0, v.astype('float32'))
>           GL.glColorPointer(3, GL.GL_FLOAT,0, colors.astype('float32'))
>           GL.glDrawElements(GL.GL_TRIANGLES, len(t) ,GL.GL_UNSIGNED_SHORT, t)
You do not, as far as I can see, glEnableClientState( ) on the pointers 
you are trying to use.  Without that you won't actually be rendering 
from your arrays.

See method Render here:

http://bazaar.launchpad.net/~mcfletch/openglcontext/trunk/view/head:/tests/gldrawarrays.py 
<http://bazaar.launchpad.net/%7Emcfletch/openglcontext/trunk/view/head:/tests/gldrawarrays.py>

for example of usage.

HTH,
Mike

-- 
________________________________________________
   Mike C. Fletcher
   Designer, VR Plumber, Coder
   http://www.vrplumber.com
   http://blog.vrplumber.com


------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net