Thread: Graphics Programming :: Approach and Books

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348

    Graphics Programming :: Approach and Books

    Hello,

    I am an experienced C++ programmer especially on the Win32 platform (MFC, Win32 API, etc.). I am limited experience on intensive graphics programming including OpenGL and DirectX. I have some general questions about graphics programming.

    1) I often read about how DirectX does not work well with MFC. Is that accurate?

    2) Is DirectX platform independent?

    3) Is OpenGL platform independent?

    4) What do graphics programmers including gamers use: DirectX or OpenGL?

    5) What is more extensible, and essentially, better graphics API on the Win32 platform? What are some good books for learning this graphics programming tool?

    6) What is the future of graphics programming especially on the Windows platform?

    As you can see, my experience and knowledge in graphics programming is quite limited. I'd appreciate any insight.

    Thanks,

    Kuphryn

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    470
    I've gotten MFC and opengl to work with MFC. I'm sure you could directX to work as well. Most likely it just involves getting the correct device context, but since directx works with screen positions you will have to a little translation from client coordinates.

    2) Is DirectX platform independent?
    Within the window's operating system's it is, but I don't believe it works anywhere else but windows.

    3) Is OpenGL platform independent?
    It pretty much is, at least on systems that you'd actually want to use the graphics on them.

    4) What do graphics programmers including gamers use: DirectX or OpenGL?
    What I'm read, pretty much both. Directx, I think, is used more often, however.

    5) What is more extensible, and essentially, better graphics API on the Win32 platform? What are some good books for learning this graphics programming tool?
    I think OpenGL is easier to use, but I haven't done too much 3d programming with it.

    6) What is the future of graphics programming especially on the Windows platform?
    Not too sure.

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Okay. Thanks.

    Kuphryn

  4. #4
    Registered User dalek's Avatar
    Join Date
    May 2003
    Posts
    135
    Okay, I'm not the worlds most experienced graphics programmer, but I have been studying the subject (in relation to games) for many years, so I may have something useful to say. Or not.
    1) I often read about how DirectX does not work well with MFC. Is that accurate?
    I believe it is fine. I am not an MFC programmer (although I have dabbled with it), but I have noticed that the DX9 SDK does contain some samples that are written in MFC. I couldn't imagine why there would be any problems, DX9 is really just a COM architecture.
    2) Is DirectX platform independent?
    No - there are a number of versions of DX, but they are all for windows platforms.

    3) Is OpenGL platform independent?
    Yes - there is a version of OpenGL that is available for just about every platform.
    4) What do graphics programmers including gamers use: DirectX or OpenGL?
    It really depends - For example, DOOM III which is due to be released this year is written in OpenGL, and they are going to have a Linux and Win32 Port faciliated by the fact that they are using a platform independant API.

    When the original Half Life was released, it came with support for both API's.

    But here is a bit of a generalisation that may help. OpenGL tends to be used a lot in Applications of an industrial nature, I know that there are many CAD programs that use OpenGL, Aeroplane instrumentation - in some cases - uses OpenGL, and a lot of simulation style applications use OpenGL.

    Games on the other hand, these days, are using DirectX a lot more frequently, and rendering packages such as 3DS Max and Maya (I think) are using DirectX.

    But at the end of the day, it really is up to the developer - you can do almost everything in one, that you can do through the other.
    5) What is more extensible, and essentially, better graphics API on the Win32 platform? What are some good books for learning this graphics programming tool?
    This is a good question to start a flame. But - I will give it a go. I think it is a case of try both out, and see which your most comfortable with. OpenGL tends to have an easier syntax (although that is just my opinion) and DirectX tends to feel more comfortable with those that are already accustomed to COM and Win32.

    Also - it is worth noting that OpenGL is just a rendering API, DirectX is the whole shebang, containing components for playing movies, music, user input, 3D graphics, and other bits and pieces.

    Most of the books I have read are game related, so may not be ideal for your purposes - but there are many good books from Prima press in the game development series.

    Check out Nehe's Tutorials on OpenGL. One of the best sites out there for OpenGL tutorials, even if your not going to do game programming.

    Oddly enough, it is quite difficult to find online tutorials for DX, but there are some good ones that come with the SDK and if you check Gamedev.net there are a few there too.
    6) What is the future of graphics programming especially on the Windows platform?
    Tricky. Well, OpenGL is not officially supported under windows. The DLL that comes with windows is version 1.1 and the rest of the world is up to 1.4 with plans for 2.0. You can obtain a DLL for windows that is 1.4 compliant, but there is no group of developers who have commited to porting version 2.0 (when it is released) and many people think it is unlikely Microsoft will do it. SGI used to do this for Windows. So more and more you may find you have to use OpenGL extensions for the latest features, which can be difficult to deal with when targetting different hardware.

    DirectX is always up to date - simple as that really. Now, I have always been an OpenGL fan, but I am thinking that DX may be the way on Win32. There is no real technical reason why you would choose one over the other to render graphics, especially if you are not using the latest shader technology or what have you. But DX is up to date, it is designed for Win32. Just don't go there if you need to be cross platform at some stage.

    Hope this helps.

    [EDIT]
    Crap - Beaten! I kept getting interupted while writing this (i am at work I suppose! ) and so I got beaten by a mile.
    Last edited by dalek; 05-11-2004 at 07:52 PM.

  5. #5
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Okay. Thanks.

    Kuphryn

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. right approach!
    By tarun in forum C Programming
    Replies: 14
    Last Post: 08-19-2002, 08:00 PM