Jump to content
  • Advertisement
Sign in to follow this  
Caste

New NeHe Lessons released!!

This topic is 3773 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey folks, after having talked about releasing new lessons for a pretty long time now, we're glad to present you the first 3 new NeHe lessons! They're starting from the beginning again, but this time using way better code style, making use of SDL to have a platform independent basecode and introducing only these features of OpenGL wich will be available in GL 3.0 (will be out in august probably). So if you follow these tutorials you're up to date in means of writing OpenGL applications! These lessons are no longer based on the old NeHe site, but on a wiki. This wiki will more and more be filled with the contents of the original site as it's much easier for us to maintain. You can find the lessons here or by clicking "NewLessons" in the menu on the NeHe site. So if there's anything you want to say about the new lessons: say it here.. [smile] Cheers Carsten (aka Caste) @ NeHe-Team

Share this post


Link to post
Share on other sites
Advertisement
Cool! I've been wondering when these would come out. It's high time that NeHe be brought up to date. :)

Site Observations: (these are mostly nit-picky things)

* Under Firefox 3 the NeHe logo ends up partially obscured by the site text itself. I have a suspicion that this is because of Ad block, since when I view the site in IE7 (with ads) it shows up fine. Don't depend on your ads to push the text into the right place.

* All of the code blocks have 1 line of empty space at their top, but none at the bottom. Pick one or the other, but having them mixed looks funny. (Sorry, I used to be a web designer. Can you tell?)

Code Observations:

* The directory structure in the downloaded zips seems a tad overwhelming and unnecessary to me, made more so by the fact that the lesson files cannot be extracted to the same place (Main.cpp would conflict, etc). New programmers will likely be interested in only one thing up front: the project file. It should be as easy to access as possible.

* All of the folder names in the visual studio project are in German :) Nothing against Germany, but it seems odd for a tutorial written in English.

* The association between the "Lesson" and "Window" classes is very loose, but they are extremely interdependent on each other, specifically when it comes to the SDL components. It seems odd, for example, that while the Window class creates the SDL environment, the Lesson class is what handles all of the messages for it. This takes advantage of the fact that SDL (like OpenGL) is a C library and globally accessible, but it breaks strict object-orientation and would not work (well) for other scenarios. i.e: If one were to try to port these tutorials to DirectX the class layout would become unruly fast. Quite frankly, I'm not sure why they have to be two separate classes at all, since the Lesson doesn't do much on its own. If they are going to be separate I feel like inheriting Lesson from Window may make a bit more sense. That way everything is working in an explicitly shared space instead of an implicitly shared one.

* This may just be me, but I pointed the code at my pre-existing SDL installation (1.2, I believe) and found that I had to change all the SDL includes from <SDL/SDL.h> to simply <SDL.h> in order to compile. My release simply wasn't organized that way.

* Under Windows the tutorial launches a console before the window. That can be nice for debugging, but I think you'll turn a lot of people off with it. At least have a tutorial that shows how to launch SDL without it. (And if you're not sure how, give me a shout. It's just some configuration fluff.)

* I applaud your decision to move away from immediate mode rendering, and I like the decision to use vector::push_back for geometry setup, since that will give a bit of familiarity to those who already know the immediate mode calls. I somewhat question the decision to use Vertex Arrays instead of VBOs, however. While there's no question that Vertex Arrays are a big step up from immediate mode, I think that they're becoming obsolete fast. OpenGL 3 isn't going to support them (IIRC), and DirectX has always discouraged it's equivalent functionality. I'd just hate to see the tutorial life artificially limited because of this choice. (Although I can agree that it is more clear for new developers. *sigh*)

I'll play around with them some more and see if I find anything new, these are just "first-glance" impressions.

I hope I don't come off as harsh, since I think it's great that there's a movement to inform people about better OpenGL usage. I want these tutorials to succeed, so if any of my comments seem overtly critical it's only because I would hate to see a little problem on my end turn into a deal-breaking frustration for someone new to the field.

