I have 2 skin texturing questions…
- Is there any way to use GL_NEAREST filtering on my texture, and then limit the alpha channel to 0 or 1 when rendering to the frame buffer? My render is not depth-sorted, so to allow reasonable rendering, my textures are clamped to alpha channel = 0 or 1 during loading of the textures, providing masking textures. However, there are still problems at edges when using GL_NEAREST filtering, where the alpha channel is interpolated. GL_LINEAR is fine, just a bit blocky. So, if I can use GL_NEAREST, and then set a threshold alpha level after the texture interpolation, and the pixel can be rendered with alpha 0 or 1, this would give a smoother edge, and also allow the rest of my texture to be GL_NEAREST.
(Maybe I should bite the bullet and depth-sort everything, but rendering speed is more important than perfect transparency, and depth-sorting is also going to add a lot of complexity to my application, so I really don’t want to do this.)
- What is the best way to share textures between windows of an MDI application. Should I be sharing display lists and textures between rendering contexts, or should I be writing my app with one display context and using the one context across mutiple MDI windows?