View Full Version : Getting Windows Xp, OpenGL 2.1, and VS .net 2008 to behave symbiotically
09-17-2012, 06:19 PM
Hello Everyone, how are you doing?
I am sorry for what I am about to say, because I am frustrated with my lack of progress. For now I will be perfectly satisfied with a bare bones program that renders one red triangle against a blue background. Once this is done, hopefully I will stop harassing you. Before you can help me reach that destination, you should know my starting point.
I am starting off with the necessary ATI drivers, Windows XP, OpenGL Superbible Fourth Edition, and Visual Studio .net 2008. I have been told that "the necessary header and library files are on this page: http://www.opengl.org/registry/#headers." Please note, that I am aware I should be posting error codes, but if I were actually far enough long to get error codes, I would gladly post them.
This page seems to cater to developers whom want the latest version of OpenGL. I do not. I want OpenGL 2.1. Granted this community does not have much money, but we do have something other communities do not. This community has unity, and it is united to help fellow developers. So please help this developer to develop a simple graphics program. Thank you.
09-19-2012, 02:13 PM
If you have never done C++, I would suggest creating a few hello world applications in Visual C++ first before dealing with OpenGL.
09-19-2012, 04:16 PM
Soo... what's your question? You need help with what? What have you done so far?
You already read the getting started page and nehe tutorials?
09-20-2012, 12:10 AM
This page seems to cater to developers whom want the latest version of OpenGL. I do not. I want OpenGL 2.1.
If you want and you know that you need OpenGL 2.1 that's fine. However, as a general advice it's still a good idea to leave legacy OpenGL behind if you start from scratch.
09-23-2012, 03:56 PM
Hello everyone, I am sorry for taking so long to get back to you. Coconut, I am very fluent in C++. I see little to no reason for me to write hello world programs, given that I have created most data structures both from scratch and memory.
Rosario, my question how do I download and setup OpenGL 2.1? I know it requires several libraries and headers to create an interface between my program files, and OpenGL. I have already read the two tutorials, which are the main reason I am frustrated. They are missing two very key steps. It would be similar to telling someone download your printer files, and write "..." in c++. Before one writes anything they need to download and install the appropriate files.
I know in general leaving OpenGL behind is a good idea, but in my case it is not for the reason I stated earlier. If you had a recipe for using wheat to make bread, would you just put the recipe in the trash and try to make corn bread instead. You would probably not do this. Especially, if you vastly prefer having a slip of paper or a book telling you how to make 100's of different kinds of wheat bread.
So once again, I need to download several headers and libraries for OpenGL 2.1. Where can I find these files, and what should I do with them so that I can write code in Visual Studio .Net 2008, which will utilize this files?
09-23-2012, 05:22 PM
For VS 2008 to work with OpenGL you need to do ... nothing.
The core headers and libs come with VS 2008 (even with the Express version), the paths are already set up for you after installing, I'm assuming that you have drivers installed that you know will support at least GL 2.1, so just #include <gl/gl.h>, link to opengl32.lib and you've got everything you need to shoot for any OpenGL version you want.
However, in order to access functionality beyond OpenGL 1.1 you need to use the extension loading mechanism. This involves nothing more than pain, suffering and code-grinding for you, but if you're interested the general outline is here: http://www.opengl.org/wiki/Load_OpenGL_Functions#Windows.
The alternative that is always recommended is to use an extension loading library to do the heavy lifting for you. GLEW is the usual recommendation (there are others) and it's homepage is here: http://glew.sourceforge.net/.
09-24-2012, 03:45 PM
so just #include <gl/gl.h>, link to opengl32.lib and you've got everything you need to shoot for any OpenGL version you want.
I don't think these files were automatically installed in my case for two reasons. One is that when my class attended the OpenGL class, the lab instructors had us download some headers and libraries from the school's servers, and then we were told how to link them in our settings. The other reason is that I have searched my computer for these files, and I no longer have them.
Please note, that since I was in this class, I have had to replace the hard drive, and its been formatted at least twice. Well first what files am I likely to need? How do I ensure that these files will allow me to follow the book's examples, which are based on version 2.1?
Sorry for all the questions, and thank you for helping me solve this problem.
09-24-2012, 04:31 PM
If you've installed VS 2008 properly they should be at "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include" - there will be a "gl" subdirectory there.
Note that when I say "automatically installed" I absolutely mean it - there isn't even an option to not install them.
The files you need are the ones I named in my above post.
09-26-2012, 08:44 AM
Then why when I searched my whole hard drive did I not find it? I will search again just to make sure, and let you know the results, this Thursday. So the two files, "gl/gl.h" and "Opengl32.lib" are the only ones I need? I seem to recall a glee and glut headers. would someone verify this?
Thank you again for all the advice.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.