PDA

View Full Version : Disabling Antialiasing in ZenGL



vruz
17-02-2011, 03:22 AM
How do I disable antialiasing completely in Zengl?

I'm making a retro-styled 8-bit-like game which I would like to look pixellated when sprites are enlarged, but it seems that the engine is rendering some antialiasing or interpolation when I resize sprites.

I want the sprites resized with no interpolation nor antialiasing whatsoever.
I looked at the source and couldn't figure it out.

Thanks in advance for any indications you can give me.

Andru
17-02-2011, 05:25 AM
When you load texture(tex_LoadFromFile or tex_LoadFromMemory) you set parameter TEX_DEFAULT_2D(last argument in function). You can change it to this one(and define as your new constant):


TEX_DEFAULT_2D xor TEX_FILTER_LINEAR or TEX_FILTER_NEAREST

or build from scratch new one:


TEX_CLAMP or TEX_FILTER_NEAREST or TEX_CONVERT_TO_POT or TEX_CALCULATE_ALPHA


As you can see, main bits are TEX_FILTER_*

vruz
18-02-2011, 05:47 AM
thanks for your help, Andru.
and thanks a lot for the great work you're doing.


When you load texture(tex_LoadFromFile or tex_LoadFromMemory) you set parameter TEX_DEFAULT_2D(last argument in function). You can change it to this one(and define as your new constant):


TEX_DEFAULT_2D xor TEX_FILTER_LINEAR or TEX_FILTER_NEAREST
or build from scratch new one:


TEX_CLAMP or TEX_FILTER_NEAREST or TEX_CONVERT_TO_POT or TEX_CALCULATE_ALPHA
As you can see, main bits are TEX_FILTER_*