Advertisement

Nehe's Tutes in C++

Started by October 19, 2000 06:47 PM
10 comments, last by Pure Krome 24 years, 3 months ago
Hi Folks. i''ve been having a massive blast with Nehe''s tutorials. I was wondering though, if there was any chance of some c++ ports -> at least for the first few tutes. Just curious ... I''d prefer them to be a generic as possible, but beggers cannot be choosers. -PK-
-PK-
Eh, err, I was under the impression that he was teaching totally in C++. I thought...!

*sob* I was under the allusion that those were C++ tutorials for my entire programming career! Jeff, you stinker, you sure tricked us!

lol I am sorry I couldn''t resist being sarcastic. Where did you learn C++? I think you may be thinking of straight dos rather than win32 code (with main() instead of WinMain()). If that is correct, you are out of luck, as far as NeHe''s tutorials go. Fortunatley, a lovely library that I have been dissing for a while (which is beside the point), called GLUT, can be downloaded off the net. Check it out, it works just like DOS.



L8r,
The Rainmaker
Biendschmofan''s Tutorials Of OpenGL Glander
L8r,[email=richardfrazee@msn.com]The Rainmaker[/email]Biendschmofan''s Tutorials Of OpenGL Glander
Advertisement
Err, Rainmaker, where did u learn to code c++

NeHe's tutes (at least the first few ones) are written in C.

C++ uses lots of different things.

Ok. quick example.
<br><br>...<br><code><br>// application<br>CApplication MainApp;<br><br><br>// ----------------------------------------------------------------------------<br>// Name: InitApp()<br>// Desc: Initializes all features specific to the application.<br>// ----------------------------------------------------------------------------<br>BOOL CApplication::InitApp()<br>{<br> // return success<br> return(TRUE);<br>}<br><br><br>// ----------------------------------------------------------------------------<br>// Name: ShutdownApp()<br>// Desc: Shutsdown all resources that are specific to the applicaiton<br>// ----------------------------------------------------------------------------<br>BOOL CApplication::ShutdownApp()<br>{<br> // return success<br> return(TRUE);<br>}<br><br><br>// ----------------------------------------------------------------------------<br>// Name: RunApp()<br>// Desc: Main processing loop for the application.<br>// ----------------------------------------------------------------------------<br>BOOL CApplication::RunApp()<br>{<br> // return success<br> return(TRUE);<br>}<br><br><br>// ----------------------------------------------------------------------------<br>// Name: WinMain()<br>// Desc: Entry point to the program.<br>// ----------------------------------------------------------------------------<br>int WINAPI WinMain( HINSTANCE hInstance, // Instance<br> HINSTANCE hPrevInstance, // Previous Instance<br> LPSTR lpCmdLine, // Command Line Parameters<br> int nCmdShow) // Window Show State<br>{<br> // set the hInstance<br> MainApp.hInstance = hInstance;<br><br> // init the application<br> if(!MainApp.Initialization())<br> return(0);<br><br></code><br>< etc ><br><br>**************************************************************<br>Now Nehe just uses plain functions, not classes, etc.<br><br>I am the lamest C++ programmer on the planet. I wish to learn. I have been doing c for a number of years. So i wish to learn with OpenGL.<br><br>that was why I asked.<br><br><br>I see why u said STRAIGHT DOS than WIN32 ... so ok. i'll rephrase my question.<br><br><br>ANY CODE for NEHE LESSON 1,2, 3 and 4 (these tutes are very similar to each other) which does not use Windows code (#include <windows.h>) and is classed / c++ AND will compile under vc6.0?<br><br>Why i say -> does not use Windows code? i wish to make it generic so i can get it working in linux also.<br><br>Does this mean i need to use GLUT?<br><br>-PK-<br><br><br>Edited by - Pure Krome on October 19, 2000 8:56:02 PM<br><br>Edited by - Pure Krome on October 19, 2000 8:57:01 PM
-PK-
Well, I don''t know how much this will help but I am in the process of writing tutorials for OOP an OpenGL useing OOP! I should be up to the equivelant of nehe spinning (non-textured) cube by the middle (hopefully beggining) of next week.
For those that don''t know OOP is Object Oriented Programming. i.e. classes!
You can check it out at http://tannara.2y.net/ let me know if you find anything confusing or unclear and I''ll try to get it fixed.
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
I have made an OOP OpenGL Framework of many classes at my site. http://welcome.to/zacksmith/
Just go to the downloads section and download the latest version. It features .md2 model support (quake2), audio support (mp3), a timing class, texture class, logging support, an input class, and printing to the screen in OpenGL.

Please tell me what you think of it if you download it.

Zack
A moment enjoyed is not wasted. -Gamers.com
Yeah Zeotron ... that''s what i was after =)

Now, even though it''s Win32API, it will still give me an idea =)

I think i''m going to use GLUT becuase i need to handle OS portablity.

Still, kick ass dude.


-PK-
-PK-
Advertisement
Well, u can try SDL, www.libsdl.org.
/asm0
Ok I am sorry I misunderstood you. I do see what you mean. My site (link at bottom) has what you are looking for under the base code tutorial, but the X button is not as efficient as I would like. I gotta get that fixed...

Anyway, my code seems to work just fine otherwise.

L8r,
The Rainmaker
Biendschmofan''s Tutorials Of OpenGL Glander
L8r,[email=richardfrazee@msn.com]The Rainmaker[/email]Biendschmofan''s Tutorials Of OpenGL Glander
Jeff''s tutorials ARE written in C++. They just dont utilize Object Classes (i''m assuming to keep them easy to understand). That''s like telling a guy he''s not writing an app in C++, because he doesn''t utilize global variables, or some other feature of C++. Silly, if you ask me. If you knew enough about OOP with C++, you''d port the code yourself. It''s obnoxiously easy to do, atleast, when you know what you''re doing...
Krome, alll of those tutorials are in C++, and are made for VC6 which is what I use. Just becuase he isn''t using classes does not mean its c. Theres a very large difference between c vs c++, not just class imodd {}.



-----------------------------
What doesn''t kill me today,
will be there tomorrow..
-----------------------------What doesn''t kill me today,will be there tomorrow..

This topic is closed to new replies.

Advertisement