Archived

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

What surface/texture object should I use in 2D?

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

Hi! I''m currently using DirectX 9.0 and I''m bit confused what types to use to hold graphical data. You see so far I have used IDirect3DTexture9 and D3D''s sprite class to draw them. But what if I need to access and modify the texture, would it be faster to use IDirect3DSurface9? (I mean wich one is faster/better to lock and read/write) And what is the major difrences between IDirect3DSurface9 and IDirect3DTexture9? I have notice that texture can return it''s surface by calling GetSurfaceLevel() so that makes sense but what are your expiriences using these?

Share this post


Link to post
Share on other sites
quote:
Original post by Ademan555
Well, i dont know of any difference in locking speed, but i do know that you NEED it to be a IDirect3DTexture9 because thats what is used to render, Scroll Down To the Dynamic Textures Place

hope that helps
-Dan


That link sure did help, thanks! But it didn''t yet answer this queston.
And IDirect3DTexture9 it is but I would really need to know about surface locking speed difrences...

Share this post


Link to post
Share on other sites
quote:
Original post by Subconscious
Wouldn''t it be easier just to test that out for yourself? Just make a loop that locks/unlocks 1000 times or so and then time how long it took for each of them with a fairly accurate timer.


Ya I belive it is, and thats what I''m goin to do. Thanks for the thought.

Share this post


Link to post
Share on other sites