Thread: OpenGL Lesson 3

  1. #1
    Beginner Programmer
    Join Date
    Aug 2004
    Posts
    5

    Question OpenGL Lesson 3

    Hello everyone,

    I am very new to C++ and OpenGL, and I'm having a problem with the code in the OpenGL lesson three by RoD. Here's the code I'm having a problem with.
    When I compile this it just sits there then the compile log box disapears and when I try to run the program it says "Project Not Compiled!". I'm using Dev-C++ and my operating system is Windows 98 SE. I don't know if it's the compiler or the code.
    My question is, what is going on here? Why will it not compile?
    Any help is very much appretiated.

    Thanks,
    Jamison

  2. #2
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    Code:
    #pragma comment(linker, "/subsystem:windows")
    /*	Pre-processor directives*/
    #include "stdafx.h"
    I don't know about the first line there, but stdafx.h is usually used with MSVC (I believe), and unless you made one yourself I don't think Dev-C++ has one.

    Try commenting out those lines.
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  3. #3
    Beginner Programmer
    Join Date
    Aug 2004
    Posts
    5

    Question Doesn't work!

    Is C++ to advanced for a beginner programmer like me? Do you suggest a language I should already know before I go more into C++?

    Thanks again,
    Jamison

  4. #4
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Quote Originally Posted by Gonavitch
    Is C++ to advanced for a beginner programmer like me? Do you suggest a language I should already know before I go more into C++?

    Thanks again,
    Jamison
    Learning C++ as a begginer is fine, but starting out with C++ and OpenGL is not a good idea. Get a good hold on C++ then move on to OpenGL.

  5. #5
    Beginner Programmer
    Join Date
    Aug 2004
    Posts
    5
    Quote Originally Posted by Perspective
    Learning C++ as a begginer is fine, but starting out with C++ and OpenGL is not a good idea. Get a good hold on C++ then move on to OpenGL.
    What all could C++ do? Not for games! Just what kinds of stuff can it do.

  6. #6
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    Well C++ in its pure form really cant do any "graphical" games. YOu could do some text based games, not to mention tic tac toe, and connect 4, and those types of games. Just no graphics.

    But to do graphics you need a graphics library.

    With that being said, you still need a good foundation to before you can build a house.

    So learn the basics of C++ and become comfortable with the language. Then I suggest a simple grahics library like Allegro or SDL. With OpenGL and DirectX you have to worry about all kinds of Windows API stuff that will probably make you cry in your sleep (it does me).

  7. #7
    Beginner Programmer
    Join Date
    Aug 2004
    Posts
    5
    How far into the basics should I go? Currently I know how to use input, output, variables, functions, arrays, if statements, and loops. Is this enough basics?

  8. #8
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    >>Is this enough basics?

    Probably not

    I would recommend learning quite a bit more than that before starting any graphical programming. Some other things you should learn (to name a few): pointers, structs and classes, and learning more of the standard library couldn't hurt either.

    If you can afford it, a beginner's C++ book might be a good idea. If not, then you might search the web for some tutorials. (Also the search feature on this board might come in handy)

    If you feel ready to start graphics/game programming then don't let us stop you, though. Just keep in mind you can always get back to the basics if you find you aren't ready
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  9. #9
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    I didnt know much at ALL, when I first started using allegro. Allegro comes with some good docs and you can find plenty o tuorials

    Use the search and search for user Vicious and look at my first several posts... wow... lol

    But seriously, go ahead and go to www.allegro.cc and see if your ready

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linking OpenGL in Dev-C++
    By linkofazeroth in forum Game Programming
    Replies: 4
    Last Post: 09-13-2005, 10:17 AM
  2. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  3. OpenGL .dll vs video card dll
    By Silvercord in forum Game Programming
    Replies: 14
    Last Post: 02-12-2003, 07:57 PM
  4. OpenGL and Windows
    By sean345 in forum Game Programming
    Replies: 5
    Last Post: 06-24-2002, 10:14 PM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM