Commit d1685f5a authored by vigmond's avatar vigmond
Browse files

avoid unnecessary draw

parent 5b7403e6
Pipeline #3274 passed with stages
in 1 minute and 51 seconds
#ifdef OSMESA
# define GL_GLEXT_PROTOTYPES
# include <GL/osmesa.h>
# define USE_FBO // antialiasing
#elif defined(__APPLE__)
# define GL_SILENCE_DEPRECATION
# include <OpenGL/gl3.h>
......@@ -10,11 +11,10 @@
# endif
# include <GL/glew.h>
static bool initglew = false;
# define USE_FBO // antialiasing
//# define USE_FLTK_IMG
#endif
#define USE_FBO // antialiasing
//#define USE_FLTK_IMG
#include "Frame.h"
/**
......@@ -96,11 +96,6 @@ Frame :: Frame( TBmeshWin *t, int w, int h, bool fa ) :_tbwm(t),_w(w),_h(h),
#ifdef USE_FBO
make_framebuffer( w, h, _fbms, _color_rbms, _depth_rbms, true );
make_framebuffer( w, h, _fb, _color_rb, _depth_rb );
#endif
fill_buffer( w, h, true );
#if defined(USE_FBO)
glBindFramebuffer(GL_FRAMEBUFFER, 0); // restore the display
#endif //OSMESA
}
......@@ -122,8 +117,8 @@ Frame :: ~Frame()
void
Frame :: delete_objs()
{
if (_buffer) delete[] _buffer;
#if defined(USE_FBO)
delete[] _buffer;
glDeleteRenderbuffers(1, &_color_rb);
glDeleteRenderbuffers(1, &_depth_rb);
glDeleteFramebuffers(1, &_fb);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment