Jump to content
  • Advertisement
Sign in to follow this  

texture thing

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

makeing a texture management system, and I wanted to have a list of textures that could be of any of the classes derived from IDirect3DBaseTexture9, so I made a struct containing a pointer to one.
struct d3d_texture
	IDirect3DBaseTexture9* t_interface;
	bool ocupied;

d3d_texture	internal_texture[MAX_D3D_TEXTURE_SLOTS];//this is inside a class
created useing this call
HRESULT hr = D3D_device->CreateTexture(x,y,1, 0, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT,
(IDirect3DTexture9**)&internal_texture[t].t_interface, NULL);
locked useiong this
	_D3DLOCKED_RECT locked;
	((IDirect3DTexture9*)(tex->t_interface))->LockRect(0, &locked, NULL, 0);
when I lock, pbits and pitch are both 0, oddly when I GetLevelDesc everthing seems corect. any ideas? shouldn't this work? I want to beable to refer to a cube map or volume texture from this list of textures so I'd reather not use IDirect3DTexture9, and I just tried doing that and it doesn't seem to change anything so that isn't even the problem... ...wait it's D3DSURFACE_DESC.type is D3DRTYPE_SURFACE, shouldn't it be D3DRTYPE_TEXTURE... [Edited by - Coder on August 16, 2004 10:04:51 AM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

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