Archived

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

PRISMA

DirectDrawSurface -> Location?

Recommended Posts

When usin the TEXTUREMANAGE capability flag to let Direct3D manage textures, how would one go about finding out if a texture lives in Video or System memory? I have tried the GetSurfaceDesc but it seems to be yelding unconsistent results. Also while I am talking about unconsistent results, why does the IDirectDraw7->GetCaps report the wrong (!) amount of video memory in the DDCAPS->dwVidMemTotal member. I am really confused. By the way, my gfx card is a G400 w/ 16Mb. I am not aware of any bugs or faults with the card''s hardware & drivers. (Yes!!! I have the latest drivers)

Share this post


Link to post
Share on other sites
The way you create your DirectDraw object determines how you can use Direct3D in DX7. If you created your DirectDraw object using the IDirectDraw interface and then queried the IDirectDraw7 interface you might want to try creating your DD object using IDirectDraw7 instead.

-Cicco

Share this post


Link to post
Share on other sites
Erm....cicco...wtf are you talking about?

"If you created your DirectDraw object using the IDirectDraw interface and then queried the IDirectDraw7 interface" - That doesn''t make any sense! You cannot get a DD7 interface by querying an earlier DD interface (DD2 for example).

"you might want to try creating your DD object using IDirectDraw7 instead" - WHAT!!!! How ELSE would you create it! I use the standard method that everyone else uses: DirectDrawCreateEx.

Anyone: Any Real Answers?

Share this post


Link to post
Share on other sites
Hi

I am not realy shure about this, but there exists an IDirectDrawSurface7::GetCaps(), i don''t know why it is there, it would only be usefull when GetDevicedesc does not fill the DDSCAPS2 Structure of the DDSURFACEDESC2 Structure.

So you might try this GetCaps out, maybe the results are more Consistent.

For the Video Memory, how big is the difference. The SDK says that this is the Total Memory minus the primary Surface, and some Data the Driver could store.

Lars

Share this post


Link to post
Share on other sites
Thanks. I am aware of the GetCaps method. They both seem to return the wrong values.
Sorry, it''s my fault, when I say wrong, I mean wrong!. I have 16mb VRam, but the method reports 36mb! How?

Thanks anyway Lars.

Share this post


Link to post
Share on other sites
quote:
Original post by PRISMA

"you might want to try creating your DD object using IDirectDraw7 instead" - WHAT!!!! How ELSE would you create it! I use the standard method that everyone else uses: DirectDrawCreateEx.


Cicco didn''t make much sense to me either, but stop your yelling - as I believe you can still make DD7 objects with CoCreateInstance() like you could with the previous DirectX interfaces.

Share this post


Link to post
Share on other sites
Hey Lars, thanks. You have solved it.

I checked out the SDK tools, and it shows several values. It shows total memory 36Mb (which is what I get) and also local (16 Mb) and Non-Local(20Mb). So the error MUST be in DD, becuase the SDK says that the dwVidMemTotal member of the DDSCAPS2 structure is VIDEO MEMORY. But apparently is is not. It is total memory available for TEXTUREs...ie Vid mem and AGP mem.

It''s still weird though that in a machine with 128 Mb sys ram, only 20Mb of it is being used for textures? I checked my AGP aperture settings in the BIOS, and they are set to 64Mb.

Since I have NO other apps running, and an NOW getting consistent results across different programs, this must either: be a DirectDraw error, or an error with my bios (which again is up-to-date).

Share this post


Link to post
Share on other sites