Best of luck with these tutorials, and may you see just as much success as Jeff did!

[Edited by - Toji on June 13, 2008 3:52:38 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Toji
Cool! I've been wondering when these would come out. It's high time that NeHe be brought up to date. :)

Site Observations: (these are mostly nit-picky things)

* Under Firefox 3 the NeHe logo ends up partially obscured by the site text itself. I have a suspicion that this is because of Ad block, since when I view the site in IE7 (with ads) it shows up fine. Don't depend on your ads to push the text into the right place.

I know, but after refreshing the page this problem disappears so I have no idea what's the problem there

Quote:

* All of the code blocks have 1 line of empty space at their top, but none at the bottom. Pick one or the other, but having them mixed looks funny. (Sorry, I used to be a web designer. Can you tell?)

Code Observations:

* The directory structure in the downloaded zips seems a tad overwhelming and unnecessary to me, made more so by the fact that the lesson files cannot be extracted to the same place (Main.cpp would conflict, etc). New programmers will likely be interested in only one thing up front: the project file. It should be as easy to access as possible.

Thats true, we just need a nice way to package up things for windows as we have for linux, perhaps we'll reorganize it by then, we just wanted to get them released finally.
Quote:

* All of the folder names in the visual studio project are in German :) Nothing against Germany, but it seems odd for a tutorial written in English.

Sorry for that, I'll fix it..
Quote:

* The association between the "Lesson" and "Window" classes is very loose, but they are extremely interdependent on each other, specifically when it comes to the SDL components. It seems odd, for example, that while the Window class creates the SDL environment, the Lesson class is what handles all of the messages for it. This takes advantage of the fact that SDL (like OpenGL) is a C library and globally accessible, but it breaks strict object-orientation and would not work (well) for other scenarios. i.e: If one were to try to port these tutorials to DirectX the class layout would become unruly fast. Quite frankly, I'm not sure why they have to be two separate classes at all, since the Lesson doesn't do much on its own. If they are going to be separate I feel like inheriting Lesson from Window may make a bit more sense. That way everything is working in an explicitly shared space instead of an implicitly shared one.

Well to be honest, providing code which might be easily ported to DX was not our intention, but to seperate the SDL specific code from the OpenGL and drawing part. Yeh event handlinc crosses the cut here, but that seemed to be a more appropriate solution to achive our goal.
Quote:

* This may just be me, by I pointed the code at my pre-existing SDL installation (1.2, I believe) and found that I had to change all the SDL includes from <SDL/SDL.h> to simply <SDL.h> in order to compile. My release simply wasn't organized that way.

Dunno, I installed SDL for Code::Blocks and VisualStudio and it was structured that way (version 1.2 too)
Quote:

* Under Windows the tutorial launches a console before the window. That can be nice for debugging, but I think you'll turn a lot of people off with it. At least have a tutorial that shows how to launch SDL without it. (And if you're not sure how, give me a shout. It's just some configuration fluff.)

Hmm right, forgot that. This was something with mainCRTstartup as entry point, right?
Quote:

* I applaud your decision to move away from immediate mode rendering, and I like the decision to use vector::push_back for geometry setup, since that will give a bit of familiarity to those who already know the immediate mode calls. I somewhat question the decision to use Vertex Arrays instead of VBOs, however. While there's no question that Vertex Arrays are a big step up from immediate mode, I think that they're becoming obsolete fast. OpenGL 3 isn't going to support them (IIRC), and DirectX has always discouraged it's equivalent functionality. I'd just hate to see the tutorial life artificially limited because of this choice. (Although I can agree that it is more clear for new developers. *sigh*)

Well as vertex arrays can be handled pretty much the same as VBOs we wanted to start with those, next lessons will introduce texturing and vbos and from then on we'll only use these.
Quote:

I'll play around with them some more and see if I find anything new, these are just "first-glance" impressions.

