anti-aliasing in 0061 on OS X

With OpenFrameworks 006, on my MacBook Pro, anti-aliasing seemed to be on by default, so no jaggies straight out of the box. Now I’m using OF 0061 and all my polys are jaggy like its 1995! Agh!

Is there a simple straightforward way to enable anti-aliasing? ofEnableSmoothing() does not seem to have an effect. Thanks!

I suspect you modified the initialization string in OF in 0.06 (altered the source code) and in 0.061 straight off, it’s not modified. We have a new function in the glut window manager “setGlutDisplayString()” that let’s you do that without altering the internals of OF (so that you can open up your glut window in different ways across different apps, etc).

in main.cpp:

  
window.setGlutDisplayString("rgba double samples>=4 depth");  
ofSetupOpenGL(&window, 640, 480, OF_WINDOW);  

it should get you back to 2010 :wink:

can you let me know if that helps?

take care,
zach

that worked a charm. feels so good to have my smooth edges back! thanks.

This doesnt work for me… :confused:

This is the code in the main.ccp with the added line:

  
#include "ofMain.h"  
#include "testApp.h"  
#include "ofAppGlutWindow.h"  
  
//========================================================================  
int main( ){  
  
   ofAppGlutWindow window;  
	window.setGlutDisplayString(“rgba double samples>=4 depth”);  
  
	ofSetupOpenGL(&window, 1024,768, OF_WINDOW);			// <-------- setup the GL context  
  
	// this kicks off the running of my app  
	// can be OF_WINDOW or OF_FULLSCREEN  
	// pass in width and height too:  
	ofRunApp( new testApp());  
  
}  

Which results in the following 3 errors:

  
/Applications/of_preRelease_v0061_osxSL_FAT/apps/addonsExamples/3DModelLoaderExample/src/main.cpp:9:0 /Applications/of_preRelease_v0061_osxSL_FAT/apps/addonsExamples/3DModelLoaderExample/src/main.cpp:9: error: stray '\322' in program  
  
  
/Applications/of_preRelease_v0061_osxSL_FAT/apps/addonsExamples/3DModelLoaderExample/src/main.cpp:9:0 /Applications/of_preRelease_v0061_osxSL_FAT/apps/addonsExamples/3DModelLoaderExample/src/main.cpp:9: error: 'rgba' was not declared in this scope  
  
  
/Applications/of_preRelease_v0061_osxSL_FAT/apps/addonsExamples/3DModelLoaderExample/src/main.cpp:9:0 /Applications/of_preRelease_v0061_osxSL_FAT/apps/addonsExamples/3DModelLoaderExample/src/main.cpp:9: error: stray '\323' in program  
  
  
  
  

Any idea?

I think you’ve got a special quote mark that should be a normal quote mark (ie, quotes that tilt vs two straight lines).

ie,

  
" vs “  

if you replace the quotes it should work. I’ve edited my post above with to use the straight quotes, not sure how the slanted ones got in there :wink:

take care,
zach

Also I found “rgb alpha double samples depth” works well and is more compatible with different hardware.
Might work well for PC too.

The samples means - do multisampling if possible.

There is some useful info on it here:
http://developer.apple.com/mac/library/-…-ing.3.html

Theo

[quote author=“zach”]I think you’ve got a special quote mark that should be a normal quote mark (ie, quotes that tilt vs two straight lines).

ie,

  
" vs “  

if you replace the quotes it should work. I’ve edited my post above with to use the straight quotes, not sure how the slanted ones got in there :smiley: