Commit f2279174 authored by D-AIRY's avatar D-AIRY

Default texture proxy

parent 67c5a086

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
VisualStudioVersion = 12.0.40629.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkyXEngine", "SkyXEngine.vcxproj", "{97D8EE94-0A6D-47F2-BE01-63F7C89715BC}"
ProjectSection(ProjectDependencies) = postProject
......@@ -353,6 +353,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sxambient", "..\..\sxambien
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ddsplugin", "..\..\ddsplugin\vs2013\ddsplugin.vcxproj", "{FE640066-C8E8-41FB-AD13-89BC03BFFBFB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xSpecs", "..\..\xSpecs\vs2013\xSpecs.vcxproj", "{AE74C93F-2FD3-462D-8E98-B3F3198B9104}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
......@@ -669,67 +671,76 @@ Global
{FE640066-C8E8-41FB-AD13-89BC03BFFBFB}.Release|Win32.Build.0 = Release|Win32
{FE640066-C8E8-41FB-AD13-89BC03BFFBFB}.Release|x64.ActiveCfg = Release|x64
{FE640066-C8E8-41FB-AD13-89BC03BFFBFB}.Release|x64.Build.0 = Release|x64
{AE74C93F-2FD3-462D-8E98-B3F3198B9104}.Debug|Win32.ActiveCfg = Debug|Win32
{AE74C93F-2FD3-462D-8E98-B3F3198B9104}.Debug|Win32.Build.0 = Debug|Win32
{AE74C93F-2FD3-462D-8E98-B3F3198B9104}.Debug|x64.ActiveCfg = Debug|x64
{AE74C93F-2FD3-462D-8E98-B3F3198B9104}.Debug|x64.Build.0 = Debug|x64
{AE74C93F-2FD3-462D-8E98-B3F3198B9104}.Release|Win32.ActiveCfg = Release|Win32
{AE74C93F-2FD3-462D-8E98-B3F3198B9104}.Release|Win32.Build.0 = Release|Win32
{AE74C93F-2FD3-462D-8E98-B3F3198B9104}.Release|x64.ActiveCfg = Release|x64
{AE74C93F-2FD3-462D-8E98-B3F3198B9104}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{74D74409-BAC7-4DD0-8C74-117516B4A01C} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{E6B16854-D4A4-4B56-8E1C-482DD523F205} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{BA779DCC-93C8-4FB7-BBB9-A7D2F76C35DE} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{0292BE32-298E-4E18-BC42-5A39F9487EBA} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{6376944C-E417-43FD-8B56-073A310EB7D9} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{56A8D7F7-B73C-4206-8038-83D8A169AA2F} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{BE976610-EE71-4D57-8733-2FE43BF602F5} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{120D29B8-D2D9-4B4E-8AC6-D951973B7398} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{B9656841-7734-4D0B-8619-1BED5E2ED7AE} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{6A402480-C09B-4CBF-A6BD-115CE4BFF2D8} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{2D039A6D-B874-4AA7-8F89-E86DD70B21ED} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{236F4A16-78D8-42E4-86C0-30265CA2D84D} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{8C9E1225-F0B3-403E-AB88-3372E67DE173} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{C3CAABF6-9239-4133-86E3-44DF79A67AF6} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{C1C1F046-C839-4602-AF70-923CDD237C1B} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{AEECC2DB-C7C7-4089-9262-A69794DF834D} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{0C7E3DB7-005F-41E9-A570-868BCF959E91} = {4408F4BE-1F9D-4861-881A-AF9869C3D663}
{3A5449A3-DCE7-4557-9C9F-DEEAFBAAC763} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{7C0C8205-BDD3-44A3-AA3A-7855C7EFC88E} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{718C186E-9155-41DF-B8AB-74ED03E204CD} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{7F0ACED1-6E16-4DD3-800E-0C50150897C2} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{8AA0585B-D6E4-46B4-9183-3BACD5B9D47F} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{8144D5F8-07D0-4663-AAAE-11053614FAC5} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{16D78A7B-8EE9-4FD3-84C9-B71D8723E718} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{D2386C4E-7032-487B-8EAD-951778AD6EBC} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{C1C1F046-C839-4602-AF70-923CDD237C1B} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{4408F4BE-1F9D-4861-881A-AF9869C3D663} = {E6B16854-D4A4-4B56-8E1C-482DD523F205}
{7C1F0E50-7A19-4AB4-B559-11EF078F4787} = {E6B16854-D4A4-4B56-8E1C-482DD523F205}
{6FE14C5C-6052-4D96-A89F-0843D91F89AD} = {E6B16854-D4A4-4B56-8E1C-482DD523F205}
{BA779DCC-93C8-4FB7-BBB9-A7D2F76C35DE} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{0292BE32-298E-4E18-BC42-5A39F9487EBA} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{6A3341BF-710B-4310-A7F8-810040D698DC} = {5128FBE9-1706-4255-B422-4A652320085E}
{709D8A7A-D3E0-4070-A493-EFDF7A8E9D73} = {4408F4BE-1F9D-4861-881A-AF9869C3D663}
{AFBF200A-9260-4469-AE64-DCB42C796DD6} = {5128FBE9-1706-4255-B422-4A652320085E}
{A2B9EACA-69C1-4E9D-AF3C-704608DB57DE} = {5128FBE9-1706-4255-B422-4A652320085E}
{9C34362D-7FA6-4BD1-A48B-8FDE541344B0} = {5128FBE9-1706-4255-B422-4A652320085E}
{CEFD4247-0B36-4268-B455-C1E826173005} = {5128FBE9-1706-4255-B422-4A652320085E}
{B66C63CA-62E0-472F-9D24-070CAC7C8B12} = {5128FBE9-1706-4255-B422-4A652320085E}
{D381001E-C1FF-415F-A269-5264AD9013D5} = {5128FBE9-1706-4255-B422-4A652320085E}
{A1AC0163-A56A-416D-AFA0-19F7DFBE9F64} = {5128FBE9-1706-4255-B422-4A652320085E}
{2B3BA583-D5EC-4DC2-91CF-42B1C7ADFD9D} = {4408F4BE-1F9D-4861-881A-AF9869C3D663}
{0C7E3DB7-005F-41E9-A570-868BCF959E91} = {4408F4BE-1F9D-4861-881A-AF9869C3D663}
{709D8A7A-D3E0-4070-A493-EFDF7A8E9D73} = {4408F4BE-1F9D-4861-881A-AF9869C3D663}
{6376944C-E417-43FD-8B56-073A310EB7D9} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{A57B87BE-C63D-C64F-A06E-C48B4723C51A} = {6376944C-E417-43FD-8B56-073A310EB7D9}
{EF2EC91D-F2A6-BD43-89AC-8054F3D5EECA} = {6376944C-E417-43FD-8B56-073A310EB7D9}
{D6ECE531-C294-BC42-8C32-6F09F1240325} = {6376944C-E417-43FD-8B56-073A310EB7D9}
{60A46FEB-576C-7B40-A047-D6079D9D66C4} = {6376944C-E417-43FD-8B56-073A310EB7D9}
{7C0C8205-BDD3-44A3-AA3A-7855C7EFC88E} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{072A60D2-317A-CC41-AD12-7E381235064A} = {6376944C-E417-43FD-8B56-073A310EB7D9}
{46A17C83-2972-4C41-B67F-224640089085} = {6376944C-E417-43FD-8B56-073A310EB7D9}
{E74F00B5-7DC5-DC48-8E91-D1C2296F455F} = {6376944C-E417-43FD-8B56-073A310EB7D9}
{F2DD3789-7BC9-D241-8C8D-2179933B30DD} = {6376944C-E417-43FD-8B56-073A310EB7D9}
{ED53EB62-C809-1649-A203-948AF1412B4C} = {6376944C-E417-43FD-8B56-073A310EB7D9}
{56A8D7F7-B73C-4206-8038-83D8A169AA2F} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{BE976610-EE71-4D57-8733-2FE43BF602F5} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{15CBFEFF-7965-41F5-B4E2-21E8795C9159} = {BE976610-EE71-4D57-8733-2FE43BF602F5}
{CEBDE98B-A6AA-46E6-BC79-FAAF823DB9EC} = {BE976610-EE71-4D57-8733-2FE43BF602F5}
{3A214E06-B95E-4D61-A291-1F8DF2EC10FD} = {BE976610-EE71-4D57-8733-2FE43BF602F5}
{120D29B8-D2D9-4B4E-8AC6-D951973B7398} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{718C186E-9155-41DF-B8AB-74ED03E204CD} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{B9656841-7734-4D0B-8619-1BED5E2ED7AE} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{B66C63CA-62E0-472F-9D24-070CAC7C8B12} = {5128FBE9-1706-4255-B422-4A652320085E}
{F2DD3789-7BC9-D241-8C8D-2179933B30DD} = {6376944C-E417-43FD-8B56-073A310EB7D9}
{ED53EB62-C809-1649-A203-948AF1412B4C} = {6376944C-E417-43FD-8B56-073A310EB7D9}
{6A402480-C09B-4CBF-A6BD-115CE4BFF2D8} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{7F0ACED1-6E16-4DD3-800E-0C50150897C2} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{D381001E-C1FF-415F-A269-5264AD9013D5} = {5128FBE9-1706-4255-B422-4A652320085E}
{8AA0585B-D6E4-46B4-9183-3BACD5B9D47F} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{2D039A6D-B874-4AA7-8F89-E86DD70B21ED} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {2D039A6D-B874-4AA7-8F89-E86DD70B21ED}
{8144D5F8-07D0-4663-AAAE-11053614FAC5} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{2B3BA583-D5EC-4DC2-91CF-42B1C7ADFD9D} = {4408F4BE-1F9D-4861-881A-AF9869C3D663}
{236F4A16-78D8-42E4-86C0-30265CA2D84D} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{8C9E1225-F0B3-403E-AB88-3372E67DE173} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{9117FCDB-957B-4FF8-8AD4-90965159B721} = {8C9E1225-F0B3-403E-AB88-3372E67DE173}
{15AD3AF2-47B1-4836-9777-F1249EB299A7} = {8C9E1225-F0B3-403E-AB88-3372E67DE173}
{DAFA20F5-5162-4F21-99AF-DB8084D3C557} = {8C9E1225-F0B3-403E-AB88-3372E67DE173}
{A1AC0163-A56A-416D-AFA0-19F7DFBE9F64} = {5128FBE9-1706-4255-B422-4A652320085E}
{E6B16854-D4A4-4B56-8E1C-482DD523F205} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{7C1F0E50-7A19-4AB4-B559-11EF078F4787} = {E6B16854-D4A4-4B56-8E1C-482DD523F205}
{5145958A-F75F-4F6D-9793-7384B616CF76} = {7C1F0E50-7A19-4AB4-B559-11EF078F4787}
{FE640066-C8E8-41FB-AD13-89BC03BFFBFB} = {7C1F0E50-7A19-4AB4-B559-11EF078F4787}
{F0BA654B-EFF1-4F48-8ED5-4B1AA6888687} = {C3CAABF6-9239-4133-86E3-44DF79A67AF6}
{C3CAABF6-9239-4133-86E3-44DF79A67AF6} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{4408F4BE-1F9D-4861-881A-AF9869C3D663} = {E6B16854-D4A4-4B56-8E1C-482DD523F205}
{16D78A7B-8EE9-4FD3-84C9-B71D8723E718} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{D2386C4E-7032-487B-8EAD-951778AD6EBC} = {74D74409-BAC7-4DD0-8C74-117516B4A01C}
{74D74409-BAC7-4DD0-8C74-117516B4A01C} = {13D5622C-8643-4BD8-A730-B5C919DAFDDC}
{6FE14C5C-6052-4D96-A89F-0843D91F89AD} = {E6B16854-D4A4-4B56-8E1C-482DD523F205}
{FE640066-C8E8-41FB-AD13-89BC03BFFBFB} = {7C1F0E50-7A19-4AB4-B559-11EF078F4787}
{AE74C93F-2FD3-462D-8E98-B3F3198B9104} = {4408F4BE-1F9D-4861-881A-AF9869C3D663}
EndGlobalSection
EndGlobal
......@@ -112,6 +112,7 @@
<ClInclude Include="..\..\..\source\xcommon\IXPlugin.h" />
<ClInclude Include="..\..\..\source\xcommon\IXRenderable.h" />
<ClInclude Include="..\..\..\source\xcommon\IXTextureLoader.h" />
<ClInclude Include="..\..\..\source\xcommon\IXTextureProxy.h" />
<ClInclude Include="..\..\..\source\xcommon\IXUpdatable.h" />
<ClInclude Include="..\..\..\source\xcommon\resource\IXModel.h" />
<ClInclude Include="..\..\..\source\xcommon\resource\IXModelProvider.h" />
......
......@@ -266,5 +266,8 @@
<ClInclude Include="..\..\..\source\core\ResourceTexture.h">
<Filter>Header\resource</Filter>
</ClInclude>
<ClInclude Include="..\..\..\source\xcommon\IXTextureProxy.h">
<Filter>Header\xcommon</Filter>
</ClInclude>
</ItemGroup>
</Project>
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{681FD0AB-0971-44C6-B2CF-089133C0ED45}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{3F2EB81D-B59D-4738-8070-6D68F38E7070}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{3F8091BB-CE80-492B-9BE7-1C4164B2837E}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\source\xSpecs\dllmain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\xSpecs\plugin_main.cpp" />
<ClCompile Include="..\..\..\source\xSpecs\TextureProxy.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\source\xSpecs\TextureProxy.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
\ No newline at end of file
......@@ -14,6 +14,7 @@
#include <GRegisterIndex.h>
#include <xcommon/IXTextureLoader.h>
#include <xcommon/IXTextureProxy.h>
#include "ResourceTexture.h"
extern CTimeManager *g_pTimers;
......@@ -129,6 +130,31 @@ CCore::CCore(const char *szName)
}
#endif
#if 0
IXTextureProxy *pProxy = (IXTextureProxy*)m_pPluginManager->getInterface(IXTEXTUREPROXY_GUID);
if(pProxy)
{
char szBuf[1024];
UINT uBufSize = sizeof(szBuf);
if(pProxy->resolveName("sky_hdr_hl2", szBuf, &uBufSize))
{
printf(COLOR_LGREEN "Name is resolved to '%s'!" COLOR_RESET "\n", szBuf);
}
else
{
printf(COLOR_LRED "Name is not resolved!" COLOR_RESET "\n");
}
if(pProxy->resolveName("test_byte", szBuf, &uBufSize))
{
printf(COLOR_LGREEN "Name is resolved to '%s'!" COLOR_RESET "\n", szBuf);
}
else
{
printf(COLOR_LRED "Name is not resolved!" COLOR_RESET "\n");
}
}
#endif
}
CCore::~CCore()
{
......
#include "TextureLoader.h"
#include "DDSFile.h"
CTextureLoader::CTextureLoader(IFileSystem* pFileSystem):
CTextureLoader::CTextureLoader(IFileSystem *pFileSystem):
m_pFileSystem(pFileSystem)
{
}
......@@ -191,7 +191,7 @@ bool XMETHODCALLTYPE CTextureLoader::open(const char *szFileName, const char *sz
LibReport(REPORT_MSG_LEVEL_WARNING, "Invalid texture frame count (%d) defaulting to 1: '%s'\n", m_iYFrames, szMetaFile);
m_iYFrames = 1;
}
if(m_iSkipFrames <= 0 || m_iSkipFrames >= m_iXFrames * m_iYFrames)
if(m_iSkipFrames < 0 || m_iSkipFrames >= m_iXFrames * m_iYFrames)
{
LibReport(REPORT_MSG_LEVEL_WARNING, "Invalid texture skip frames (%d) defaulting to 0: '%s'\n", m_iSkipFrames, szMetaFile);
m_iSkipFrames = 0;
......
......@@ -8,7 +8,7 @@
class CTextureLoader: public IXTextureLoader
{
public:
CTextureLoader(IFileSystem* pFileSystem);
CTextureLoader(IFileSystem *pFileSystem);
UINT XMETHODCALLTYPE getVersion() override;
......
#include "TextureProxy.h"
CTextureProxy::CTextureProxy(IFileSystem *pFileSystem):
m_pFileSystem(pFileSystem)
{
}
UINT XMETHODCALLTYPE CTextureProxy::getVersion()
{
return(IXTEXTUREPROXY_VERSION);
}
const char* XMETHODCALLTYPE CTextureProxy::getDescription() const
{
return("SkyXEngine texture naming system");
}
bool XMETHODCALLTYPE CTextureProxy::resolveName(const char *szName, char *szOutput, UINT *puBufSize)
{
const char *szUPos = strstr(szName, "_");
if(!szUPos)
{
return(false);
}
size_t sizeTexDir = szUPos - szName;
const char *szDirName = "textures/";
size_t sizeBuf = sizeTexDir + strlen(szDirName) + 1 + strlen(szName) + 4 + 1; // "/", ".dds", "\0"
char *szTexDir = (char*)alloca(sizeof(char) * (sizeTexDir + 1));
memcpy(szTexDir, szName, sizeof(char) * sizeTexDir);
szTexDir[sizeTexDir] = 0;
char *szFullPath = (char*)alloca(sizeof(char) * sizeBuf);
sprintf(szFullPath, "%s%s/%s.dds", szDirName, szTexDir, szName);
if(m_pFileSystem->fileExists(szFullPath))
{
if(szOutput)
{
strncpy(szOutput, szFullPath, *puBufSize);
szOutput[*puBufSize - 1] = 0;
}
else
{
*puBufSize = (UINT)sizeBuf + 1;
}
return(true);
}
return(false);
}
#ifndef __TEXTURELOADER_H
#define __TEXTURELOADER_H
#include <xcommon/IXTextureProxy.h>
#include <xcommon/IFileSystem.h>
class CTextureProxy: public IXTextureProxy
{
public:
CTextureProxy(IFileSystem *pFileSystem);
UINT XMETHODCALLTYPE getVersion() override;
const char* XMETHODCALLTYPE getDescription() const override;
bool XMETHODCALLTYPE resolveName(const char *szName, char *szOutput, UINT *puBufSize) override;
protected:
IFileSystem *m_pFileSystem;
};
#endif
/***********************************************************
Copyright Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018
See the license in LICENSE
***********************************************************/
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
BOOL APIENTRY DllMain(HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch(ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#include <xcommon/IXPlugin.h>
#include "TextureProxy.h"
class CSXEPlugin: public IXPlugin
{
public:
void XMETHODCALLTYPE startup(IXCore *pCore) override
{
m_pCore = pCore;
}
void XMETHODCALLTYPE shutdown() override
{
}
UINT XMETHODCALLTYPE getInterfaceCount() override
{
return(1);
}
const XGUID* XMETHODCALLTYPE getInterfaceGUID(UINT id) override
{
static XGUID s_guid;
switch(id)
{
case 0:
s_guid = IXTEXTUREPROXY_GUID;
break;
default:
return(NULL);
}
return(&s_guid);
}
IXUnknown* XMETHODCALLTYPE getInterface(const XGUID &guid) override
{
if(guid == IXTEXTUREPROXY_GUID)
{
return(new CTextureProxy(m_pCore->getFileSystem()));
}
return(NULL);
}
protected:
IXCore *m_pCore;
};
DECLARE_XPLUGIN(CSXEPlugin);
#ifndef __IXTEXTUREPROXY_H
#define __IXTEXTUREPROXY_H
#include <gdefines.h>
// {BD03E0C0-7589-4162-8130-5CD770581EE3}
#define IXTEXTUREPROXY_GUID DEFINE_XGUID(0xbd03e0c0, 0x7589, 0x4162, 0x81, 0x30, 0x5c, 0xd7, 0x70, 0x58, 0x1e, 0xe3)
#define IXTEXTUREPROXY_VERSION 1
class IXTextureProxy: public IXUnknown
{
public:
virtual const char* XMETHODCALLTYPE getDescription() const = 0;
virtual bool XMETHODCALLTYPE resolveName(const char *szName, char *szOutput, UINT *puBufSize) = 0;
};
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment