Win32 API and OpenGL/DirectX

This is a discussion on Win32 API and OpenGL/DirectX within the Windows Programming forums, part of the Platform Specific Boards category; I've been messing around with Windows programming lately, and I was wondering how well you should know it before attempting ...

  1. #1
    Rabite SirCrono6's Avatar
    Join Date
    Nov 2003
    Location
    California, US
    Posts
    269

    Win32 API and OpenGL/DirectX

    I've been messing around with Windows programming lately, and I was wondering how well you should know it before attempting to use OpenGL or DirectX. Should you know the API inside and out, or just basics/intermediate? Say your programming a game, is it important to learn more or less all of the API, or just some? Thanks.

    - SirCrono6
    From C to shining C++!

    Great graphics, sounds, algorithms, AI, pathfinding, visual effects, cutscenes, etc., etc. do NOT make a good game.
    - Bubba

    IDE and Compiler - Code::Blocks with MinGW
    Operating System - Windows XP Professional x64 Edition

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Depends, but generally you just need how to create a window and how to do a message loop.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Rabite SirCrono6's Avatar
    Join Date
    Nov 2003
    Location
    California, US
    Posts
    269
    Hurray! I can do that! Oh well, I'll probably end up learning more anyways

    - SirCrono6
    From C to shining C++!

    Great graphics, sounds, algorithms, AI, pathfinding, visual effects, cutscenes, etc., etc. do NOT make a good game.
    - Bubba

    IDE and Compiler - Code::Blocks with MinGW
    Operating System - Windows XP Professional x64 Edition

  4. #4
    Banned
    Join Date
    Oct 2004
    Posts
    250
    I think it's a good idea to learn a bit more than that before you start game programming i went straight into D3D with minimal knowledge and i found it hard to understand what was going on.
    Make a simple program like a calculator or something you will be surprised how quikly you learn.

  5. #5
    Registered User
    Join Date
    Mar 2004
    Posts
    220
    I'de suggest learning about the structure of a windowed winapi program, how to deal with the messages you recieve, what those messages are constructed from.

    Also, dive into some controls ( buttons, text box's, etc), and message box's. With this you'll have an even greater undestanding of things because you will be working with an MDI program, parent and child windows. Very useful for game programming believe it or not.

    I would also suggest working with DLLs and multi-threading, these areas are key to game programming. You would use multi-threading for something like a loading bar for your game. DLLs are obviously a way to easily debug and make your code modular.

    Really, OpenGL follows an extremely smooth, consistent naming convention. I haven't seen any API that wasn't based off of OpenGL with such a great style of naming conventions, both in practice and consistency. For instance, to draw vertices to the frame buffer, you might call something like:
    Code:
    vertex3f((1.0f,1.0f,1.0f);
    Similarily, if you wanted to use the function with two vertices in an ortho view:
    Code:
    vertex2f(1.0f,1.0f);
    In this respect, OpenGL is extremely simple.

    However, DirectX follows a complex function and class library that quite frankly scares most people from programming in it. Its style follows WinAPI very closely and as such will be easy if you get a _____very_____ good understanding of how WinAPIs function and parameters are named. If you don't have a good understanding of it, you're screwed quite frankly.

    Alot of people start with OpenGL because of DirectX's cryptic nature.

    If you get into software rendering though, things become different of course.
    OS: Windows XP Pro CE
    IDE: VS .NET 2002
    Preferred Language: C++.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Allegro vs OpenGL/DirectX
    By Hannwaas in forum Game Programming
    Replies: 9
    Last Post: 11-12-2001, 12:41 AM

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