> ISTM that gross operations on the model (transformations on all vertices > like the translation - I think that's what you mean by "shifting the > model") should be handled entirely by a shader, and no actual vertex data > manipulation, since setting the shader variable will be infinitely faster. > > > Richard > > Yes, sorry, I do mean translation. And you're absolutely right that it's silly to do these types of transformations on the CPU in a realtime application. I was mainly thinking that it's useful to have transform methods to reposition static objects in the scene when you first load them. I think the only possibilities are passing arguments to the pyglet.model.load function, or doing it right after loading. If you do it after loading, the following three methods should cover most bases: Model.update(x, y, z) # Translate on a specific axis. Model.scale(1.0) # Rescale the entire model. Model.rotate(x, y, z) # Rotate along one or more axis.
This would come with a big fat warning about not doing this every frame, and of course using shaders is going to be necessary for most things. Does that sound reasonable? -- 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 https://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.