I hope I don't come off as harsh, since I think it's great that there's a movement to inform people about better OpenGL usage. I want these tutorials to succeed, so if any of my comments seem overtly critical it's only because I would hate to see a little problem on my end turn into a deal-breaking frustration for someone new to the field.

Best of luck with these tutorials, and may you see just as much success as Jeff did!

Thx a lot for your constructive criticizm, thats always welcome! And you're also welcome to help with the lessons if that'd satisfy your wish of seeing them succeed [wink].

Cheers
Carsten

Share this post


Link to post
Share on other sites
When you start one more advanced topics. Try and break down each code and explain in more indepth. I've noticed that in your other old tutorials, you didn't really do well with that.Too bad you didn't go with Qt4 ;).

I think Glew would be a much better than Glee.

Is there a possiblity to have some GLSL tutorials also? You lacked that in the old ones.

Will you allow different source codes to be done similar to yours but in different api again?

And thank you from moving away from WinAPI *bows*

I noticed that you use Color in your api. But use the word colour describing what's going on.

[Edited by - Eckos on June 14, 2008 3:06:17 AM]

Share this post


Link to post
Share on other sites
Good to see that you're keeping an ear out to the community!

Quote:
Original post by Caste
Thats true, we just need a nice way to package up things for windows as we have for linux, perhaps we'll reorganize it by then, we just wanted to get them released finally.


No harm in that, but it's good to know you're thinking about it.

Quote:
Dunno, I installed SDL for Code::Blocks and VisualStudio and it was structured that way (version 1.2 too)


Nevermind. Looked at this one again and it's just me. Oops!

Quote:
Hmm right, forgot that. This was something with mainCRTstartup as entry point, right?


Yes, and don't forget to set the SubSystem to "Windows" (In Visual Studio anyway. Don't know about the others.)

Quote:
Well as vertex arrays can be handled pretty much the same as VBOs we wanted to start with those, next lessons will introduce texturing and vbos and from then on we'll only use these.


Fair enough, and I can agree that Vertex arrays are an easier concept to understand for beginners. And heck, ANYTHING is better than re-teaching immediate mode!

Quote:

Thx a lot for your constructive criticizm, thats always welcome! And you're also welcome to help with the lessons if that'd satisfy your wish of seeing them succeed [wink].


I'd love to help out any way I can! I was going to start my own tutorial series at one point, but life just kinda got in the way. *sigh* Let me know if there's anything I can do to help and I'd certainly be interested in doing a tutorial or two myself in the future!

Share this post


Link to post
Share on other sites
Hmm, what libsdl.org says is weird (to me at least) for 2 reasons:

1. Using quotes in an #include directive indicates that the header file can be found relative to the file containing the #include directive which is unlikely most of the time. Angle brackets indicate that it will search the paths passed into the compiler.

2. Most Linux distributions put the header in /usr/include/SDL/SDL.h. As /usr/include is on the path by default in most cases then the include becomes <SDL/SDL.h>. It is the same with OpenGL itself (GL/gl.h)

I understand that the source code distribution of SDL does not contain an "SDL" subfolder. So I guess we are going against the grain here, but the method that we use is clean and consistent, you are of course welcome to just delete the SDL/ from your include directives [wink]

Share this post


Link to post
Share on other sites
They recommend that because (I think) it offers the most flexibility between different platforms. People can just dump the SDL headers into the same directory as their own source (even if it is a horrible thing to do) or they can use the preprocessor include directory directives (e.g. g++ -I/home/me/includes) without modifying the source.

Example: I have both SDL 1.2 and SDL 1.3 on my machine. I could choose which version a project is to include by changing my include path for that project, not the source. This is handy because SDL is included in a number of places, whereas my include search path is found in a single place.

SDL is all about source compatibility, and this seems to be the best way to do it.

Even though I agree with you about #1, I still follow their guidelines.

Share this post


Link to post
Share on other sites
Good question, somehow all the content disappeared due to an error in the wiki, the pages are still there, though. I'll try to get it up and running again, otherwise I'll create some pages on the old NeHe site presenting the same content..

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!