Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Linear vs. Nonlinear memory

This topic is 6068 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

what is linear/nonlinear memory and how do they relate to surfaces and the screen? i''m using lamothe''s book as a tutorial and it''s great, but he just seemed to jump right into this w/out much explanation... just the stuff on how these affect horizontal memory pitch... confusing!!! anyone care to share some input or know a place on the net that might better explain these concepts? thanks!

Share this post

Link to post
Share on other sites
What Andre'' LaMothe meant is, that if you have a pointer to some
video memory, for example running in 640x480x16bpp, the memory can
be for example 800x480x16bpp, although the current screen''s resolution
is 640x480.
So the memory pitch to the next line of the screen is not the screen''s width,
it''s rather the pitch value DDraw returns with DDSurface->Lock
(here 800, with my example)

You can imagine the Drawing Surface as a rectangular part of a bigger surface
in the video ram, so the width of your Drawig Surace cannot be the pitch to
next line, its the one of the bigger surface.
(well, it sometimes is, exactly when you dsurface has same size as that in vram)

Share this post

Link to post
Share on other sites

  • 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!