News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

New project wizard (OpenGL)

Started by sethjackson, July 31, 2006, 03:33:43 PM

Previous topic - Next topic

sethjackson

Hello. I have created a OpenGL project wizard (Windows only for the moment).



[attachment deleted by admin]

sethjackson

Well no replies, and yet is has been downloaded four times????  :( Is it the wizard.png that is hindering it?

Vampyre_Dark

#2
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?
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

sethjackson

Quote from: Vampyre_Dark on August 12, 2006, 05:13:45 AM
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)......

Vampyre_Dark

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?
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

sethjackson

Quote from: Vampyre_Dark on August 13, 2006, 02:45:21 AM
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. ;)

Quote from: Vampyre_Dark on August 13, 2006, 02:45:21 AM
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). ;)

lubos

#6
good work! can it be added to nightly builds?
and can someone create openGL on SDL wizard? thanks

MortenMacFly

Quote from: lubos on August 13, 2006, 09:42:45 AM
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... ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

sethjackson

Quote from: lubos on August 13, 2006, 09:42:45 AM
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????

Quote from: MortenMacFly on August 13, 2006, 08:16:09 PM
Quote from: lubos on August 13, 2006, 09:42:45 AM
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: