Tobias Jammer | 20 Dec 21:57 2014

Accessing generic vertex attributes in a shader

Hi everyone,

I want to do skinning for animations on the gpu in a shader. To draw, I am using an indexed vertex list (through batch.add_indexed) and then draw the batch. If I understand correctly I can attach some generic data to my vertices (in addition to vertex data, normals etc.), so what I did is the following:

self.vertex_list = batch.add_indexed(
            length, self.mode, group,
            indices, *[('v3f/dynamic', self.verts),
                       ('n3f/dynamic', self.norms),
                       ('c4f/static', self.color * length),
                       ('4g4f/static', weights), ('5g1i/static', w_lens),
                       ('6g4i/static', w_bone_ids)])

Only now I'm stuck when it comes to accessing this data in the shader program. I tried 

layout(location = 4) in vec4 weights;
layout(location = 5) in int count;
layout(location = 6) in ivec4 bone_ids;

but this doesn't seem to work. 

What's the correct way to do this?

Best
Tobias

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Jimmy Newsom | 19 Dec 19:35 2014
Picon

Pyglet Project Progress / status?

I noticed that the last update on the site was Submitted by Richard on 13-July-2012. I was wondering if this project is over or still being actively maintained.

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Jose Luis Da | 10 Dec 15:58 2014

My animation shows an unsmooth motion

Hi all, 

I have been working with pyglet in order to create a series of OpenGL figures and animate them given some parameters.
I have obtained what I want, but the movements of these figures is not smooth all the time, the movement is sometimes glitchy.

What are the most common sources of this kind of errors? Could you tell me if there is something I am doing wrong in the code?

You can find the code here: https://github.com/thisisjl/NuEyePlaid


Thank you,
jl

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Nick Bonfatti | 5 Dec 07:38 2014
Picon

blank screen when moving between videos

See this gist for sample code to reproduce what I'm seeing. 

https://gist.github.com/nickdanger3d/4761ff23a9d7acd50aaf

I'm trying to make a kind of video sequencer/sampler/soundboard, where you press a key and a different video plays. The example video plays fine the first time, but when you hit space to play it again, the video is blank for a length of time before it actually shows the video. If you hit space again, the video is blank for twice as long as the first time, and for the third time its twice as long again, etc.

I can only assume i'm doing something wrong. I don't think it's a disk access issue, because I tried putting the file in a ramdisk and playing it from there with the same issue.

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Rob | 30 Nov 11:00 2014
Picon

Fix for issue 506

Hi all,

I created a fix for issue 506 (https://code.google.com/p/pyglet/issues/detail?id=506). It includes fixing up and refactoring the fontconfig support. I still want to add some tests. It is in this repo: https://code.google.com/r/silvester747-bugfix/source/browse/

I did notice there was no activity on the main pyglet repo since July 16. Did I clone the correct repo?

Any dev want to take a look whether my changes could be pulled into main?

Kind regards,
Rob

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Dionne Peter Cailipan | 29 Nov 07:07 2014
Picon

pyglet media not loading

So I'm really new to pyglet and I'm trying to test out some of its features. I tried to play a music file but whenever I run it, a blank screen appears, and in terminal it only says 'Estimating duration from bitrate, this may be innacurate.' but does not play the file at all.

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Jose Luis Da | 17 Nov 16:06 2014

Animation slower in OSX than in Windows

Hi all, 

I wrote a code that displays an animation of a plaid, this plaid is drawn with OpenGL.

I have developed it under a Windows, but I also want to execute it under OSX. The code runs correctly, but the animation, i.e. strips of the plaid moving, is significantly slower.

Has anyone of you experienced something similar? What may be the cause of it?

I have attached the code and the files it uses for you to see.

Thank you,
jl

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Attachment (Archive.zip): application/zip, 15 KiB
Frederick Buchanan | 16 Nov 01:15 2014
Picon

libGL error: failed to load driver: swrast

I just installed pyglet and tried to run the hello world program as outlined in the tutorial. I ran it and got this error:

libGL error: failed to load driver: swrast
libGL error
: Try again with LIBGL_DEBUG=verbose for more details.


Then I put LIBGL_DEBUG=verbose on and got:
libGL: screen 0 does not appear to be DRI2 capable
libGL
: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so
libGL
: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
libGL
: Can't open configuration file /home/fred-buchanan/.drirc: No such file or directory.
libGL error: failed to load driver: swrast


I don't know what is happing. I'm running ubuntu 13.10. I'm using a GeForce GTX 650 TI BOOST, if that is of any help, with the propitiatory drivers.
Any help would be much appreciated.
Thanks!

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Steve Ksh | 5 Nov 08:35 2014
Picon

Pyglet on Github + Pyglet website

Hi,
I do think that the pyglet project would really benefit from switching to Github. (much less obscure than googlecode).
A new website could also help very much with popularity, bug reports and maintenance.
The project seems not updated since 2012 on the official site, is not available on PyPI.
I would like to contribute by making a more modern website, but I don't know who is in charge, maybe someone can tell me ?
About Github, what do you think ?

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
spu.fprob | 3 Nov 10:45 2014
Picon

AVbin is required to decode compressed media

I have installed pyglet version 1.2alpha1 and AVbin 10 for Win 64 (I am on Windows 8.1)
Trying the simple code as:

import pyglet
sound = pyglet.media.load('english.mp3', streaming=False)
sound.play()
pyglet.app.run()

I am having following error: pyglet.media.riff.WAVEFormatException: AVbin is required to decode compressed media.


I'd highly appreciate any advises, need to make it work asap.

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
'paeron' via pyglet-users | 30 Oct 15:18 2014

batch.add() problem, hexagons

Hey everyone!

Hoping to get some help with my problem here.

Im drawing a hexagonal-grid with batches.

I've got an Hexagon class with init as following. Im passing along a batch because I taught it would be nice to add all my hexagons to a single batch.

class Hexagon(object):

    def __init__(self, x, y, size, batch, color):
        ...

After all the math I have a tuple with the vertices and adds it to the batch

self.batch.add(
            6,
            GL_LINE_LOOP,
            None,
            ('v2f', vertices_tuple),
            ('c3f', color * 6)
        )

When this gets drawn to the screen I get this:




















If I create a new batch for each hexagon and fill it with the exact same values and later loop over all the hexagons and draw their batches. 
I get the following:


















I hope Ive described the problem well enough and looking forward to any help!
/ BR Tommy

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Gmane