@PiranhaT wrote:
I am trying to draw some ofImage's of PNGs with transparency, and the anti-aliasing isn't quite right. I'm not sure it matters, but I'm trying to do this on iOS. There's not much going on regarding drawing outside of the sort of setup and draw methods as are implemented in the imageLoaderExample app. What's different is my PNG assets. They are a couple of cloud images with full transparency around the edges. I've done some experimentation with Apple's SpriteKit using these same images and there is no issue there.
SpriteKit:
openFrameworks:
Notice the outline around the inner cloud profile.
I have this in my main:
ofiOSWindowSettings settings; settings.enableRetina = true; // enables retina resolution if the device supports it. settings.enableDepth = false; // enables depth buffer for 3d drawing. settings.enableAntiAliasing = true; // enables anti-aliasing which smooths out graphics on the screen. settings.numOfAntiAliasingSamples = 4; // number of samples used for anti-aliasing. settings.enableHardwareOrientation = false; // enables native view orientation. settings.enableHardwareOrientationAnimation = true; // enables native orientation changes to be animated. settings.glesVersion = OFXIOS_RENDERER_ES2; // type of renderer to use, ES1, ES2, etc. ofAppiOSWindow* window = (ofAppiOSWindow*)(ofCreateWindow(settings).get());
Experimenting with ES1 makes no difference. Using a number greater than 4 for numOfAntiAliasingSamples yeilds "Failed to make complete framebuffer object" in debug output.
I also noticed that even though "enableAntiAliasing = true", that ofGLProgrammableRenderer::enableAntiAliasing() was not being called. So I added ofEnableAntiAliasing() in my draw method, confirmed that ofGLProgrammableRenderer::enableAntiAliasing()was being called, but it made no difference in the result.
Any assistance would be greatly appreciated.
Thanks,
-Todd
Posts: 3
Participants: 2