On Fri, Jul 24, 2009 at 10:13 AM, sevenseeker <[email protected]> wrote:
>
> could you provide an example of the correct usage of this? I have been
> though the docs for ages and just don't see how to correct what I am
> doing wrong.
* self.square = pyglet.graphics.vertex_list(4,*
* ('v2f', (self.window.width - 50, self.window.height - 50,*
* 50, self.window.height - 50,*
* 50, 50,*
* self.window.width - 50, 50)),*
*
*
* ### Note the texture coord usage*
*
*
* ('t3f', self.texture.tex_coords) )*
This makes your code work fine (albeit upside down).
doesn't image.blit() draw to the framebuffer and thus just "paints' it
> on the screen in the foreground? I want to paint to a texture of
> either a cube or a simple square and perform transforms in space on
> it (we are wanting 'cool' looking effects)
Ja, in this case you have to draw manually, as you were.
If getting the texture always returns a square, I have two questions
> regarding the rectangle and undocumented force_rectangle parameters:
> 1. what are they for
> 2. are they used?
>
Rectangular textures are an old (and very painful) mechanism to get
around the power-of-two texture dimension requirement
in OpenGL.
They have been replaced (on newer graphics cards) by the
GL_ARB_texture_non_power_of_two extension, but pyglet does not yet support
this - you can however create your own texture class to use it, if your
target hardware is new enough.
--
Tristam MacDonald
http://swiftcoder.wordpress.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---