Hi, all --
I am trying to use tiny .png images (a single "sprite sheet" .png full of them, to be precise), and scale them without antialiasing/interpolation, for sharp, heavily pixelated textures.
That's easy in the OPENGL renderer:
glInstance.setTexParameteri(GL.GL_TEXTURE_MIN_FILTER,GL.GL_NEAREST);
glInstance.setTexParameteri(GL.GL_TEXTURE_MAG_FILTER,GL.GL_NEAREST);
glInstance.setTexParameteri(GL.GL_TEXTURE_MAG_FILTER,GL.GL_NEAREST);
But OpenGL tends to exclude some users, and I would really like to use P3D. Sadly, P3D always blurs textures. If I have to, I will save textures as individual, full-size .png images. That's a step I don't want to take, since there are hundreds.
I think I see the antialiasing code in the Processing core source (PPolygon section):
(*also in the PSmoothTriangle.java section)
but it looks like the one hint that might have been helped me has been removed/commented out:
// by default, text turns on smooth for the textures
// themselves. but this should be shut off if the hint
// for DISABLE_TEXT_SMOOTH is set.
// texture_smooth = true;
// themselves. but this should be shut off if the hint
// for DISABLE_TEXT_SMOOTH is set.
// texture_smooth = true;
(textured quads seem actually to be dual triangles, like a GL triangle_strip)
edit: more discouraging comments from PTriangle:
/**
* True if using bilinear interpolation for textures.
* Always set to true. If this is ever changed (maybe with a hint()?)
* will need to write code for texture8/24/32 et al that will handle mixing
* the m_fill color in with the texture color.
*/
private boolean m_bilinear = true; // always set to true
* True if using bilinear interpolation for textures.
* Always set to true. If this is ever changed (maybe with a hint()?)
* will need to write code for texture8/24/32 et al that will handle mixing
* the m_fill color in with the texture color.
*/
private boolean m_bilinear = true; // always set to true
It looks like PTriangle also has a interpARGB = true; that is always called on reset.
Lookin' bleak. Any insights appreciated! Thanks!
3