Sign in to follow this  

pointer to dx resource question

Recommended Posts

When I create a dx resource for example a texture I will get a pointer to it. If this texture are created with the D3DPOOL_DEFAULT flag it can be placed in different kinds of memory, and I think even moved during run time if directX finds a better place for it. This is now my questions: How does this work? What are the pointer I get pointing to? If the texture are moved during run time will DX change my pointer? When in the execution are this resource managment taking place is it during the time the cpu spend in the driver? Finally Is there any good book or good web page where I can read more on how the internals of D3D work, I find the SDK documentation very spars. Ther reason that I ask those questions Is that my pointers behave strange and I get memory leaks I cant explain.

Share this post

Link to post
Share on other sites
It seems like you are confused here. The pointer returned is a pointer to the interface: The mechanism used by the DirectX API that manages the resource. The location of the actual resource data (in this case texture memory pool) has nothing to do with the pointer returned to your application.

However, since you brought up the point of the actual texture memory, if you really want to know more about how memory and used in Windows, try looking up information about:
-Win32 Memory Management
-Processes and Memory Space
-Virtual Memory
-Memory-Mapped Files

There are more topics but I can't think of them off-hand. Hope this helps a bit.

EDIT: Ah, forgot that almighty link:

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this