Jump to content

  • Log In with Google      Sign In   
  • Create Account


Surfaces bigger than primary?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 JZ...   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 February 2000 - 11:36 AM

first off - im new to DirectX - I got the basics down (kinda), but im trying to load a bmp that has a series of frames of animation into my game and it fails if the surface is bigger than 640x480 ,which is the size of my primary surface. Is that suppose to happen? and if so are there any work-arounds? I really dont want to have to make a separate surface for every frame. Any suggestions? JZ...

Sponsor:

#2 Facehat   Members   -  Reputation: 696

Like
Likes
Like

Posted 22 February 2000 - 11:49 AM

Unfortunately, most hardware does not support surfaces which are larger than the primary. I believe there is a workaround though: It should work if you tell DDraw to put the surface in sytem memory (If i''m remembering correctely). There will probably be a bit of a performance hit, but it shouldn''t be too big.

--TheGoop

#3 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 22 February 2000 - 01:03 PM

TheGoop is on track, most hardware will have a hard time with "wide surfaces"(surfaces longer/wider than the primary surface). But you can help by setting the DDSCAPS2 flag, DDSCAPS2_WIDESURFACES when creating the wide surface. I''m also a newbie, so I know how you feel. Good luck!


#4 Void   Members   -  Reputation: 126

Like
Likes
Like

Posted 22 February 2000 - 08:42 PM

If I remember correctly, u must force specify the surface to be in system memory.

There will be a *big* performance hit, unless, the surface you are bltting is small. Try using a full screen blt from system memory to vid memory (ie 640x480 pixels) and watch the frame rate DROP. (when doing parallex scrolling)

#5 Phorisc   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 February 2000 - 09:01 PM

ok, i think this is what you want...i got lazy so just cut some code out...hope it helps some though...

memset(&descMap,0,sizeof(DDSURFACEDESC));
descMap.dwSize = sizeof(DDSURFACEDESC);
descMap.dwFlags = DDSD_CAPS / DDSD_HEIGHT / DDSD_WIDTH;
descMap.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN / DDSCAPS_SYSTEMMEMORY;
descMap.dwWidth = **???????Set your width here**;
descMap.dwHeight = **???????Set your height here**;
if(lpDD->CreateSurface(&descMap,&lpDDMap,NULL)!= DD_OK)
MessageBox(hwnd,"CREATESURFACE, LPDDMAP FAILED","FAILURE",MB_OK);

have any questions about the code then just write back to this post.

-Phorisc


#6 JZ...   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 February 2000 - 02:24 AM

thanks - Ill try the surface as system memory and see how bad it starts droppin frames.

I appreciate the help!

JZ...





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS