These past few months I have been working with the C language. Before that, I was writing console applications with C++. I eventually got to the point where I couldn't seem to do anything more with C++, so I decided to use C as I know it is better for what I wish to do.
I've been wanting to to experiment with graphics -- specifically three-dimensional graphics. Using the Turbo C compiler, I've gotten as far as creating the illusion of a 3D room in which you can move around in. Unfortunately, this was only wireframe, and you could not rotate the camera to look behind or on the sides of the screen.
Now, after looking at some 3D engines' source and reading various tutorials, I'm left with some basic questions.
First, I know that C is capable of doing just what I want to do: create a 3D engine with basic texture mapping, lighting, and transparencies. These are all three things that I do not yet understand how to do. But, before I can do any of these features, I must first know how to solve yet another problem: how do you go about rendering graphics off-screen? What I mean, is how can you render graphics that you won't see until the camera moves towards or rotates towards that direction?
Also, is Turbo C the correct free compiler for me to use to experiment with graphics? It does have a graphics library afterall. But then, I believe I could use the VGA modes directly, without using the graphics library. I've found some tutorials on this, but apparently I need to be running DOS in order to compile and view these VGA graphics applications properly.

So, here are my top questions:

  • Should I use Turbo C for my graphics experiments or should I access the VGA video mode directly?
  • How do you render graphics off-screen and paint them when the camera looks towards that part of the screen?

Additionally, if I can get these questions answered, I would like to understand how to do stuff like texture mapping onto a polygon and whatnot.


Jordan C. McGee

12 Years
Discussion Span
Last Post by JC_McGeekster

TurboC compiler and libraries are quite limited... more any more serious coding I suggest you install "recent" compilers. There are tons of free compilers around (VC2005 express is free to use for a while, with that you can do graphics with windows GDI or directX... ).
But heh, I dont criticize; since I built my first tools with TurboC, and it's a learning platform like another. I'm just wondery "why"... (2006!!! not 1996!!!)

Cool DOS graphics can be made with the "Allegro" library; it simplify all the SVGA usage; letting you focus on what you want to do (your 3D graphics!). Not sure it's compatible with TurboC; you may want to check out DJGPP compiler.

good luck


The reason why I wish to go back to the early '90s is because that's when all the great DOS graphic applications were written. And DOS graphics is a fantastic start for a beginner from what I've read, so I wish to start there too.

I suppose I could check out Allegro again. It wouldn't be the first time I thought about using Allegro. But, if anyone has anything more to add to this thread, please do!

Thanks for the help,



No, I'm running WinXP. I've been using the command line to compile my programs.

I do, however, have a computer that is currently not in use. And I've been thinking of running DOS on it instead. But, then, I'm not so sure. I've never had much experience with operating systems in terms of development capabilities. I know that DOS isn't at all good for a developer, but it would be easier for what I wish to do, I think.


Sorry about the time it took to reply.

I already have Dev-C++, so I'm good there. I've taken a look at the OpenGL website and it looks pretty great. The thing is, is that it's not the technology that I wanted to use. But it'll have to do, it seems. No one can point me where I need to go for DOS graphics, unless that can be done with OpenGL.

I have another question: Do you think that OpenGL is good for someone of my experience -- pretty much a complete beginner to 3D graphics? If so, is it simple to learn and use?


No one can point me where I need to go for DOS graphics, unless that can be done with OpenGL.

If you want to do your own rasterization, "pixel by pixel" display; yes you can do that with openGL. Just create a openGL window; then there are calls like glDrawPixels() , you give this function an array in the format you choose (for example, array of RGBA bytes for a 32 bit display). OpenGL offers double-buffering and full-screen mode.
If you want color-index mode, it's offered by openGL but I never used it; RGB modes are more powerful anyway.

So... with openGL you can go to the lower level and build your polygons pixel by pixel if you really want to... but you can also use the hardware acceleration to do that and let openGL do all the dirty work. :-)

Do you think that OpenGL is good for someone of my experience -- pretty much a complete beginner to 3D graphics? If so, is it simple to learn and use?

Yes yes yes, thats the best 3D library out there for those who want to learn "from the ground up". (like you already started very well, if you made your own wireframe 3D view). DirectX APIs are a total mess and will be thrown to garbage with the next DirectX10; in my opinion directX is absolutely not a good learning platform.

There are good online tutorials about openGL (see neHe tutorials). But my favorite everyday reference is "the red book" , the official programming guide. Just search for "opengl red book" on google...


Okay, sounds great! I suppose I'm going to start using OpenGL. Thanks for all the links and information and great advice!

-- Jordan

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.