![]() |
|
#1
|
|||
|
|||
FLTK and OpenGLHi all. I am new to this forum and am sincerely hoping it will help me out.
So here is the deal: I was given the task of figuring out how to creat graphics using FLTK's OpenGL capabilities. That was all well and good. I got started with the Fl_Gl_Window and learning about it. I immediately ran into what seemed like 500 problems. After frequent headbanging and long hours of frustration I figured out how to compile my program (using the --use-gl --use-glut commands when linking). So right now all I can draw are nice little shapes a rectangles. What I don't understand is what FLTK does behind the scenes because everywhere i have looked for opengl examples using fltk have all been like "bah this is intuitively obvious, if you don't get this you are an uber moron." it is very disheartening because i really want to learn how to use opengl to create cool graphics and what not, but if i cannot even figure out how to get an example from an opengl book to working in fltk what is the point? thanks for any feedback |
|||
|
#2
|
||||
|
||||
|
Quote:
Have you read through the open gl examples in the test directory? Have you read through the posts at www.fltk.org? There is a bit of reading that can be done there. FLTK can be a bit tough to get going with but keep at it. I haven't done much with open gl yet but I share your belief that there is some really cool stuff you can do with it. I'm not really sure there was a question that can be answered in your post. Do you have some specific code you are trying to get working. Post it and perhaps we can take a look. Mark __________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work." --Thomas Alva Edison "Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." --Benjamin Franklin "A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes." --Hugh Downs |
|
#3
|
|||
|
|||
|
I have tried using the examples that come with fltk as a guide, but instead of making simple examples to show how certain things are done (as in opengl) it seems they tried to show off too much and overly complicated things. Thanks for the link I will check it out. Another thing I don't understand (and if any of you out there can help) is that there is hardly any documentation (atleast from fltk) on how the Fl_Gl_Window works. i.e. how it sets up the window, or how if it initalizes special glut functions
A simple example from the "Red Book" (OpenGL Programming Guide) int main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE, GLUT_RBG); glutInitWindowSize(250, 250); glutInitWindowPosition(100, 100); glutCreateWindow("hello"); init(); glutDisplayfunc(display); glutMainLoop(); return 0;} I understand how fltk sets up window size and position and the display mode, but what i am confused on is the glutDisplayfunc() and the glutMainLoop(); They are both considered "undefined references" when i try to compile. I don't know if I need to include something more than <FL/glut.H> to have all the glut components work instead of just a few. Once again thanks for any and all help. It is greatly appreciated. |
Recent GIDBlog
Accepted for Ph.D. program by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| FLTK with GLUT | usmsci | FLTK Forum | 4 | 26-Nov-2004 17:21 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The