RSS Forums RSS
Please support our Game Development advertiser: Programming Forums
Views: 3721 | Replies: 8 | Solved
Reply
Join Date: Oct 2005
Location: Illinois, USA
Posts: 18
Reputation: JC_McGeekster is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
JC_McGeekster's Avatar
JC_McGeekster JC_McGeekster is offline Offline
Newbie Poster

Question DOS Graphics

  #1  
Jun 12th, 2006
Hello,


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.


Thanks,

Jordan C. McGee
Last edited by JC_McGeekster : Jun 12th, 2006 at 5:40 pm.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2005
Posts: 6
Reputation: blacklight is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
blacklight blacklight is offline Offline
Newbie Poster

Re: DOS Graphics

  #2  
Jun 12th, 2006
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
Reply With Quote  
Join Date: Oct 2005
Location: Illinois, USA
Posts: 18
Reputation: JC_McGeekster is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
JC_McGeekster's Avatar
JC_McGeekster JC_McGeekster is offline Offline
Newbie Poster

Re: DOS Graphics

  #3  
Jun 13th, 2006
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,

Jordan
Reply With Quote  
Join Date: Apr 2004
Posts: 3,763
Reputation: Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light 
Rep Power: 17
Solved Threads: 147
Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: DOS Graphics

  #4  
Jun 13th, 2006
Is your OS actually DOS? (As opposed to a command shell within Windows which is not DOS?)
High Plains Blogger #plains #lounge ## I, for one, welcome our new socialist overlords.
"Capitalism is the unequal distribution of wealth. Socialism is the equal distribution of poverty."
Reply With Quote  
Join Date: Oct 2005
Location: Illinois, USA
Posts: 18
Reputation: JC_McGeekster is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
JC_McGeekster's Avatar
JC_McGeekster JC_McGeekster is offline Offline
Newbie Poster

Re: DOS Graphics

  #5  
Jun 13th, 2006
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.
Last edited by JC_McGeekster : Jun 13th, 2006 at 11:41 am.
Reply With Quote  
Join Date: Apr 2004
Posts: 3,763
Reputation: Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light 
Rep Power: 17
Solved Threads: 147
Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: DOS Graphics

  #6  
Jun 13th, 2006
Why not get Dev-C++, check out OpenGL, and go through these OpenGL Tutorials? That's what a lot of folks do.
High Plains Blogger #plains #lounge ## I, for one, welcome our new socialist overlords.
"Capitalism is the unequal distribution of wealth. Socialism is the equal distribution of poverty."
Reply With Quote  
Join Date: Oct 2005
Location: Illinois, USA
Posts: 18
Reputation: JC_McGeekster is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
JC_McGeekster's Avatar
JC_McGeekster JC_McGeekster is offline Offline
Newbie Poster

Re: DOS Graphics

  #7  
Jun 13th, 2006
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?
Reply With Quote  
Join Date: Dec 2005
Posts: 6
Reputation: blacklight is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
blacklight blacklight is offline Offline
Newbie Poster

Re: DOS Graphics

  #8  
Jun 13th, 2006
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...
Reply With Quote  
Join Date: Oct 2005
Location: Illinois, USA
Posts: 18
Reputation: JC_McGeekster is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
JC_McGeekster's Avatar
JC_McGeekster JC_McGeekster is offline Offline
Newbie Poster

Re: DOS Graphics

  #9  
Jun 13th, 2006
Okay, sounds great! I suppose I'm going to start using OpenGL. Thanks for all the links and information and great advice!


-- Jordan
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:36 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC