Another question about Glaux Replacement Code
I know questions on this topic have been asked before, but this is a different one.
Glaux.h is outdated. Nehe therefore provides a Glaux replacement.cpp.
I don't see how this can replace Glaux.h. One is a cpp one is a header file. I tried renaming Glaux replacment.cpp to Glaux.h but it doesn't work and besides if that was all I needed to do, why did he distribute it as Glaux replacement.cpp and not glaux.h?
How do I take this replacement c++ source code file and make it replace the outdated header file?
I created a new win32 application (not console) in visual c++ 9 express. i created a new file called lesson3.cpp. i pasted the contents of the source code for tutorial #1 in nehe's tutorial. i added the necessary #include "stdafx.h" to that file.
I then changed the include glaux.h to bmp.h
i then added bmp.h and bmp.cpp. (also adding the stdafx.h to the bmp.cpp)
first off..
even though i added bmp.h to the project.. by right clicking header files in the visual studios IDE and clicking add, then 'existing item" and navigating to bmp.h, when i try to debug the project it says cannot find bmp.h. even though i see it right there in the project files browser on the left.
i'm completely lost here. and i've never seen stdafx.h before and have no clue why i'm being forced to include that in every cpp file.
[Edited by - sharpnova on June 7, 2008 7:49:12 PM]
Everyone hates #1.That's why a lot of idiots complain about WoW, the current president, and why they all loved google so much when it was new.Forget the fact that WoW is the greatest game ever created, our president rocks and the brainless buffons of America care more about how articulate you are than your decision making skills, and that google supports adware, spyware, and communism.
Uhm, well I guess you included the bmp.h and bmp.cpp by lc_overlord from this (http://www.gamedev.net/community/forums/topic.asp?topic_id=275238) thread.
Your include should be #include "bmp.h" and not #include <GL/glaux.h> because the < > tell the compiler to look in its include path, not in your project folder.
The stdafx.h thing is included by VS to make it easier to create Windows applications, you can use it if you create MFC forms or whatever. But for OpenGL: just remove it, it really should not be of any advantage (as far as I know, but Linux user here..)
Hope that helps
Your include should be #include "bmp.h" and not #include <GL/glaux.h> because the < > tell the compiler to look in its include path, not in your project folder.
The stdafx.h thing is included by VS to make it easier to create Windows applications, you can use it if you create MFC forms or whatever. But for OpenGL: just remove it, it really should not be of any advantage (as far as I know, but Linux user here..)
Hope that helps
Member of the NeHe team | PhD Student at Heidelberg Collaboratory for Image Processing | ProCamera Developer
Sorry I thought I was clear. My post was a bit jumbled.
I added the bmp.h and bmp.cpp to my project but when I went to debug, visual studios still said it could not find the file.
I'm using Visual C++ 9.0 express. And yes I did remove the glaux.h.
I wen tot header files in the project thing on the left, right clicked, add -> existing item, navigated to bmp.h on my desktop.
Then in my cpp file i changed <glaux.h> to "bmp.h" and then I went to debug and it still said "bmp.h not found".
Do I always need to navigate to my project folder with windows explorer and manually put new files in there? If so, why does Visual C++ even have the Add option? It apparently does nothing.
This is really confusing me. I don't understand why even though I added bmp.h to my project it keeps saying as the FIRST error when I debug: No file bmp.h No file or directory.
EDIT:
well I got help from the OpenGL forum. I'm very new to IDE's in general. Didn't know I need to move source/header files into my project directory manually. In this respect I would say Visual Studios is pretty primitive. Should at least have an option to ask me if I wanted to copy files to the project directory when adding them via the solution explorer. Either way now I'm fine. This and downloading the Windows SDK (something else I wasn't even aware existed until someone told me about it today) solved all my problems.
[Edited by - sharpnova on June 10, 2008 2:48:15 AM]
I added the bmp.h and bmp.cpp to my project but when I went to debug, visual studios still said it could not find the file.
I'm using Visual C++ 9.0 express. And yes I did remove the glaux.h.
I wen tot header files in the project thing on the left, right clicked, add -> existing item, navigated to bmp.h on my desktop.
Then in my cpp file i changed <glaux.h> to "bmp.h" and then I went to debug and it still said "bmp.h not found".
Do I always need to navigate to my project folder with windows explorer and manually put new files in there? If so, why does Visual C++ even have the Add option? It apparently does nothing.
This is really confusing me. I don't understand why even though I added bmp.h to my project it keeps saying as the FIRST error when I debug: No file bmp.h No file or directory.
EDIT:
well I got help from the OpenGL forum. I'm very new to IDE's in general. Didn't know I need to move source/header files into my project directory manually. In this respect I would say Visual Studios is pretty primitive. Should at least have an option to ask me if I wanted to copy files to the project directory when adding them via the solution explorer. Either way now I'm fine. This and downloading the Windows SDK (something else I wasn't even aware existed until someone told me about it today) solved all my problems.
[Edited by - sharpnova on June 10, 2008 2:48:15 AM]
Everyone hates #1.That's why a lot of idiots complain about WoW, the current president, and why they all loved google so much when it was new.Forget the fact that WoW is the greatest game ever created, our president rocks and the brainless buffons of America care more about how articulate you are than your decision making skills, and that google supports adware, spyware, and communism.
I'd just like to toss in my 2 cents real quick...
NeHe's tutorials are great. I love them. I'm learning a lot about OpenGL.
But it IS kind of disorienting for beginners like me to be cruising along doing well with the tutorials, having everything work... and then hitting an absolute barrier. We don't know how to use replacement code. We don't know how to use header files. We're just following instructions. I changed a few coordinates here and there to mess with the graphics and colors, but that's it.
If you want the tutorials to be useful for beginners, this really needs to be addressed. The tutorials start out with a story about how it was hard for the author to get help figuring out OpenGL, so he was writing clear, concise tutorials to cover the entire process step-by-step for beginners. The Glaux problem really violates the spirit in which the tutorials, up to that point, have been written. Sure, we can look for files, post on messageboards, and eventually find the answer. But I thought the point of the tutorials was to spare us poor n00bs that kind of trouble, and put everything we need in one place, in one procedure, without side trips or extra research.
Frankly, there must be a way people load bitmaps for textures these days without using glaux. Why not update the tutorials to include that method, whatever it is? Isn't there something in GLUT that can do it?
NeHe's tutorials are great. I love them. I'm learning a lot about OpenGL.
But it IS kind of disorienting for beginners like me to be cruising along doing well with the tutorials, having everything work... and then hitting an absolute barrier. We don't know how to use replacement code. We don't know how to use header files. We're just following instructions. I changed a few coordinates here and there to mess with the graphics and colors, but that's it.
If you want the tutorials to be useful for beginners, this really needs to be addressed. The tutorials start out with a story about how it was hard for the author to get help figuring out OpenGL, so he was writing clear, concise tutorials to cover the entire process step-by-step for beginners. The Glaux problem really violates the spirit in which the tutorials, up to that point, have been written. Sure, we can look for files, post on messageboards, and eventually find the answer. But I thought the point of the tutorials was to spare us poor n00bs that kind of trouble, and put everything we need in one place, in one procedure, without side trips or extra research.
Frankly, there must be a way people load bitmaps for textures these days without using glaux. Why not update the tutorials to include that method, whatever it is? Isn't there something in GLUT that can do it?
Yeeah you're right.
Thats exactly the point why we were writing new NeHe Lessons over the last 2 years. Problem was that at the beginning we have been a huge team of voulounteers and everyone had other thoughts how to structure these.
Now we're only a 2-men-team and we've made good progress in the last few weeks. Think I'm going to release the 3 new ones within the next 2 days. Its a completely new branch of tutorials, again with explanation for every step. Loading textures will be achieved without glaux as its really old. But thats something for lesson 5 which is not yet done.
But there's something else you noticed correctly: you don't learn how to program, but how to use OpenGL.
The new tutorials use a good C++ style which needs some basic knowledge of the programming language.
Jeff said in his declaimer or somewhere, that he wont teach you programming so this was up to you. One part of learning how to program is getting to know your IDE. If sharpnova knew VS he wouldnt have had this problems.
Cheers
Carsten @ NeHe-Team
Thats exactly the point why we were writing new NeHe Lessons over the last 2 years. Problem was that at the beginning we have been a huge team of voulounteers and everyone had other thoughts how to structure these.
Now we're only a 2-men-team and we've made good progress in the last few weeks. Think I'm going to release the 3 new ones within the next 2 days. Its a completely new branch of tutorials, again with explanation for every step. Loading textures will be achieved without glaux as its really old. But thats something for lesson 5 which is not yet done.
But there's something else you noticed correctly: you don't learn how to program, but how to use OpenGL.
The new tutorials use a good C++ style which needs some basic knowledge of the programming language.
Jeff said in his declaimer or somewhere, that he wont teach you programming so this was up to you. One part of learning how to program is getting to know your IDE. If sharpnova knew VS he wouldnt have had this problems.
Cheers
Carsten @ NeHe-Team
Member of the NeHe team | PhD Student at Heidelberg Collaboratory for Image Processing | ProCamera Developer
Yes it was a pretty silly problem. Unfortunately I had to go and get some extra windows files (definition of some of those datatypes in the bmp.h etc.) as well which was not really related to knowledge of VS.
I'm much more proficient in this IDE now though and I'm looking forward to the new tutorials very much.
I'm much more proficient in this IDE now though and I'm looking forward to the new tutorials very much.
Everyone hates #1.That's why a lot of idiots complain about WoW, the current president, and why they all loved google so much when it was new.Forget the fact that WoW is the greatest game ever created, our president rocks and the brainless buffons of America care more about how articulate you are than your decision making skills, and that google supports adware, spyware, and communism.
Uhm.. they're already there [wink]
Member of the NeHe team | PhD Student at Heidelberg Collaboratory for Image Processing | ProCamera Developer
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement