Hi!
Sorry I'm new new to c++ and compilation/including problems.
I have some code in pure opengl and i have to take it, use for drawing the stuffs on some offscreen buffer, and then use this buffer as a texture.

What I have tried is to take code that uses frame buffer objects and write it inside a QGLWidget.

The first problem is that I can't use method such as
Qt Code:
  1. glGenFramebuffers or glBindFramebuffer
To copy to clipboard, switch view to plain text mode 
because I'm not able to import "glew.h" both in Ubuntu and in Mac osx. I'm using QtCreator and I'm importing openg with:

Qt Code:
  1. # add opengl libs
  2. QT += opengl
  3. LIBS += -lglut -lGLU -lGL # this line is needed only in linux
To copy to clipboard, switch view to plain text mode 
inside the .pro file. But in the future I'd like to use cmake.

The fact is that I'm using Qt because I like it very much but I'd like to stay as general as possible (use pure opengl functions and not QFramebufferObject) because my collegues could use my code inside something else.
But if there is no way, I will use them if I will found a very suitable example for render-into-texture.

Anyway, inside initializeGL if I cout

Qt Code:
  1. std::cout << "gl version:" << glGetString(GL_VERSION) << std::endl;
  2. // I get:
  3. //gl version:4.3.0 NVIDIA 319.23
To copy to clipboard, switch view to plain text mode 

So.. they should be supported. And original opengl program I found for what I need runs ok with other window/opengl-context manager.

Can someone help me?