Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Juicy

Beginners oGL fun...

This topic is 5716 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

Not to sound like a complete idiot, but I''m left confused between the various versions and platforms available. I have programmed in oGL before (but it was simple stuff and over a year ago now) on a Linux platform using a pre-installed GLUT library. I find myself confused as to what exactly I need to get to start programming oGL on my VC++ 6.0 win32 environment. Half of the info I''ve found either mentions nothing of GL libraries and assumes I have them and know what to do with them and the other half refer solidly to the win32 port of GLUT. I notice the NeHe tutorials give steps to start a project and a simple window, but this appears to not use GLUT (which is probably a good thing). So my question is, if this is the case, can someone point me in the right direction to get some GL library files? Regards.

Share this post


Link to post
Share on other sites
Advertisement
This will sound amazing, but you already have everything you need. MSVC comes with OpenGL libraries.

Ofcorse you have to have OpenGL installed, not the VC++ files, the dlls.

Share this post


Link to post
Share on other sites
Thanks for the help.
So I''m half way there?

Explain; what do you mean by
"you have to have OpenGL installed, not the VC++ files, the dlls"

I ask because it might be so glaringly obvious that I''m missing the point, but if I have the oGL libraries due to having MSVC what more do I need to do, if anything?

Thanks again,
Neil.

Share this post


Link to post
Share on other sites
quote:
Original post by Juicy
Thanks for the help.
So I''m half way there?

Explain; what do you mean by
"you have to have OpenGL installed, not the VC++ files, the dlls"

I ask because it might be so glaringly obvious that I''m missing the point, but if I have the oGL libraries due to having MSVC what more do I need to do, if anything?

Thanks again,
Neil.


You need the OGL runtime libraries in order to be able to run OGL programs. That''s usually taken care of by M$haft Winblows... Don''t worry about them. I''m about pretty sure( 98% ) that you have them on your system already...




[Cyberdrek | the last true sorcerer | Spirit Mage - mutedfaith.com]

Share this post


Link to post
Share on other sites
LOL
"M$haft Winblows"

Ok, I''m set then

Thanks for the information. It''s rare to find a forum where people are so happy and quick to help out.

Regards,
Neil.

Share this post


Link to post
Share on other sites
Some added info for you....
Win98 and something after that (whatever they name it! ) comes with OpenGL. If you still use win95, you can download one from microsoft.

GLUT is a platform independent windowing toolkit, which make it a lot easier to use, compared to WinAPI.

Share this post


Link to post
Share on other sites
I was tempted to make my oGL code a class which will be portable code, then have any platform specific code seperate, but using this class.

I''m not too sure of the implications of trying this, but I need to make the code portable.
The reason for this is I will be developing on a linux environment using GLUT and on a win32 platform using MSVC.

Again, though, thankyou for the information.

Share this post


Link to post
Share on other sites
Hi Juicy,
I''m a beginner too and once I get my feet under me I plan to be on here asking questions a LOT, so I will take this opportunity to help you.

I''m actually learning Visual C++ 6.0 and OpenGL simultaneously and it''s been a hoot. I have a friend who has professional experience at OpenGL who''s been helping me along the way.

Do you have a book you''re using to learn OpenGL from? I''m using Game Programming with OpenGL (the one recommended on the main NeHe page) and I can''t say enough good things about it.

Anyway, if you have at least Windows 98, then if you follow the following instructions you will be able to get started using OpenGL inside VC++ quickly:

1. Click File/New, choose Project/Win32 application, give it a name, and choose "empty project".
2. Cick Project/Settings/Link, Category Input, and if they''re not already there, add glu32.lib opengl32.lib to the end of the line. You might need to add another if you want to use glut - the book I''m learning from doesn''t touch glut.
3. Click Tools/Options, click the Directories tab, choose Library files from the Show Directories For dropdown, and make sure that wherever those files are stored on your machine is in the list of directories.

From here you should be able to compile, link, and run any basic Windows program. I would paste you some code, but the only sample code I have is plagarized from the above book and I don''t want to get in trouble. I''m sure you can find some code to play with if you go to the website of the authors of that book though.

Do you know MFC at all? I''ve been playing around with MFC and I''ve figured out how to incorporate MFC with OpenGL. It''s actually not hard at all - every dialog object has a device context property, all you have to do is send it to wglCreateContext or whatever that is. You can create two dialogs and have one contain controls like spin buttons or color selectors and then have the second dialog render based on the first''s settings.

I haven''t yet figured out how to declare *part* of a dialog''s device context as the rendering device (so you could have buttons along the bottom and have the rendering result on the remainder of the one dialog, eliminating the need for two) but I''m sure it''s possible.

I hope this helps!

Joe

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I''d stay away from GLUT. It is portable, but it is lacking a lot of features that Windows and Linux have to offer.

Share this post


Link to post
Share on other sites
quote:
Original post by DalTXColtsFan
..*deletia*..

I hope this helps!

Joe


It did. I''ve yet to get the time to sit down and try this out, but I''ve used MSVC before. But your hints are always welcome, and in fact you reminded me about the including of the .dlls which I''d have forgotten and no doubt caused me lots of hasstle

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!