Textures not updating...

Started by
5 comments, last by jollyjeffers 22 years, 2 months ago
okay, this is the situation: (D3D8 engine) i want to copy some logos from a surface to a texture. That''s all cool, and working very nicely (I have to do my own memory manipulation/copying using locking)... BUT, the textures are part of a D3DXMESH, and the MESH object seems to be selectively ignoring some updates. it''s really f''in weird... I have a texture - 128x256, which when i display as some 2D TL vertices (so i can check that the texture is updating) the new parts are plainly visible... no problems. BUT when its rendered by the mesh, SOME (but not all) of the new parts aren''t rendered. To put it into context (i cant give out screenshots i dont think), it''s for a Formula-1 car, and the logos are the sponsors. this particular texture covers the front wing and back wing... and I update logos on both "parts"... however, the new logos are ONLY visible on the back-wing... any ideas???? there are no errors being reported, and as i said, if i draw it in "2D" it appears perfectly as it should! Jack;

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Advertisement
Could it be that you are updating one mip level and the model is drawing another?
Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials
interesting idea...

I know that my code is modifying the top-level texture (based on size / pitch etc...). But, given mipmapping, shouldn''t it change the mip-level if i zoom in-and-out? I''ve tried zooming in really-really close, and zooming out a long way... but still nothing :o

any other ideas? / ways to test it?

Jack;

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Unless someone says I''m way off base...

Try updating every mip level (something easy like a solid color). OK, you probably won''t need to to it for ALL of them, but a couple of the first ones. See if you can see the change.

I''m assuming that you know for sure that the two textures you''re looking at are the same texture objects....
Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials
I''ll have a go with that one...

I was thinking about (haven''t had time to) forcing D3D to generate no mipmap tree (in the CreateTexture calls)...

I know it''s the correct texture object because SOME parts of the new texture is displayed on the model, just not all of it!

Jack;

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

I don''t know if this could help, but here it is :

There is a UpdateTexture() method with the IDirect3DDevice8 object. Maybe this one would update the changes made to your logo texture. Just check the DXSDK...


/* Bullmax */
-------------
Reality has many forms : good and evil, black and white, ying and yang.
/* Bullmax */-------------Reality has many forms : good and evil, black and white, yin and yang.
yet another thing i tried... but it does nothing

I tried adding a "dirty rectangle" to the texture to force the updatetexture() call to update the whole texture... but still nothing

this is really screwy. i just dont understand :o

thanks for the continued help though.

Jack;

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

This topic is closed to new replies.

Advertisement