On Mon, Aug 17, 2009 at 7:18 PM, Dysrythmic <[email protected]>wrote: > > > I begin in pyglet and opengl in general. > I should want to disable the sort of blur or antialiasing filter when > a scaled sprite is draw (when scale > 1 ). > I find nothing about that in doc or on web... >
That isn't a blur - it is the default bilinear filtering on textures. You can disable it (but be warned that the results may not be pretty), by setting the texture filter to GL_NEAREST - see the following example: *from pyglet.gl import * def texture_set_mag_filter_nearest( texture ): ** **glBindTexture( texture.target, texture.id ) ** **glTexParameteri( texture.target, GL_TEXTURE_MAG_FILTER, GL_NEAREST ) ** **glBindTexture( texture.target, 0 ) img = pyglet.image.load( 'image.png' ) texture_set_mag_filter_nearest( img.get_texture() ) sprite = pyglet.sprite.Sprite( img )* -- 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 -~----------~----~----~----~------~----~------~--~---
