[saco] Implement CDXUTDialogResourceManager constructor

This commit is contained in:
RD42 2024-05-13 22:42:05 +08:00
parent 8793b4eb73
commit 422163126b
3 changed files with 56 additions and 0 deletions

View File

@ -10,6 +10,15 @@
#undef min // use __min instead
#undef max // use __max instead
//--------------------------------------------------------------------------------------
CDXUTDialogResourceManager::CDXUTDialogResourceManager()
{
m_pd3dDevice = NULL;
m_pStateBlock = NULL;
m_pSprite = NULL;
}
//--------------------------------------------------------------------------------------
void DXUTBlendColor::Init( D3DCOLOR defaultColor, D3DCOLOR disabledColor, D3DCOLOR hiddenColor )
{

View File

@ -35,4 +35,45 @@ struct DXUTBlendColor
};
//--------------------------------------------------------------------------------------
// Structs for shared resources
//--------------------------------------------------------------------------------------
struct DXUTTextureNode
{
TCHAR strFilename[MAX_PATH];
IDirect3DTexture9* pTexture;
DWORD dwWidth;
DWORD dwHeight;
};
struct DXUTFontNode
{
TCHAR strFace[MAX_PATH];
ID3DXFont* pFont;
LONG nHeight;
LONG nWeight;
};
//-----------------------------------------------------------------------------
// Manages shared resources of dialogs
//-----------------------------------------------------------------------------
class CDXUTDialogResourceManager
{
public:
CDXUTDialogResourceManager();
// Shared between all dialogs
IDirect3DStateBlock9* m_pStateBlock;
ID3DXSprite* m_pSprite; // Sprite used for drawing
protected:
CGrowableArray< DXUTTextureNode* > m_TextureCache; // Shared textures
CGrowableArray< DXUTFontNode* > m_FontCache; // Shared fonts
IDirect3DDevice9* m_pd3dDevice;
};
#endif // DXUT_GUI_H

View File

@ -580,6 +580,12 @@
<File
RelativePath=".\d3d9\common\dxstdafx.h">
</File>
<File
RelativePath=".\d3d9\common\DXUTgui.cpp">
</File>
<File
RelativePath=".\d3d9\common\DXUTgui.h">
</File>
<File
RelativePath=".\d3d9\common\DXUTmisc.cpp">
</File>