Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Vertex Attributes using vertex_list and GLSL
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Adam Griffiths  
View profile  
 More options Sep 12 2012, 3:59 am
From: Adam Griffiths <adam.lw.griffi...@gmail.com>
Date: Wed, 12 Sep 2012 00:59:12 -0700 (PDT)
Local: Wed, Sep 12 2012 3:59 am
Subject: Vertex Attributes using vertex_list and GLSL

I'm trying to pass vertex attributes to a GLSL vertex shader.

I've created the following vertex_list:
self.vertex_list = pyglet.graphics.vertex_list(
            num_verts,
            ('v3f/static', verts),
            ('t2f/static', tcs),
            ('0g1f', attribs),
            )

I've also put this in my GLSL vertex shader:

attribute float index;

But I'm unsure how to bind the attribute array to the GLSL input?

The GL spec says I should call glGetAttribLocationARB which receives the
attribute name.
Should I call this, then use the returned value as the first value of the
attribute?
Ie. "Xg1f" instead of "0g1f"

I'm using the GLSL shader wrapper from here incase that matters:
http://swiftcoder.wordpress.com/2008/12/19/simple-glsl-wrapper-for-py...

Cheers,
Adam


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.