Thread: I know SDL, should I learn openGL? - for a simple program

  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    137

    I know SDL, should I learn openGL? - for a simple program

    i've been learning c++ for a while now. I know enough c++ to make the program I want, and I know enough SDL to make the interface. Should I learn OpenGL or DirectX and Win32 instead of SDL?

    I want to make a simple program that just deletes certain files. But i want to give it an interface so I need to know some API's.

    also this has been bothering me for a while. cin is a variable that stores whatever is in the input stream right? then how come the program doesn't need more memory every time you type something?

  2. #2
    C++ Enthusiast jmd15's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    532
    Well, for the kind of program you are talking about, it sounds like using the Win32 API would do just fine. It is quite easy, maybe a bit tough to get down at first but in the end you'll realize how easy it really was. I would go with Win32, it has basic GDI functions and can make windows, dialogs, and all kinds of child windows. OpenGL(used in windows, and not using glut) actually requires the use of the Win32 API. The Win32 API is extremely useful for so many different things.
    Last edited by jmd15; 11-27-2005 at 03:25 PM.
    Trinity: "Neo... nobody has ever done this before."
    Neo: "That's why it's going to work."
    c9915ec6c1f3b876ddf38514adbb94f0

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    You don't need directx, opengl or SDL to write a windows interface unless you want to use these.

    Quote Originally Posted by yahn
    also this has been bothering me for a while. cin is a variable that stores whatever is in the input stream right? then how come the program doesn't need more memory every time you type something?
    Code:
    cin >> Variable
    cin takes input and stores it in a variable, space for the input has allready been alocated when that variable was declared.

  4. #4
    Registered User
    Join Date
    Nov 2005
    Posts
    137
    ok thanks for the quick replies. I guess i'll just go with win32 then.

  5. #5
    !anExpert
    Join Date
    Mar 2005
    Location
    pa
    Posts
    155
    >> I guess i'll just go with win32 then.

    You could always check out a portable toolkit. such as Qt or wxWidgets.... They are also alot nicer to work in, IMO.

  6. #6
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    Quote Originally Posted by xhi
    >> I guess i'll just go with win32 then.

    You could always check out a portable toolkit. such as Qt or wxWidgets.... They are also alot nicer to work in, IMO.
    I'll second that. Win32 is a C API, why don't you use a nice OO C++ API?

    Win32 is old, ugly and requires you to write waaay too much boilerplate code. wxWidgets is really nice, OO, portable and best of all your GUI will look native on each platform!
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with simple program
    By nik2007 in forum C++ Programming
    Replies: 4
    Last Post: 02-27-2006, 09:54 AM
  2. I want to learn openGL......... but
    By Muphin in forum Game Programming
    Replies: 15
    Last Post: 07-20-2005, 04:35 PM
  3. linking an opengl program
    By raits in forum C++ Programming
    Replies: 11
    Last Post: 03-11-2003, 01:54 PM
  4. opengl program as win API menu item
    By SAMSAM in forum Game Programming
    Replies: 1
    Last Post: 03-03-2003, 07:48 PM
  5. Simple Chat program. Help.
    By knave in forum C++ Programming
    Replies: 0
    Last Post: 09-16-2001, 02:35 AM