displaying textures
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
There''s a million ways to do it, How about an owner drawn List Box (Fully with Win32 API)?
- Goblineye Entertainment
The road to success is always under construction
- Goblineye Entertainment
The road to success is always under construction
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement