Archived

This topic is now archived and is closed to further replies.

dynamo_wku

OOP opengl.h opengl.cpp

Recommended Posts

Im trying to create a second window (for debug purposes) but i cant seem to get it to work right with the OOP basecode stuff... do i have to make a new COpenGL object? or can i just do another object.CreateGLWindow(...) ? either way it doesnt work for me...id like to mention im new to win32 stuff and not quit certain what the MSG and HINSTANCE and all that jazz does for windows programming... thanks dynamo

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I think if you''re using visual c++ you can just start all your projects as win32 console apps. This creates a console window behind your main program. Then, to write to the console use cout or printf, whatever you want.

Share this post


Link to post
Share on other sites
i am using visual c++ and my project is a win32 app...but the only window that pops up is the one i created...there is no console menu

also, with console i couldnt get a real time effect...i needed another window that sets there and spits out values like x and y coordinates and speeds as they change...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hmmm, well, I got away from the visual c++ thing awhile ago and went to linux so i might not be remembering correctly but I think there is a straight up win32 app and a win32 console app that you can choose with the project creation wizard. This could be wrong however and you might have already chosen the console one. The other quick thing I can think of doing wouldn''t be as helpful to you since you couldn''t see the results while you were running your program, at least not in real-time would be to output your values with printf or cout, without any console up, this should be written to a file in your project directory called stdout.txt. You could check that out while you were running your program to see what''s happening debugging-wise. To do this, you don''t need to set anything up, just pring to stdout.

Share this post


Link to post
Share on other sites
yeah...there are win32 and win console...but using openGL i dont think i can use console can i? not for sure on that one...and yeah, it wouldnt be that great to have to refresh a text file every other second to see what values have been printed...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I haven''t used the nehe basecode before but I know the console thing works just fine if you use straight up glut or sdl. You might want to try it with the basecode anyway, just for kicks.

Share this post


Link to post
Share on other sites
this stuff is weird haha...very confusing...i understand most of the stuff the tutorials cover but when it comes time to add something to my own stuff i cant seem to figure it out...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
yeah, understandable, as I said, I haven''t used the basecode before let alone looked at it. I am a fan of the tutorials in general though. I like the SDL or GLUT a lot because they''re fairly simple to get started with and cross platform. Most of the annoying low level stuff is taken care of by these libraries so I can worry about graphics and program logic.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Another thing that I forgot to add but I guess is implicit in the cross-platform aspect of SDL and GLUT is that I don''t have to know any windows api junk which is just fine with me. I''d rather let somebody else worry about that stuff. As it is though, I''m a linux man now anyway so those worries are gone.

Share this post


Link to post
Share on other sites
What I do, is simply write my text class for putting text to the screen, and use that. Just draws whatever values I want it to write over my display, makes it very simple for checking variables. I also have a debug class, in which I can use to write out data if I need to. Both of those classes have a similar syntax to printf and can take an undefined number of variables, so printing chars, integers, hex, strings, etc are no problem. You''re going to want a text displaying class, or function sometime, so you might as well do that now, instead of wasting your time trying to get a second window working, since that will be useless in the future.

Share this post


Link to post
Share on other sites
that would work to...i tried doing that with nehe''s glPrint() i think it was...it would print it out fine but i couldnt seem to get it to print out values after ive drawn a cube or something to the display....

ok ok...ive heard so much about glut and sdl...are there any others i should know about? haha...

my problem now is that i went through like 15 of nehe''s tutorials and they all use the glaux.lib and i just read alot of bad things about the aux library...so, my question now is can nehe''s tutorials be used with sdl and glut?

Share this post


Link to post
Share on other sites
oh...i forgot to ask...am i supposed to use glut AND sdl at the same time? or just pick one that i like the best?

and...what about the gl.h and glu.h...do i forget about them and not use them? ive been looking through the forums and i cant find much information on this...also i went to the sdl and glut pages and downloaded the dev files for them and installed them into vc6 but the tutorials i found on the sdl and glut pages really suck i need some high quality tutorials like nehe''s haha...

thanks for all the help guys (girls)...i really appreciate it...

Share this post


Link to post
Share on other sites