37 1.0f, 1.0f, 1.0f, 0.0f,
38 0.0f, 0.0f, 0.0f, 0.0f,
39 0.0f, 0.0f, 0.0f, 0.0f,
40 0.0f, 0.0f, 0.0f, 0.0f
44 -0.47f, -0.74f, 0.47f, 0.0f,
45 0.0f, 0.0f, 0.0f, 0.0f,
46 0.0f, 0.0f, 0.0f, 0.0f,
47 0.0f, 0.0f, 0.0f, 0.0f
136 if ( resource !=
TNULL )
140 while ( resource !=
TNULL )
157 resource = nextResource;
175 TASSERT( pResource !=
TNULL,
"Couldn't create TResource" );
177 if ( pResource !=
TNULL )
181 if ( parent ==
TNULL )
207 uint16_t versionMajor =
GetClass()->GetVersionMajor();
208 uint16_t versionMinor =
GetClass()->GetVersionMinor();
209 file->
CPrintf(
"Toshi rendering interface through object[\"%s\"] Version : %u.%u\r\n", name, versionMajor, versionMinor );
214 file->
CPrintf(
"Adapter : %d\r\n", it->GetAdapterIndex() );
215 file->
CPrintf(
" Driver : %s\r\n", it->GetDriver().GetString() );
216 file->
CPrintf(
" Description : %s\r\n", it->GetDriverDescription().GetString() );
217 file->
CPrintf(
" Product ID : %u\r\n", it->GetProductID() );
218 file->
CPrintf(
" Version : %u\r\n", it->GetVersion() );
219 file->
CPrintf(
" Sub-version : %u\r\n", it->GetSubVersion() );
220 file->
CPrintf(
" Build : %u\r\n", it->GetBuild() );
221 file->
CPrintf(
" Supports %d modes:\r\n", it->GetModeList()->Count() );
318 next = pRes2->
Next();
323 if ( ( pRes2->m_State & 4 ) == 0 )
325 pRes2 = pRes2->
Child();
333 if ( pRes2 == pRes1 )
338 pTVar1 = pRes2->
Child();
341 pRes1 = pTVar1->
Next();
342 if ( pRes1 == pTVar1 )
367 auto next = resource->
Next();
368 if ( next == resource ) next =
TNULL;
409 TString8 errorString =
"Unable to find the passed device!\n";
411 OutputDebugStringA( errorString );
416 for (
auto pMode = pAdapter->GetModeList()->Begin(); pMode != pAdapter->GetModeList()->End(); pMode++ )
418 auto uiNumSupportedDevices = pAdapter->GetNumSupportedDevices();
420 for (
TUINT32 i = 0; i < uiNumSupportedDevices; i++ )
422 auto pDevice = pMode->GetDevice( i );
424 if ( pDevice->IsSoftware() )
continue;
430 if ( !pDevice->GetMode()->Is32Bit() )
432 bPassedColourDepth =
TFALSE;
437 if ( !pDevice->GetMode()->Is16Bit() )
439 bPassedColourDepth =
TFALSE;
445 if ( a_rDisplayParams.
bWindowed && !pDevice->CanRenderWindowed() )
450 auto uiWidth = pDevice->GetMode()->GetWidth();
451 auto uiHeight = pDevice->GetMode()->GetHeight();
455 if ( uiWidth == a_rDisplayParams.
uiWidth && uiHeight == a_rDisplayParams.
uiHeight )
458 bPassedColourDepth && bPassedWindowed )
466 if ( a_rDisplayParams.
uiWidth <= uiWidth )
468 if ( uiHeight < a_rDisplayParams.
uiHeight )
continue;
471 bPassedColourDepth && bPassedWindowed )
Core file system interface for the Toshi engine.
TOSHI_NAMESPACE_START typedef TUINT8 SYSRESOURCE
Rendering system interface for the Toshi engine.
#define TOSHI_NAMESPACE_START
#define TOSHI_NAMESPACE_END
#define TDEFINE_CLASS_NORUNTIME(...)
static TFile * Create(const TString8 &a_rcFilename, TFILEMODE a_eMode=TFILEMODE_READ)
virtual TINT CPrintf(const TCHAR *a_szFormat,...)=0
Analogue of printf but writes result to the file.
constexpr void Set(TFLOAT x, TFLOAT y)
virtual void SetScreenOffset(const TVector2 &a_rVec)
virtual void DestroySystemResources()
virtual void OnInitializationFailureDevice()
void DeleteResource(TResource *resources)
TDebugText * m_pDebugText
void DestroyDyingResources(TResource *resources)
virtual void RenderIndexPrimitive(TINT param_2, TINT param_3, TINT param_4, TINT param_5, TINT param_6, TINT param_7)
TBOOL m_bCreateSystemResources
TNodeList< TRenderAdapter > m_AdapterList
TRenderContext * m_pCurrentContext
TBOOL m_bHasDyingResources
virtual TRenderContext * CreateRenderContext()=0
void FlushDyingResources()
virtual TBOOL BeginScene()
TResource * m_SystemResources[SYSRESOURCE_NUMOF]
TRenderContext * SetCurrentRenderContext(TRenderContext *a_pRenderContext)
virtual void FlushOrderTables()
virtual TBOOL Supports32BitTextures()
virtual float GetScreenAspectRatio()
virtual TBOOL SetPixelAspectRatio(float a_fPixelAspectRatio)
TTexture * m_pInvalidTexture
TNodeTree< TResource > m_Resources
void DeleteResourceRecurse(TResource *resources)
TNodeList< TRenderAdapter > * GetAdapterList()
TRenderContext * m_pCreatedContext
TStack< TMatrix44, 20 > m_Transforms
void DestroyResource(TResource *resource)
void SetResourceExplicit(TResource *resource, SYSRESOURCE systemResource)
TResource * CreateResource(TClass *pClass, const TCHAR *name, TResource *parent)
virtual void SetLightDirectionMatrix(const TMatrix44 &a_rMatrix)
void DestroyAllShaderResources()
TRenderAdapter::Mode::Device * FindDevice(const DISPLAYPARAMS &a_rDisplayParams)
virtual float GetPixelAspectRatio()
virtual void SetLightColourMatrix(const TMatrix44 &a_rMatrix)
virtual void OnInitializationFailureDisplay()
virtual void * CreateUnknown(const TCHAR *a_szName, TINT a_iUnk1, TINT a_iUnk2, TINT a_iUnk3)=0
virtual void GetScreenOffset(TVector2 &a_rVec)
virtual void Unknown1(TViewport *a_pViewport)
TMatrix44 m_LightDirection
virtual ~TRenderInterface()
virtual TBOOL CreateSystemResources()
void DeleteResourceAtomic(TResource *resources)
virtual TBOOL IsTextureFormatSupported(TINT a_eTextureFormat)
void DestroyResourceRecurse(TResource *resource)
TUINT32 eDepthStencilFormat
virtual void Invalidate()
void SetRenderer(TRenderInterface *pRenderer)
void SetName(const TCHAR *name)
void AddState(TResourceState state)
class TObject * CreateObject() const
TBOOL IsA(TClass *pClass)
TNodeTree< T > * Tree() const
virtual Toshi::TClass * GetClass()
static void MemClear(void *ptr, TSIZE size)