QT feamework for OpenGL - Just like NeHe for Windows
I am looking for framework of QT Opengl Programming.
I have no prior experience of QT; though I know C++. I have heard that QT has already implemented some OpenGL.
But I do NOT want to use that. SO a framework tutorial like this:
will be a great help.
Thanks in advance
Not sure I fully understand your question but I hope I can help.
There is somewhere on the internet a Qt project template for NEHE that implements the a base project for you.
There is also some information here: http://qt-project.org/wiki/NeHe_in_Qt
The question also seems to be a little contradictory. You want the Qt framework, but then you say you dont want to use it?
NeHe and others work with GLUT or SDL etc as window managers. You can still do this with Qt but I would say that looking at how Qt has implemented OpenGL directly would be more help.
There is also a forum here for game dev that might assist with this.
What do you want in such a framework? Qt already provides QWindow, QOpenGLContext, QOpenGLBuffer, QOpenGLShaderProgram...
We (KDAB) has such an example framework for OpenGL-based Qt applications but it is part of our training business stream so I can't just give it away (unless you attend a training of course).
I am planning a series of blogs on OpenGL woth Qt so if you let me know what sort of stuff you would like to see I will try to get it into the example code published with the blogs.
Qt will do the "window" and context creation for you, all you need to do is write your OGL code.
Sorry for late reply..
What I mean by framework is just Windowing using Qt.
Like Init() function to initialize light and material properties
Draw() funtion to actually write OpenGl code logic
Keybord() function to handle key-presses by user
Reshape() function to handle movement of window
I have used glut which offers this functionality. It has attempted to use callback functions.
One of my senior suggested me to use Qt for "windowing". I have never touched Qt till now.
I do not want to use Qt implemented OpenGL code.. Like while doing texture mapping, I have read that this can be done in Qt using just 2 lines of code. I do not want that. I want an area to draw.
I have visited The link provided by Jarope, but Wesley Stessen's Page is down. It would be really helpful
if someone could show me a simple program.
I will try to do this over the weekend. Watch this space...
ZapB that would be very useful if you could!
This may also help.
The book "OpenGL 4.0 Shading Language Cookbook" uses Qt framework for their examples, however all the code is written with native OpenGL. You can download the examples source from the book site, there's a first "classic" example that draws a triangle, and others.
sounds good John will go see that as well.
I am trying to get all my course work based on Qt. so far I have my chat program working and the next graphics!
Really hoping you can get some time to do a basic of basics, Here is a Qt opengl window!
Did you get this sorted? I managed to use the hellogl example to strip out all the Qlogo class and other components and get back to a basic open gl window in which to place my openGL code.
Wondered if you had managed any other way?
Oh ya.. actually I did..
And also what I have experienced is that as we move ahead doing OpenGL, framework changes a lot(actually a little everytime)!
I have actually created something like NeHe, fullscreen many things like that..
Would it be correct to post entire framework here? Its five files overall.. ?
Not sure what the rules are here about posting files but I am happen to have a look at them and share what I have with you perhaps we should do this via email? You can use my profile link to do this.