Jump to content
  • Advertisement

Archived

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

jods

displaying textures

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

Hello, I''m making a windowed DirectX8 application. I want to have a texture browser. I thought I''ll make it so: - create a dialog box. - override the OnDraw of some control/window in the dialog. - display a thumbnail list of all currently loaded textures (which are stored in a IDirect3DTexture8 interface). The point is, how would you write the OnDraw proc efficiently? My ideas: - using Windows API. Well, keeping a BITMAP copy of every IDirect3DTexture8 seems a bit excessive, isn''t it? - using DirectX. Ok, but I couldn''t find anything like the Primary Surface in DirectDraw7... Should I create a new swap chain just for the textures browser? I''m sure I miss an easier way to do it... Shortly said: "How would you display an IDirect3DTexture8 in a window?" Thanks for your help, jods

Share this post


Link to post
Share on other sites
Advertisement
Yeah, but I think I''ve not been clear enough.

What is my problem?
I give you an IDirect3DTexture8 interface, which contains a texture (as the name says!).
I want to display it on the screen (in my owner drawn list box for example).
How would you do it efficiently?
Is there a way to do it without allocating a new swap chain (if I use DirectX)?
Is there a way to do it without having a copy of that texture (BITMAP object) in memory (Windows API version)?

Is there a ggod way to do it, which I haven''t thought of?

For example, if I was still programming with DirectX7, I would do so:
-Get a pointer to the primary surface (well the screen!).
-Blit my texture there, using the member function of the surface interface.

But in DirectX8, I haven''t found such thing as a Primary Surface. So I should do it another way and I''m wondering how to do it efficiently.

Since a lot of people there should already have done that once, I thought it''ll be a good idea to ask (why re-invent the wheel?).

Thanks
jods

Share this post


Link to post
Share on other sites

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