Getting color data from a loaded texture

Started by
9 comments, last by QuadMV 18 years, 9 months ago
I'm getting closer, but not quite there. Here is the output you requested:

desc {Format=D3DFMT_X8R8G8B8 Type=D3DRTYPE_SURFACE Usage=0 ...} _D3DSURFACE_DESC

Format D3DFMT_X8R8G8B8 _D3DFORMAT
Type D3DRTYPE_SURFACE _D3DRESOURCETYPE
Usage 0 unsigned long
Pool D3DPOOL_MANAGED _D3DPOOL
MultiSampleType D3DMULTISAMPLE_NONE _D3DMULTISAMPLE_TYPE
MultiSampleQuality 0 unsigned long
Width 512 unsigned int
Height 512 unsigned int

When I added AUTOGENMIPMAP to the 6th field, everything is compiling now, but my texture is appearing as blank.

I commented out all the code that modifies the data copies it and copy it back, so I'm just rendering with a standard texture, nothing funky. If I create the texture using a zero, it renders perfect, but if I create the texture with AUTOGENMIPMAP, it renders blank.

Is there something else I need to do when there are no mipmaps.

Now that I’ve said that, writing that question above gave me an idea. I changed the code back to using a zero, and I added back the code to modify the data, then I changed the samplerstate and turned off mipmapping. This seems to have done the trick. Can someone just confirm that I’m turning it off just for this object, and that samplerstate isn’t some sort of global setting. I am resetting it when I’m done drawing the one texture I’m playing around with.

Thanks all for your patience. Sorry if this is getting too crazy.

3DMUVE is an amateur game development team, and the designer and developer of a new gaming technology “MUVE” for the gaming industry.

This topic is closed to new replies.

Advertisement