how to convert LPDIRECT3DTEXTURE9 to CEGUI::Texture?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

zzz822163
Just popping in
Just popping in
Posts: 4
Joined: Sun Jan 04, 2009 10:33

how to convert LPDIRECT3DTEXTURE9 to CEGUI::Texture?

Postby zzz822163 » Sun Jan 04, 2009 10:46

use D3DXCreateTextureFromFile generate a LPDIRECT3DTEXTURE9 pointer,I want to use SetTexture() replace an old CEGUI::Texture .
ex:
CEGUI::Texture* rttTexture = m_pCEGUIRender->createTexture("1.bmp","imagesets");
LPDIRECT3DTEXTURE9 m_pText;
D3DXCreateTextureFromFileInMemory( m_device, buffer, blength, &m_pTexture_avi);

SetTexture(rttTexture ,m_pTexture_avi)---------how to do?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Sun Jan 04, 2009 11:46

Hi, and welcome :)

There is currently no provision for doing this, not because it's hard or not wanted, we just didn't add it! Which leaves you with a choice of adding the function to the D3D 9 based CEGUI texture yourself, or basically loading the new content from memory each frame (which would be really slow IMO).

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 24 guests