Jump to content
  • Advertisement
Sign in to follow this  
OCcsdude

Some 3d Questions

This topic is 4846 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have been working on sort of an api of my own to learn exactly how 3d works. I have some questions about texturing objects. Does a typical game engine keep all image data at all times in memory (ie: it knows where every pixel is in an image and its rgb values) or does it dynamically read an image file, reading one or a group of pixels at a time and displaying them on the screen. Basically, I just want to understand the theory behind it more, I know those questions don't make much sense. I understand that you have to average the rgb values of texels that land on the same area on the screen, but I'm wondering how efficient the process of displaying texels is (or can be). I'm just looking for concepts. Thanks a lot ;o).

Share this post


Link to post
Share on other sites
Advertisement
All the data in stored in memory, and video RAM is prefered for that.

The reason is very simple: Reading from disk is utter slow. And after that uber slow reading, it also needs to push all the data through the pipeline to the videocard. You're probably going to be happy with 1fps using that method.

What DirectX and OpenGl allow you to do, is that you load the image data(And vertex/index buffers) from disk, and push them through the pipeline before you start rendering. When you're going to texture or render stuff, you use the pointers in video ram to the data. This way, you don't need to push large amounts of data through the pipeline.

Toolmaker

Share this post


Link to post
Share on other sites
The simple answer is "yes", all image data is kept in memory so that it can be accessed quickly for drawing. It takes a long time to read data off the disk.

The real answer is "it depends".

Share this post


Link to post
Share on other sites
Thanks, I appreciate it. I guess I'll mess with using some very small textures first. I plan on integrating direct3d or opengl into my program sooner or later. I'm just having fun with concepts and some of the math for now. I guess what I'm making could be termed an interface. It can do perspective projection of pixels and currently supports 4DOF (6DOF I may add later, the math for that is a bit annoying, so I'm putting it off for now). I'm just starting to think about getting textures working. I will obviously have to redo a lot of things once I start using OpenGL or Direct3D, but I want to see how far I can get using as little 'help' as possible. I guess a lot of people might find that pointless, but I don't plan on being a game programmer, just a software programmer; I'm doing this purely for fun.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!