Ok, i know that this code has like 1o flaws, i am just
learning pyglet-opengl, but it is *so* bad that the
nvidia 8600MGT vga card in the notebook goes crazy,
pixels start moving around to the extent that i have to
restart to macbook.
It actually draw what it should, but after 2-3 runs
it will kill the pc.
So i was thinking should some resources be manually
freed in pyglet ?
I am afraid to run this code or play around with it :)
Just for entertainment :
def draw_texture_test():
dotexture=1
if dotexture:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
GL_LINEAR)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,
GL_LINEAR)
glEnable(GL_TEXTURE_2D)
glEnable(GL_COLOR_MATERIAL)
image = pyglet.image.load(r'c:\test.png')
texture = image.get_texture()
glBindTexture(GL_TEXTURE_2D, texture.id)
pyglet.graphics.draw(3, pyglet.gl.GL_TRIANGLES,
('v2i', (10, 15, 800, 35, 500, 900)),
('t2f', (0, 0, 1, 1, 1, 0))
)
if dotexture:
glDisable(GL_TEXTURE_2D)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---