Archived

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

jollyjeffers

Textures not updating...

Recommended Posts

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;

Share this post


Link to post
Share on other sites
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;

Share this post


Link to post
Share on other sites
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....

Share this post


Link to post
Share on other sites
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;

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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;

Share this post


Link to post
Share on other sites