Archived

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

Large surfaces in video memory

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

Okay, here''s a question that stinks so badly of newby, but still needs to be asked: "How do I create a surface in video memory that is *larger* than the primary surface?" I have tried creating it in system memory but it is so slowww! I have heard that it is possible, just not sure how (oh and by the way, I can''t just create it like any other surface - it gives me an error). Any help is appreciated. wise_guy

Share this post


Link to post
Share on other sites
Ofcourse there is a workaround (there almost always is).
What you can do is to have multiple surfaces and then have them tiled.

For example:

Lets say you wan''t a surface that is 1280 * 960 and you are in screen mode 640 * 480.
That means you need 4 surfaces to keep the entire area.
So when you blit you give the blit function a source rectangle.
Before you blit you check from what surface you wanna blit and then blit it. If the source rectangle is on multiple surfaces find an algorithm that can find out how big the rectangle on each surface is. That would mean two blits but if you really need it I see no other way to do it.

Share this post


Link to post
Share on other sites
Grrrr... oh well if that''s the only way it can be done then so be it!

I wonder why my card doesn''t support large surfaces (its a 3dfx Banshee 16mb)...?


wise_guy

Share this post


Link to post
Share on other sites
I wonder why this card doesn''t support large textures (>256x256), or why it can do 3D only in 16bit...
(me kidding )

But I guess, this card doesn''t support large surfaces because 3Dfx driver developers have decided that nobody need it. 8-/

Share this post


Link to post
Share on other sites