Recent

Author Topic: BGRA OpenGL StretchDraw how to do it 'pixelated'  (Read 10627 times)

User137

  • Hero Member
  • *****
  • Posts: 1791
    • Nxpascal home
Re: BGRA OpenGL StretchDraw how to do it 'pixelated'
« Reply #15 on: June 21, 2015, 11:02:57 pm »
There's 1 sort of pixelating possible within texture, when you use glTexParameter for the currently bound texture.
https://www.opengl.org/sdk/docs/man3/xhtml/glTexParameter.xml

Code: [Select]
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, TextureQuality);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, TextureQuality);
...where TextureQuality is either GL_NEAREST or GL_LINEAR usually. GL_NEAREST doesn't blend the pixels when scaled close, but makes a sharp edge for pixels.

circular

  • Hero Member
  • *****
  • Posts: 4462
    • Personal webpage
Re: BGRA OpenGL StretchDraw how to do it 'pixelated'
« Reply #16 on: June 22, 2015, 06:37:05 pm »
Yes, I have implemented that.  :)

Next version of BGRABitmap is coming very soon!
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4462
    • Personal webpage
Re: BGRA OpenGL StretchDraw how to do it 'pixelated'
« Reply #17 on: June 23, 2015, 11:15:03 am »
There is a new version of BGRABitmap (8.7) with ResampleFilter property for textures:
http://sourceforge.net/projects/lazpaint/files/src
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4740
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: BGRA OpenGL StretchDraw how to do it 'pixelated'
« Reply #18 on: June 24, 2015, 06:21:53 pm »
Thanks.

 

TinyPortal © 2005-2018