Crapy 2d graphics

Hi guys!

I would like to know if there is any away to get good 2d graphics on OF?
I’ve tried to use functions like ofSetCurveResolution(), ofEnableSmoothing(), ofEnableAntiAliasing() or ofSetCircleResolution() but all the graphics like ellipse, shapes, lines looks crapy.

The only thing the make the graphics look a little better is to add the following line in main.cpp file

  
window.setGlutDisplayString("rgb double samples>=4 depth");  

Although graphics still looks crapy.

In processing you just need to use the smooth() function and you get this amazing graphics that’s a pity that OF doesn’t work that way :frowning:

Or maybe this is just a newbie question! if so can anyone point me to a tutorial or give-me a hint on this. i’ve been looking though OF documentation and find that there are various render methods, but unfortunately there is no description about them, what’s there diference or how to use them!

best
j

Hello again guys,

I was drawing into a FBO and then drawing the FBO on the screen! I tried to draw them directly in the draw function and now graphics looks ok!

The thing is that i need to use an FBO to render large resolution graphics, but i can’t draw them in the FBO with good quality:

That’s how i’m using the FBO

  
  
  
void setup(){  
    output.allocate(1280, 800, GL_RGBA);   
    output.begin();  
    ofClear(0);  
    ofBackground(0);  
    output.end();  
}  
  
  
void drawInFbo(){  
     output.begin();  
  
 //draw graphics here  
  
     output.end();  
}  
  
  
void draw(){  
    drawInFbo();  
}  
  
  

Am I missing something?

best.
j

your missing the AA flag for the ofFbo
:slight_smile:

try:

  
output.allocate(1280, 800, GL_RGBA, 4);