PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

question about using OpenGL

In win32, using OpenGL, but the serrated boundary is terrible when I scale the E2DSurfaceRGBA, I show the pictrue and the demo program here.
Attachments:
Release.rar (262 KB)
Hi,

If I understand correctly, you'd like to have a smoother particle when upscaling, instead of seeing larger pixels. To enable smooth scaling, call these functions directly after binding or uploading a surface:

Code:

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
I try it, but is doesn't work, there's no difference between GL_NEAREST and GL_LINEAR.
But when I use DirectX, it's perfert.
czcomtt · 26 May 2009, 08:25 UTC — I solve it, thank you for yonr answer
I solve it, thank you for yonr answer