OpenGL Question

This is a discussion on OpenGL Question within the Game Programming forums, part of the General Programming Boards category; Hey guys, I'm 14 years old and already have a pretty good knowledge C++, but i'm wanting to go into ...

  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    5

    OpenGL Question

    Hey guys, I'm 14 years old and already have a pretty good knowledge C++, but i'm wanting to go into game design someday and would like to start learning OpenGL, but I don't know what I need to create graphics in OpenGL. I tried putting some code into the free compiler I got off the internet, but nothing happened. Then I tried searching at bestbuy.com for OpenGL and found nothing. Is there a software I need to buy to be able to use OpenGL? If so what is a good place to purchase it?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,556
    OK, so which free compiler did you get?

    The first step would be to locate the OpenGL libraries compatible with your compiler, before you try to write some code to use those libraries.

    Are you familiar with http://nehe.gamedev.net/
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    If you want to start creating OpenGL applications, forego the system spefic code at Nehe (which is rather convoulted) and find the glut or glfw library. These allow you to start making opengl window applications without knowing system speficic code. recommended if you really want to focus on just openg and not windows specific stuff.

    You have the compiler, now get a good learning resource. The red book is awesome.

  4. #4
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    GLFW is probably the better place to start. GLUT is very old at this point and not being updated much anymore. At least GLFW is still relatively new. The first tutorial also helps you get up and running.

    For a compiler, I'd say go with Visual C++ Express. Its downloadable from the Visual Studio Express page. You'll also want to install the Microsoft Platform SDK by following these instructions.

  5. #5
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Yeah, I use GLFW, the only reason I mention glut is because the red book (at least Version 2 that I have) uses glut. It's easy enough to translate, but a user controlled main loop may be hard to translate from the callbacks that glut provides for beginners.

  6. #6
    Registered User
    Join Date
    Sep 2007
    Posts
    5
    Awesome, thanks for the information guys. Also, why is it that when I create a program using Visual C++ the program will not run? I am positive the code is completely correct but the program will not run.
    Last edited by Halo3Master; 09-30-2007 at 11:49 AM.

  7. #7
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    Quote Originally Posted by Halo3Master View Post
    Awesome, thanks for the information guys. Also, why is it that when I create a program using Visual C++ the program will not run? I am positive the code is completely correct but the program will not run.

    Post the errors you are getting and maybe we can help you. There is no way of knowing what is going on without some source code or idea of the errors you are getting.

  8. #8
    Registered User
    Join Date
    Sep 2007
    Posts
    5
    How do you add a library in Visual C++ 2005 Express Edition????

  9. #9
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    With the express edition you have to download the microsoft platform sdk I believe, then go to properties for the project and change the options to include the necessary libraries. I don't know the exact ones though.

  10. #10
    NotSoAvgProgrammer
    Join Date
    Jul 2007
    Location
    Virginia, U.S.
    Posts
    57
    I'm glad you are taking the opengl route, but I must warn you 3d game programming is no pick nick. You may want to start out with SDL, which is a great 2d library, you can find a complete tut on how to install and run it here.

    But if you really want to jump straight into opengl, you can find a great tut on how to install opengl on msvc++ as well as to make your first programs with opengl here.


    Joe
    A quality job is not necessarily a *good* job. A quality job is, by definition, conformance to requirements. Therefore a *good* job, may not be a quality job.

  11. #11
    Registered User
    Join Date
    Sep 2007
    Posts
    5
    Ok, here is my problem. Using Visual C++ 2005 Express, I imported a code from the internet that I had in a saved file on my hard drive. I had already set up the libraries and all of that stuff. I try compiling the code, and I receive an error message saying that the file or directory did not exist. I can't figure out how to fix this, or where I went wrong. Any advice?

  12. #12
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Which file, which directory?
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  13. #13
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Even if you indicate which libraries you are using, you must indicate additional library lookup and compiler directories so that it knows where to look for them.

  14. #14
    Registered User
    Join Date
    Sep 2007
    Posts
    5
    Quote Originally Posted by indigo0086 View Post
    Even if you indicate which libraries you are using, you must indicate additional library lookup and compiler directories so that it knows where to look for them.
    and where do I indicate the additional library lookup and compiler directories??? i'm only 14 remember

  15. #15
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Go to your project/solution whatever. Right click and go to properties.

    Click on C/C++ -> General. You'll see "Additional Include Directories'. That's where you put the directories that contain the #includes.

    Then Click on Linker-> General. Look a bit down and you'll see additional Library Directories. Add the directories tha contain the .lib files.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Opengl question
    By Shadowwoelf in forum Windows Programming
    Replies: 3
    Last Post: 06-03-2007, 01:21 PM
  2. OpenGL Camera Question
    By Astra in forum Game Programming
    Replies: 2
    Last Post: 03-25-2007, 01:53 PM
  3. Help me Understand (OpenGL Question)
    By Shamino in forum Game Programming
    Replies: 0
    Last Post: 05-06-2005, 05:29 AM
  4. OpenGL Question
    By Shamino in forum C++ Programming
    Replies: 5
    Last Post: 05-05-2005, 02:35 PM
  5. OpenGL and Windows
    By sean345 in forum Game Programming
    Replies: 5
    Last Post: 06-24-2002, 10:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21