Thread: Info on Graphics for Game Programming.

  1. #1
    Registered User
    Join Date
    Feb 2012
    Location
    Defiance, Ohio, United States
    Posts
    4

    Info on Graphics for Game Programming.

    I've been looking all over the place for books on DirectX and OpenGL. But I am not getting what I'm looking for. I've programmed a few text-based RPGs and want to learn to program graphics but can't find a sufficient source. Suggestions?

  2. #2
    Registered User
    Join Date
    Feb 2012
    Location
    Defiance, Ohio, United States
    Posts
    4
    In both OpenGl and DirectX, I know how to render objects and do the typical transforms. I don't know how to render external models, and print images to the screen however. I am kinda lost!

  3. #3
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,739
    You need loaders for those specific models/images to import them inside your game , either get open-source ones for the code or build your own. But the 2nd way requires a deep understanding of each specific file format.

    For example:
    Wavefront .obj file
    BMP file format
    Devoted my life to programming...

  4. #4
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Depends on what you want to do, but I'd suggest using something like the SDL. It's a framework that handles input/output and integrates well with OpenGL; it can load BMPs right up front and with SDL_image you get a dozen other formats (including PNG and JPG). So that's textures taken care of. For models, you can hard-code some basic ones, but it wouldn't hurt to get an MD2 loader or (Wavefront) OBJ loader. There are many free loaders for both of those formats on the internet. You can find tons of free models too (particularly for MD2), and it doesn't take long to install blender and try creating a few models of your own.

    MD2 supports animation and it's really meant for game characters. OBJ is a nicer format and it's easy to export to and write your own loader for. Take your pick.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  5. #5
    Registered User
    Join Date
    Feb 2012
    Location
    Defiance, Ohio, United States
    Posts
    4
    Ok. I'll into the stuff. I just recently made my own sprite displaying routine. Thanks for the advice. I'll post if i run into any more trouble.

  6. #6
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    For OpenGL i would recommend this set of tutorials to get up and running quickly: OpenGL

    It doesn't go as indepth as one would like at times but you get a good general grasp of how to do things (and maybe more importantly, it covers the newer versions of OpenGL that don't use the fixed function pipeline).

    This looks to be a more indepth guide to OpenGL: Learning Modern 3D Graphics Programming (haven't gone through it myself but from the small parts i've read it seems to be rather good).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. info and algorithms for 3D graphics
    By megafiddle in forum Tech Board
    Replies: 6
    Last Post: 04-09-2011, 07:41 AM
  2. Introductory Graphics in C, Info & Tutorial
    By Adak in forum Game Programming
    Replies: 5
    Last Post: 03-16-2009, 05:57 PM
  3. Replies: 0
    Last Post: 03-31-2007, 12:30 PM
  4. Parallel Programming PVM , any info ?
    By GSalah in forum Linux Programming
    Replies: 1
    Last Post: 11-24-2006, 05:23 PM
  5. info on my game
    By Leeman_s in forum C++ Programming
    Replies: 8
    Last Post: 05-04-2002, 06:59 PM