Well that was useful (it's working!):

uniTrans = glGetUniformLocation(shader.handle, "trans");
trans = Quaternion.new_rotate_axis(math.pi, Vector3(0, 0, 1))
trans = trans.get_matrix()[:]
trans_ctype = (GLfloat * len(trans))(*trans)
glUniformMatrix4fv(uniTrans, 1, GL_FALSE, trans_ctype);

I'm not sure I would have ever found the library though without you 
mentioning it, maybe there should be a list somewhere listing very pyglet 
friendly libraries.

On Tuesday, July 29, 2014 1:17:55 AM UTC, swiftcoder wrote:
>
> On Mon, Jul 28, 2014 at 9:12 PM, 01AutoMonkey <[email protected] 
> <javascript:>> wrote:
>
>> Okay so after reading these two:
>>
>>    - 
>>    
>> http://stackoverflow.com/questions/10162659/opengl-matrix-math-utilities-for-python
>>    - 
>>    
>> http://stackoverflow.com/questions/12758570/pyopengl-passing-transformation-matrix-into-shader
>>  
>>
>> I'm getting myself familiar with numpy <http://www.numpy.org/> and 
>> transformations.py 
>> <http://www.lfd.uci.edu/~gohlke/code/transformations.py.html> to see if 
>> they aren't apt for the job. Will post an update in a bit, but if you know 
>> of a better way then please tell
>>
> Written by the same person who wrote Pyglet, this is a much more direct 
> match for the sort of operations you are looking for (I've contributed to 
> it a time or two myself):
>
> https://code.google.com/p/pyeuclid
>
> -- 
> Tristam MacDonald
> Software Development Engineer, Amazon.com
> http://swiftcoder.wordpress.com/
>  

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to