Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: sethjackson on July 31, 2006, 03:33:43 pm
-
Hello. I have created a OpenGL project wizard (Windows only for the moment).
[attachment deleted by admin]
-
Well no replies, and yet is has been downloaded four times???? :( Is it the wizard.png that is hindering it?
-
I figured since it was only in 'for developers' that it would be to include in the default wizards, and not for downloaidng and usage. I haven't even toucghed the new project things, I usually make everything from scratch. I'll check it out now then...
--edit--
Looks good. What's the point of calling DestroyWindow() explicitly, expecially after the message loop is over?
-
I figured since it was only in 'for developers' that it would be to include in the default wizards, and not for downloaidng and usage. I haven't even toucghed the new project things, I usually make everything from scratch. I'll check it out now then...
--edit--
Looks good. What's the point of calling DestroyWindow() explicitly, expecially after the message loop is over?
To be honest I don't know I never do that (Well I destroy the window in the WM_CLOSE message) but it seems that most of the Windows OpenGL tutorials do..... What I do (when using the Windows API): in the WM_CREATE message enable OpenGL; in the WM_CLOSE message disable OpenGL, and destroy the window; and in the WM_CLOSE message PostQuitMessage(0).
It always worked for me, however for the wizard I just copied the code from the OpenGL file based template (I'll admit I modified it a bit, but not much)......
-
Heh. Well it sends a WM_DESTROY message, nothing more. That part of your code doesn't even run until the window is already nuked, and the message processing loop is done. It's a redundant call. Not nitpicking, I was just curious.
What is the different between these wizards and just using a file based template? It seems it just copies the main.cpp into the proper folder?
-
Heh. Well it sends a WM_DESTROY message, nothing more. That part of your code doesn't even run until the window is already nuked, and the message processing loop is done. It's a redundant call. Not nitpicking, I was just curious.
Right it didn't make sense to me either. I just copied the code (and trusted the OpenGL tutorial writers). :)
Anyways I modified the code to do mostly what I said above. ;)
What is the different between these wizards and just using a file based template? It seems it just copies the main.cpp into the proper folder?
Well actually it is a bit more advanced than that AFAIK. It is more compiler-independent, than a file based template......
Ask Morton he is the wizard wiz (pun intended). ;)
-
good work! can it be added to nightly builds?
and can someone create openGL on SDL wizard? thanks
-
good work! can it be added to nightly builds?
I'm currently "testing" this. I was hoping to add support for both - GCC and MSVC compatible compilers in addition (the libs to link against change then). Anyway - it will be added but give me some more time.
With regards, Morten.
Ps.: sethjackson: I was aware of this already but I'm a bit busy at the moment, so no worries about what will happen to this contribution - it is basically accepted already... ;-)
-
good work! can it be added to nightly builds?
and can someone create openGL on SDL wizard? thanks
Hmm we already have a SDL wizard. :? I guess I'm not getting what you are saying????
good work! can it be added to nightly builds?
I'm currently "testing" this. I was hoping to add support for both - GCC and MSVC compatible compilers in addition (the libs to link against change then). Anyway - it will be added but give me some more time.
With regards, Morten.
Ps.: sethjackson: I was aware of this already but I'm a bit busy at the moment, so no worries about what will happen to this contribution - it is basically accepted already... ;-)
Hmm I thought the link libs were the same. :shock: