port from perforce

This commit is contained in:
2026-04-18 22:31:51 +02:00
commit 8d0ab5b7cc
8409 changed files with 3972376 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
#pragma once
struct __declspec(novtable) IAnimateable
{
virtual ~IAnimateable() {};
virtual void OnAnimate(double argPosition, unsigned int argUserData) = 0;
};
struct __declspec(novtable) IEvent
{
virtual ~IEvent() {};
virtual void OnEvent(unsigned int argUserData) = 0;
};
struct __declspec(novtable) IAnimationManager
{
virtual ~IAnimationManager() {};
virtual void AddDemoTimeAnimation(double argBeginTime, double argEndTime, IAnimateable* argValue, unsigned int argUserData = 0) = 0;
virtual void AddRealTimeAnimation(double argBeginTime, double argEndTime, IAnimateable* argValue, unsigned int argUserData = 0) = 0;
virtual void AddDemoTimeEvent(double argTime, IEvent* argValue, unsigned int argUserData = 0) = 0;
virtual void AddRealTimeEvent(double argTime, IEvent* argValue, unsigned int argUserData = 0) = 0;
virtual void Animate() = 0;
};

View File

@@ -0,0 +1,59 @@
#pragma once
struct ITransformationAnimation;
struct __declspec(novtable) IBone
{
virtual ~IBone() {};
virtual void Initialize(const string16& argName, int argIndex, const D3DXVECTOR3& argPoseTranslation, const D3DXVECTOR3& argPoseScale, const D3DXQUATERNION& argPoseRotation) = 0;
virtual const D3DXMATRIX& GetTransformationAtTime(float argTime, const D3DXMATRIX& argRootTransformationMatrix) = 0;
virtual const D3DXMATRIX& get_PoseTransformation() const = 0;
virtual void set_Parent(IBone* argParent_) = 0;
virtual IBone* get_Parent() const = 0;
virtual std::vector<IBone*>& get_ChildBones() = 0;
virtual string16 get_Name() const = 0;
virtual int get_Index() const = 0;
virtual void set_TransformationAnimation(ITransformationAnimation* argTransformationAnimation) = 0;
virtual ITransformationAnimation* get_TransformationAnimation() const = 0;
virtual std::map<int, IBone*>& get_BoneIndexList() = 0;
virtual D3DXMATRIX* get_MatrixArray() = 0;
virtual unsigned int get_MatrixArraySize() = 0;
};
struct Sequence
{
Sequence()
: m_Start(0.0f)
, m_End(0.0f)
, m_Loop(false)
{
}
float m_Start;
float m_End;
bool m_Loop;
};
struct __declspec(novtable) IBoneController
{
virtual ~IBoneController() {}
virtual void Initialize(IBone& argRootBone) = 0;
virtual void Initialize(const IBoneController& argOther) = 0;
virtual void Apply() = 0;
virtual void RegisterSequence(const string16& argName, float argStart, float argEnd, bool argLoop) = 0;
virtual void PlaySequence(const string16& argName) = 0;
virtual const string16& get_CurrentSequence() const = 0;
virtual const std::map<string16, Sequence >& get_Sequences() const = 0;
virtual IBone& get_RootBone() const = 0;
};

View File

@@ -0,0 +1,46 @@
#pragma once
struct ViewFrustum
{
D3DXPLANE Plane[6];
};
struct __declspec(novtable) ICamera
{
virtual const D3DXMATRIX& get_ProjectionMatrix() const = 0;
virtual const D3DXMATRIX& get_ViewMatrix() const = 0;
virtual void set_AspectRatio(float argValue) = 0;
virtual float get_AspectRatio() const = 0;
virtual void set_FarClip(float argValue) = 0;
virtual float get_FarClip() const = 0;
virtual void set_NearClip(float argValue) = 0;
virtual float get_NearClip() const = 0;
virtual const ViewFrustum& get_ViewFrustum() const = 0;
};
struct __declspec(novtable) IPerspectiveCamera
{
virtual void set_Fov(float argValue) = 0;
virtual float get_Fov() const = 0;
virtual ICamera& get_Base() = 0;
};
struct __declspec(novtable) IOrthographicCamera
{
virtual void set_Width(float argValue) = 0;
virtual float get_Width() const = 0;
virtual void set_Height(float argValue) = 0;
virtual float get_Height() const = 0;
virtual ICamera& get_Base() = 0;
};

View File

@@ -0,0 +1,96 @@
#pragma once
struct CommandFlags
{
enum Enumeration
{
None = 0x00,
SubChainStart = 0x01, // Command will start a new command chain (UseShader for example)
SubChainEnd = 0x02, // Command will end a command chain (Render)
Unique = 0x04, // Similar commands should not be reduced to one Command
StartChain = 0x08, // Command will generate a new command chain
EndChain = 0x10, // Command will end the command chain (RenderGeometry for example)
FlushChain = 0x20, // Command will end the command chain (RenderGeometry for example)
};
};
struct ICommandUser;
struct Command
{
Command(ICommandUser* inOwner, unsigned char inFlags, unsigned char inType, unsigned char inPriority, unsigned char inSubPriority = 0)
: Owner(inOwner)
, Flags(inFlags)
, Priority(inPriority)
, SubPriority(inSubPriority)
, Type(inType)
{
}
ICommandUser* Owner;
union
{
struct
{
UINT8 Priority;
UINT8 SubPriority;
UINT8 Flags;
UINT8 Type;
};
UINT32 CommandInfo;
};
};
struct CommandExecuteResult
{
enum Enumeration
{
None, // Execution done, proceed to the next Command
RetrySubChain, // Execution should start from a previous "SubChainStart"-flagged Command
RetrySubChainSkipHead // Equal to the above result but skips the as "SubChainStart"-flagged Command
};
};
struct IRenderCommandNode;
struct ICommandBuffer;
struct __declspec(novtable) ICommandUser
{
virtual ~ICommandUser() {}
virtual const std::vector<Command*>& GetCommands() const = 0;
virtual CommandExecuteResult::Enumeration ExecuteCommand(unsigned char argCommandType, ICommandBuffer& argCurrentBuffer, uint32 argCurrentPositon) = 0;
virtual void AssignToRenderCommandNode(IRenderCommandNode& argNode) = 0;
virtual void UnassignFromRenderCommandNode(IRenderCommandNode& argNode) = 0;
// Commands should be applied before all following commands
virtual bool get_IsPreconditionForNextCommands() const = 0;
virtual string8 get_UserName() const;
};
struct __declspec(novtable) ICommandBuffer
{
virtual ~ICommandBuffer() {}
virtual void Clear() = 0;
virtual void AddCommand(Command& argCommand) = 0;
virtual void Perform(bool argUseOptimizedList) = 0;
virtual void Optimize() = 0;
virtual void AddChildCommandBuffer(ICommandBuffer& argCommandBuffer) = 0;
virtual void RemoveChildCommandBuffer(ICommandBuffer& argCommandBuffer) = 0;
virtual std::vector<Command*>& get_BufferedCommands() = 0;
virtual const std::vector<ICommandBuffer*>& get_ChildCommandBuffers() const = 0;
virtual ICommandBuffer* get_ParentBuffer() const = 0;
virtual void set_ParentBuffer(ICommandBuffer* ar_CommandBuffer_) = 0;
};

View File

@@ -0,0 +1,30 @@
#pragma once
#include "IPingPongBuffer.h"
struct CommonCubeVertex
{
D3DXVECTOR3 Pos;
D3DXVECTOR3 Normal;
D3DXVECTOR3 Tangent;
D3DXVECTOR2 Tex;
};
struct CommonQuadVertex
{
D3DXVECTOR3 Pos;
D3DXVECTOR3 Normal;
D3DXVECTOR2 Tex;
};
struct IGeometryBuffer;
struct __declspec(novtable) ICommonObjectFactory
{
virtual ~ICommonObjectFactory() {}
virtual IPingPongBuffer* CreatePingPongBuffer(ITexture& argInputTexture, const PingPongBufferDescription& argDescriptor) = 0;
virtual IGeometryBuffer* CreateCube(float argWidth, float argHeight, float argDepth, bool argInverted, const string8& argName = "") = 0;
virtual IGeometryBuffer* CreateQuad(float argWidth, float argHeight, bool argTwoSided, const string8& argName = "") = 0;
};

View File

@@ -0,0 +1,70 @@
#pragma once
#include "Resource.h"
#include <vector>
struct IOutputDevice;
struct IDisplayAdapter;
struct IDisplayMode;
struct __declspec(novtable) IDeviceEnumerator
{
virtual ~IDeviceEnumerator() {}
virtual bool get_HasEnumerated() const = 0;
virtual const std::vector<IDisplayAdapter*>& get_DeviceAdapters() const = 0;
virtual bool TryEnumerate(uint32 argDesiredWidth = 0, uint32 argDesiredHeight = 0, uint32 argDesiredRefreshRate = 0, DataFormat::Enumeration argDesiredFormat = DataFormat::Unknown) = 0;
virtual IDisplayAdapter* FindBestAdapter(bool argAllowToEnumerate = false, uint32 argDesiredWidth = 0, uint32 argDesiredHeight = 0, uint32 argDesiredRefreshRate = 0, DataFormat::Enumeration argDesiredFormat = DataFormat::Unknown) = 0;
virtual IOutputDevice* FindBestOutput(bool argAllowToEnumerate = false, uint32 argDesiredWidth = 0, uint32 argDesiredHeight = 0, uint32 argDesiredRefreshRate = 0, DataFormat::Enumeration argDesiredFormat = DataFormat::Unknown) = 0;
virtual IDisplayMode* FindBestDisplayMode(bool argAllowToEnumerate = false, uint32 argDesiredWidth = 0, uint32 argDesiredHeight = 0, uint32 argDesiredRefreshRate = 0, DataFormat::Enumeration argDesiredFormat = DataFormat::Unknown) = 0;
virtual void Verbose() = 0;
};
struct IDXGIAdapter;
struct __declspec(novtable) IDisplayAdapter
{
virtual ~IDisplayAdapter() {}
virtual size_t get_DedicatedSystemMemory() const = 0;
virtual size_t get_DedicatedVideoMemory() const = 0;
virtual size_t get_SharedSystemMemory() const = 0;
virtual const std::vector<IOutputDevice*>& get_DeviceOutputs() const = 0;
virtual bool get_HasEnumerated() const = 0;
virtual IDXGIAdapter* get_Adapter() const = 0;
virtual string16 get_Name() const = 0;
virtual bool TryEnumerate(uint32 argDesiredWidth = 0, uint32 argDesiredHeight = 0, uint32 argDesiredRefreshRate = 0, DataFormat::Enumeration argDesiredFormat = DataFormat::Unknown) = 0;
virtual IOutputDevice* FindBestOutput(bool argAllowToEnumerate = false, uint32 argDesiredWidth = 0, uint32 argDesiredHeight = 0, uint32 argDesiredRefreshRate = 0, DataFormat::Enumeration argDesiredFormat = DataFormat::Unknown) = 0;
virtual IDisplayMode* FindBestDisplayMode(bool argAllowToEnumerate = false, uint32 argDesiredWidth = 0, uint32 argDesiredHeight = 0, uint32 argDesiredRefreshRate = 0, DataFormat::Enumeration argDesiredFormat = DataFormat::Unknown) = 0;
};
struct __declspec(novtable) IOutputDevice
{
virtual ~IOutputDevice() {}
virtual bool get_IsAttachedToDesktop() const = 0;
virtual HMONITOR get_MonitorHandle() const = 0;
virtual RECT get_DesktopCoordinates() const = 0;
virtual const std::vector<IDisplayMode*>& get_DisplayModes() const = 0;
virtual bool get_HasEnumerated() const = 0;
virtual bool TryEnumerate(uint32 argDesiredWidth = 0, uint32 argDesiredHeight = 0, uint32 argDesiredRefreshRate = 0, DataFormat::Enumeration argDesiredFormat = DataFormat::Unknown) = 0;
virtual IDisplayMode* FindBestDisplayMode(bool argAllowToEnumerate = false, uint32 argDesiredWidth = 0, uint32 argDesiredHeight = 0, uint32 argDesiredRefreshRate = 0, DataFormat::Enumeration argDesiredFormat = DataFormat::Unknown) = 0;
virtual string16 get_Name() const = 0;
};
struct __declspec(novtable) IDisplayMode
{
virtual ~IDisplayMode() {}
virtual uint32 get_Width() const = 0;
virtual uint32 get_Height() const = 0;
virtual uint32 get_RefreshRate() const = 0;
virtual DataFormat::Enumeration get_Format() const = 0;
};

View File

@@ -0,0 +1,41 @@
#pragma once
struct IDisplayAdapter;
struct IResourceFactory;
struct ICommonObjectFactory;
struct IFileSystem;
struct IShader;
struct IRenderTargetBase;
struct IGeometryBuffer;
struct ITimeline;
struct IAnimationManager;
struct EngineStates
{
IShader* LastShader;
IRenderTargetBase* LastRenderTarget;
IGeometryBuffer* LastVertexBufferProvider;
IGeometryBuffer* LastIndexBufferProvider;
};
struct __declspec(novtable) IEngine
{
virtual ~IEngine() {}
virtual void Initialize(IDisplayAdapter* ar_Adapter_ = NULL) = 0;
virtual void Uninitialize() = 0;
virtual bool get_IsInitialized() const = 0;
virtual bool get_IsUsingReferenceDriver() const = 0;
virtual IResourceFactory& get_ResourceFactory() const = 0;
virtual ICommonObjectFactory& get_CommonObjectFactory() const = 0;
virtual IFileSystem& get_FileSystem() const = 0;
virtual ITimeline& get_Timeline() const = 0;
virtual IAnimationManager& get_AnimationManager() const = 0;
virtual ID3D10Device& get_DX10Device() const = 0;
virtual IDXGIFactory& get_DXGIFactory() const = 0;
virtual EngineStates& get_EngineStates() = 0;
};

View File

@@ -0,0 +1,34 @@
#pragma once
struct __declspec(novtable) IFile
{
virtual ~IFile() {};
virtual char* get_Buffer() = 0;
virtual unsigned int get_BufferLength() = 0;
virtual void SaveAs(string16 argFileName) = 0;
virtual std::string ReadString() = 0;
virtual float ReadFloat() = 0;
virtual int ReadInt() = 0;
virtual void* ReadDataArray(unsigned int argBytes) = 0;
virtual void RewindFilePointer() = 0;
virtual char* get_FilePointer() const = 0;
virtual void set_FilePointer(char* ac_Position_) = 0;
virtual bool IsEof() const = 0;
virtual string16 get_FileName() const = 0;
};
struct __declspec(novtable) IFileSystem
{
virtual ~IFileSystem() {};
virtual void InitializeFromDirectory(string16 argDirectory = L"data") = 0;
virtual void InitializeFromZipFile(string16 argZipFile = L"data.pak") = 0;
virtual IFile* Open(string16 argFileName) = 0;
};

View File

@@ -0,0 +1,170 @@
#pragma once
#include "Resource.h"
struct PrimitiveTopology
{
enum Enumeration
{
Undefined = 0,
PointList = 1,
LineList = 2,
LineStrip = 3,
TriangleList = 4,
TriangleStrip = 5,
LineListAdjacency = 10,
LineStripAdjacency = 11,
TriangleListAdjacency = 12,
TriangleStripAdjacency = 13
};
};
struct VertexElement
{
enum Enumeration
{
Position,
PositionT,
Normal,
Binormal,
Tangent,
Color,
BlendWeight,
BlendIndices,
Texture2D,
Texture3D,
Texture4D,
PointSize
};
VertexElement(Enumeration argElement, uint32 argNameIndex = 0)
: m_NameIndex(argNameIndex)
, m_WellKnownFormat(argElement)
{
switch (argElement)
{
case PositionT:
{
m_SemanticName = "POSITIONT";
m_ElementFormat = DataFormat::R32G32B32A32_Float;
m_Size = 4 * sizeof(float);
break;
}
case Normal:
{
m_SemanticName = "NORMAL";
m_ElementFormat = DataFormat::R32G32B32_Float;
m_Size = 3 * sizeof(float);
break;
}
case Binormal:
{
m_SemanticName = "BINORMAL";
m_ElementFormat = DataFormat::R32G32B32_Float;
m_Size = 3 * sizeof(float);
break;
}
case Tangent:
{
m_SemanticName = "TANGENT";
m_ElementFormat = DataFormat::R32G32B32_Float;
m_Size = 3 * sizeof(float);
break;
}
case Color:
{
m_SemanticName = "COLOR";
m_ElementFormat = DataFormat::R8G8B8A8_UnsignedNormalized;
m_Size = 4 * sizeof(unsigned char);
break;
}
case BlendWeight:
{
m_SemanticName = "BLENDWEIGHT";
m_ElementFormat = DataFormat::R32G32B32A32_Float;
m_Size = 4 * sizeof(float);
break;
}
case BlendIndices:
{
m_SemanticName = "BLENDINDICES";
m_ElementFormat = DataFormat::R32G32B32A32_SignedInteger;
m_Size = 4 * sizeof(int);
break;
}
case Texture2D:
{
m_SemanticName = "TEXCOORD";
m_ElementFormat = DataFormat::R32G32_Float;
m_Size = 2 * sizeof(float);
break;
}
case Texture3D:
{
m_SemanticName = "TEXCOORD";
m_ElementFormat = DataFormat::R32G32B32_Float;
m_Size = 3 * sizeof(float);
break;
}
case Texture4D:
{
m_SemanticName = "TEXCOORD";
m_ElementFormat = DataFormat::R32G32B32A32_Float;
m_Size = 4 * sizeof(float);
break;
}
case PointSize:
{
m_SemanticName = "PSIZE";
m_ElementFormat = DataFormat::R32_Float;
m_Size = 1 * sizeof(float);
break;
}
case Position:
default:
{
m_SemanticName = "POSITION";
m_ElementFormat = DataFormat::R32G32B32_Float;
m_Size = 3 * sizeof(float);
break;
}
}
}
string8 m_SemanticName;
DataFormat::Enumeration m_ElementFormat;
Enumeration m_WellKnownFormat;
uint32 m_NameIndex;
uint32 m_Size;
};
struct __declspec(novtable) IGeometryBuffer
{
virtual ~IGeometryBuffer() {}
virtual void SetVertexData(uint32 argVertexCount, uint32 argVertexElementSize, void* a_VertexData_, const std::vector<VertexElement>& argVertexElements, bool argNeedsDynamicAccess) = 0;
virtual void DeleteVertexData() = 0;
virtual void SetIndexData(uint32 argIndexCount, uint32* aui_IndexData_, bool argNeedsDynamicAccess) = 0;
virtual void DeleteIndexData() = 0;
virtual void* MapVertexBuffer(DataAccessMode::Enumeration argAccessMode) = 0;
virtual void UnmapVertexBuffer() = 0;
virtual uint32* MapIndexBuffer(DataAccessMode::Enumeration argAccessMode) = 0;
virtual void UnmapIndexBuffer() = 0;
virtual uint32 get_IndexBufferOffset() const = 0;
virtual void set_IndexBufferOffset(uint32 argValue) = 0;
virtual uint32 get_IndexBufferUsableLength() const = 0;
virtual void set_IndexBufferUsableLength(uint32 argValue) = 0;
virtual uint32 get_IndexBufferLength() const = 0;
virtual uint32 get_VertexBufferLength() const = 0;
//virtual ICollisionHull get_CollisionHull() const = 0;
virtual PrimitiveTopology::Enumeration get_PrimitiveTopology() const = 0;
virtual void set_PrimitiveTopology(PrimitiveTopology::Enumeration argValue) = 0;
virtual void ConvertToAdjacency() = 0;
};

View File

@@ -0,0 +1,40 @@
#pragma once
#include "Resource.h"
struct PingPongBufferDescription
{
PingPongBufferDescription()
{
LoopCount = 0;
TextureWidth = 0;
TextureHeight = 0;
TextureFormat = DataFormat::Unknown;
}
uint32 LoopCount;
string16 ShaderFileName;
string8 ShaderTechniqueA;
string8 ShaderTechniqueB;
string8 PreProcessShaderTechnique;
uint32 TextureWidth;
uint32 TextureHeight;
DataFormat::Enumeration TextureFormat;
};
struct ITexture;
struct IRenderCommandNode;
interface IPingPongBuffer
{
virtual ~IPingPongBuffer() {}
virtual ITexture& get_InputTexture() const = 0;
virtual void set_InputTexture(ITexture& argTexture) = 0;
virtual ITexture& get_OutputTexture() const = 0;
virtual const PingPongBufferDescription& get_Descriptor() const = 0;
virtual void set_Descriptor(const PingPongBufferDescription& argValue) = 0;
virtual IRenderCommandNode& get_RootNode() const = 0;
virtual IRenderCommandNode& get_PreProcessNode() const = 0;
};

View File

@@ -0,0 +1,53 @@
#pragma once
#include "ICommandUser.h"
struct __declspec(novtable) IRenderCommandNode
{
virtual ~IRenderCommandNode() {}
virtual const std::vector<ICommandUser*> get_CommandUsers() const = 0;
virtual void set_Parent(IRenderCommandNode* ar_Node_) = 0;
virtual IRenderCommandNode* get_Parent() const = 0;
virtual bool IsDirty() const = 0;
virtual void MarkDirty() = 0;
virtual void AddCommandUser(ICommandUser& argCommandUser) = 0;
virtual void RemoveCommandUser(ICommandUser& argCommandUser) = 0;
virtual void ReplaceCommandUser(ICommandUser& argWhatCommandUser, ICommandUser& argWhithCommandUser) = 0;
virtual void ProcessCommands() = 0;
};
struct ICommandBuffer;
struct __declspec(novtable) IRenderCommandNodeInternal
{
virtual ~IRenderCommandNodeInternal() {}
virtual void GenerateDeviceCommands() = 0;
virtual ICommandBuffer* get_CommandBuffer() const = 0;
};
// Helper functions
template<typename T> void AddToNode(IRenderCommandNode& commandNode, T& commandUser)
{
commandNode.AddCommandUser(dynamic_cast<ICommandUser&>(commandUser));
}
template<typename T> void AddToNode(IRenderCommandNode& commandNode, T* commandUser)
{
commandNode.AddCommandUser(dynamic_cast<ICommandUser&>(*commandUser));
}
template<typename T> void RemoveFromNode(IRenderCommandNode& commandNode, T& commandUser)
{
commandNode.RemoveCommandUser(dynamic_cast<ICommandUser&>(commandUser));
}
template<typename T> void RemoveFromNode(IRenderCommandNode& commandNode, T* commandUser)
{
commandNode.RemoveCommandUser(dynamic_cast<ICommandUser&>(*commandUser));
}

View File

@@ -0,0 +1,74 @@
#pragma once
#include "Resource.h"
struct ViewPort
{
ViewPort()
: m_TopLeftX(0)
, m_TopLeftY(0)
, m_Width(0)
, m_Height(0)
, m_MinDepth(0.0f)
, m_MaxDepth(1.0f)
{
}
int m_TopLeftX;
int m_TopLeftY;
uint32 m_Width;
uint32 m_Height;
float m_MinDepth;
float m_MaxDepth;
};
struct BindFlags
{
enum Enumeration
{
ClearDepthStencil = 0x001,
ClearColor = 0x002,
ClearAll = 0x00F,
BindAdditionalTexture0 = 0x010,
BindAdditionalTexture1 = 0x020,
BindAdditionalTexture2 = 0x040,
BindAdditionalTexture3 = 0x080,
BindBaseTexture = 0x100,
BindAllTextures = 0xFF0,
Default = ClearAll | BindAllTextures
};
};
struct __declspec(novtable) IRenderTargetBase
{
virtual ~IRenderTargetBase() {}
virtual void set_ClearDepth(float argValue) = 0;
virtual float get_ClearDepth() const = 0;
virtual void set_ClearStencil(unsigned char argValue) = 0;
virtual unsigned char get_ClearStencil() const = 0;
virtual void set_ClearColor(const D3DXCOLOR& argValue) = 0;
virtual D3DXCOLOR get_ClearColor() const = 0;
virtual void set_ViewPort(const ViewPort& argValue) = 0;
virtual ViewPort get_ViewPort() const = 0;
virtual uint32 get_RenderTargetWidth() const = 0;
virtual uint32 get_RenderTargetHeight() const = 0;
virtual DataFormat::Enumeration get_RenderTargetFormat() const = 0;
virtual void set_HasDepthStencilBuffer(bool argState) = 0;
virtual bool get_HasDepthStencilBuffer() const = 0;
virtual void AddAdditionalRenderTarget(IRenderTargetBase& argTarget) = 0;
virtual void RemoveAdditionalRenderTarget(IRenderTargetBase& argTarget) = 0;
virtual ID3D10RenderTargetView* get_DX10RenderTargetView() const = 0;
virtual ID3D10DepthStencilView* get_DX10DepthStencilView() const = 0;
virtual void Bind(DWORD argBindFlags = BindFlags::Default) = 0;
virtual void UnbindAllRenderTargets() = 0;
};

View File

@@ -0,0 +1,13 @@
#pragma once
#include "Resource.h"
struct ITexture;
struct IRenderTargetBase;
struct __declspec(novtable) IRenderTargetTexture
{
virtual void SetTextureParameters(uint32 argWidth, uint32 argHeight, DataFormat::Enumeration argFormat, uint32 argMultiSampleCount = 1, uint32 argMultiSampleQuality = 0) = 0;
virtual void Resize(int argWidth, int argHeight) = 0;
virtual ITexture& get_TextureResource() const = 0;
virtual IRenderTargetBase& get_Base() = 0;
};

View File

@@ -0,0 +1,79 @@
#pragma once
#include "ISwapChain.h"
#include "IGeometryBuffer.h"
#include "IShader.h"
#include "IRenderCommandNode.h"
#include "IShaderParameterCollection.h"
#include "ITexture.h"
#include "ITransformation.h"
#include "ITransformationAnimation.h"
#include "IRenderTargetTexture.h"
#include "ICamera.h"
#include "IBone.h"
#include "IWindow.h"
struct __declspec(novtable) IResourceFactory
{
virtual ~IResourceFactory() {}
virtual ITransformationAnimation& CreateTransformationAnimation() = 0;
virtual void DeleteTransformationAnimation(ITransformationAnimation& argValue, bool argRemoveOnly = false) = 0;
virtual IWindow& CreateSwapChainWindow() = 0;
virtual void DeleteSwapChainWindow(IWindow& argValue, bool argRemoveOnly = false) = 0;
virtual IRenderCommandNode& CreateRenderCommandNode() = 0;
virtual void DeleteRenderCommandNode(IRenderCommandNode& argValue, bool argRemoveOnly = false) = 0;
virtual IShader* FindShader(const string8& argId) = 0;
virtual IShader& CreateOrFindShader(const string8& argId = "") = 0;
virtual void DeleteShader(IShader& argValue, bool argRemoveOnly = false) = 0;
virtual IInternalShader* FindInternalShader(const string8& argId) = 0;
virtual IInternalShader& CreateOrFindInternalShader(const string8& argId = "") = 0;
virtual void DeleteInternalShader(IInternalShader& argValue, bool argRemoveOnly = false) = 0;
virtual ISwapChain* FindSwapChain(const string8& argId) = 0;
virtual ISwapChain& CreateOrFindSwapChain(const string8& argId = "") = 0;
virtual void DeleteSwapChain(ISwapChain& argValue, bool argRemoveOnly = false) = 0;
virtual IRenderTargetTexture* FindRenderTargetTexture(const string8& argId) = 0;
virtual IRenderTargetTexture& CreateOrFindRenderTargetTexture(const string8& argId = "") = 0;
virtual void DeleteRenderTargetTexture(IRenderTargetTexture& argValue, bool argRemoveOnly = false) = 0;
virtual IGeometryBuffer* FindGeometryBuffer(const string8& argId) = 0;
virtual IGeometryBuffer& CreateOrFindGeometryBuffer(const string8& argId = "") = 0;
virtual void DeleteGeometryBuffer(IGeometryBuffer& argValue, bool argRemoveOnly = false) = 0;
virtual IShaderParameterCollection* FindShaderParameterCollection(const string8& argId) = 0;
virtual IShaderParameterCollection& CreateOrFindShaderParameterCollection(const string8& argId = "") = 0;
virtual void DeleteShaderParameterCollection(IShaderParameterCollection& argValue, bool argRemoveOnly = false) = 0;
virtual ITexture* FindTexture(const string8& argId) = 0;
virtual ITexture& CreateOrFindTexture(const string8& argId = "") = 0;
virtual void DeleteTexture(ITexture& argValue, bool argRemoveOnly = false) = 0;
virtual ITransformation* FindTransformation(const string8& argId) = 0;
virtual ITransformation& CreateOrFindTransformation(const string8& argId = "") = 0;
virtual void DeleteTransformation(ITransformation& argValue, bool argRemoveOnly = false) = 0;
virtual IPerspectiveCamera* FindPerspectiveCamera(const string8& argId) = 0;
virtual IPerspectiveCamera& CreateOrFindPerspectiveCamera(const string8& argId = "") = 0;
virtual void DeletePerspectiveCamera(IPerspectiveCamera& argValue, bool argRemoveOnly = false) = 0;
virtual IOrthographicCamera* FindOrthographicCamera(const string8& argId) = 0;
virtual IOrthographicCamera& CreateOrFindOrthographicCamera(const string8& argId = "") = 0;
virtual void DeleteOrthographicCamera(IOrthographicCamera& argValue, bool argRemoveOnly = false) = 0;
virtual IBone* FindBone(const string8& argId) = 0;
virtual IBone& CreateOrFindBone(const string8& argId = "") = 0;
virtual void DeleteBone(IBone& argValue, bool argRemoveOnly = false) = 0;
virtual IBoneController* FindBoneController(const string8& argId) = 0;
virtual IBoneController& CreateOrFindBoneController(const string8& argId = "") = 0;
virtual void DeleteBoneController(IBoneController& argValue, bool argRemoveOnly = false) = 0;
virtual bool HasCreatedResource() = 0;
};

View File

@@ -0,0 +1,33 @@
#pragma once
struct IFile;
struct __declspec(novtable) IInternalShader
{
virtual ~IInternalShader() {}
virtual void LoadFromFile(const string16& argValue) = 0;
virtual ID3D10Effect* get_DX10Effect() const = 0;
};
struct __declspec(novtable) IShader
{
virtual ~IShader() {}
virtual void LoadFromFile(const string16& argValue) = 0;
virtual string8 get_TechniqueName() const = 0;
virtual void set_TechniqueName(const string8& argValue) = 0;
virtual ID3D10EffectTechnique* get_DX10Technique() const = 0;
virtual IInternalShader* get_InternalShader() const = 0;
virtual bool TryApplyNextPass() = 0;
virtual void ApplyFirstPass() = 0;
virtual uint32 get_CurrentRenderPass() const = 0;
virtual void set_Priority(unsigned char argValue) = 0;
virtual unsigned char get_Priority() const = 0;
};

View File

@@ -0,0 +1,42 @@
#pragma once
struct ParameterBindType
{
enum Enumeration
{
BindBySemantic,
BindByVariable
};
};
struct __declspec(novtable) IShaderParameter
{
virtual ParameterBindType::Enumeration get_ParameterNameType() const = 0;
virtual void set_ParameterNameType(ParameterBindType::Enumeration argBindType) = 0;
virtual void ApplyValue(ID3D10EffectVariable& argVariable) = 0;
};
struct ITexture;
struct __declspec(novtable) IShaderParameterCollection
{
virtual ~IShaderParameterCollection() {}
virtual bool get_IsPreconditionForFollowingShaders() const = 0;
virtual void set_IsPreconditionForFollowingShaders(bool argValue) = 0;
virtual void SetParameter(const string8& argParameterName,IShaderParameter* ar_Parameter_) = 0;
virtual void SetParameter(const string8& argParameterName, ITexture& argParameter, ParameterBindType::Enumeration argParamNameType = ParameterBindType::BindBySemantic) = 0;
virtual void SetParameter(const string8& argParameterName, float* af_Parameter_, ParameterBindType::Enumeration argParamNameType = ParameterBindType::BindBySemantic) = 0;
virtual void SetParameter(const string8& argParameterName, float argParameter, ParameterBindType::Enumeration argParamNameType = ParameterBindType::BindBySemantic) = 0;
virtual void SetParameter(const string8& argParameterName, D3DXVECTOR3* ar_Parameter_, ParameterBindType::Enumeration argParamNameType = ParameterBindType::BindBySemantic) = 0;
virtual void SetParameter(const string8& argParameterName, const D3DXVECTOR3& argParameter, ParameterBindType::Enumeration argParamNameType = ParameterBindType::BindBySemantic) = 0;
virtual void SetParameter(const string8& argParameterName, D3DXVECTOR4* ar_Parameter_, ParameterBindType::Enumeration argParamNameType = ParameterBindType::BindBySemantic) = 0;
virtual void SetParameter(const string8& argParameterName, const D3DXVECTOR4& argParameter, ParameterBindType::Enumeration argParamNameType = ParameterBindType::BindBySemantic) = 0;
virtual void SetParameter(const string8& argParameterName, D3DXMATRIX* argParameter, ParameterBindType::Enumeration argParamNameType = ParameterBindType::BindBySemantic) = 0;
virtual void SetParameter(const string8& argParameterName, const D3DXMATRIX& argParameter, ParameterBindType::Enumeration argParamNameType = ParameterBindType::BindBySemantic) = 0;
virtual void SetParameter(const string8& argParameterName, bool* ab_Parameter_, ParameterBindType::Enumeration argParamNameType = ParameterBindType::BindBySemantic) = 0;
virtual void SetParameter(const string8& argParameterName, bool argParameter, ParameterBindType::Enumeration argParamNameType = ParameterBindType::BindBySemantic) = 0;
virtual void RemoveParameter(const string8& argParameterName) = 0;
};

View File

@@ -0,0 +1,20 @@
#pragma once
#include "Resource.h"
struct IRenderTargetBase;
struct __declspec(novtable) ISwapChain
{
virtual ~ISwapChain() {}
virtual void SetWindowParameters(HWND argWindowHandle, uint32 argWidth = 0, uint32 argHeight = 0, uint32 argRefreshRate = 0, DataFormat::Enumeration argFormat = DataFormat::Unknown, uint32 argMultiSampleCount = 1, uint32 argMultiSampleQuality = 0) = 0;
virtual void Resize(int argWidth, int argHeight) = 0;
virtual void Present() = 0;
virtual bool get_Fullscreen() const = 0;
virtual void set_Fullscreen(bool argState) = 0;
virtual bool get_VSync() const = 0;
virtual void set_VSync(bool argState) = 0;
virtual IRenderTargetBase& get_Base() = 0;
};

View File

@@ -0,0 +1,102 @@
#pragma once
#include "Resource.h"
struct LockedTextureData
{
void* Data;
uint32 RowPitch;
};
struct TextureInitialData
{
TextureInitialData()
: Data(NULL)
, Pitch(0)
, Owner(true)
{}
TextureInitialData(void* Data, uint32 Pitch)
: Data(Data)
, Pitch(Pitch)
, Owner(true)
{}
~TextureInitialData()
{
if (Owner && Data != NULL)
delete [] Data;
}
void* Data;
uint32 Pitch;
bool Owner;
};
struct CreateTextureDescriptor
{
uint32 Width;
uint32 Height;
uint32 Elements;
uint32 MipLevels;
DataFormat::Enumeration Format;
DataAccessType::Enumeration AccessType;
TextureInitialData* InitialData_;
static CreateTextureDescriptor AsSingleTexture(uint32 Width, uint32 Height, uint32 MipLevels = 1, DataFormat::Enumeration Format = DataFormat::R8G8B8A8_SignedNormalized, TextureInitialData* InitialData_ = NULL, DataAccessType::Enumeration AccessType = DataAccessType::Dynamic)
{
CreateTextureDescriptor Desc;
Desc.Width = Width;
Desc.Height = Height;
Desc.Elements = 0;
Desc.Format = Format;
Desc.AccessType = AccessType;
Desc.InitialData_ = InitialData_;
Desc.MipLevels = MipLevels;
return Desc;
}
static CreateTextureDescriptor AsArrayTexture(uint32 Width, uint32 Height, uint32 MipLevels = 1, uint32 Elements = 1, DataFormat::Enumeration Format = DataFormat::R8G8B8A8_SignedNormalized, TextureInitialData* InitialData_ = NULL)
{
CreateTextureDescriptor Desc;
Desc.Width = Width;
Desc.Height = Height;
Desc.Elements = Elements;
Desc.Format = Format;
Desc.AccessType = DataAccessType::Static;
Desc.InitialData_ = InitialData_;
Desc.MipLevels = MipLevels;
return Desc;
}
};
struct IFile;
struct __declspec(novtable) ITexture
{
virtual string8 get_BindingName() const = 0;
virtual void set_BindingName(const string8& argName) = 0;
virtual string16 get_FileName() const = 0;
virtual uint32 get_TextureWidth() const = 0;
virtual uint32 get_TextureHeight() const = 0;
virtual uint32 get_TextureArraySize() const = 0;
virtual DataFormat::Enumeration get_TextureFormat() const = 0;
virtual void LoadFromFile(const string16& argFileName, DataAccessType::Enumeration argAccessType = DataAccessType::Static) = 0;
virtual void CreateTexture(const CreateTextureDescriptor& argDesc) = 0;
virtual LockedTextureData LockTextureBuffer(DataAccessMode::Enumeration argAccessMode, uint32 argArrayElement = 0) = 0;
virtual void UnlockTextureBuffer() = 0;
virtual void CreateRenderTargetTexture(uint32 argWidth, uint32 argHeight, DataFormat::Enumeration argFormat, uint32 argMultiSampleCount, uint32 argMultiSampleQuality) = 0;
virtual ID3D10ShaderResourceView* get_ResourceViewFromTexture() const = 0;
virtual ID3D10Texture2D* get_Texture2D() const = 0;
};

View File

@@ -0,0 +1,15 @@
#pragma once
struct __declspec(novtable) ITimeline
{
virtual ~ITimeline() {};
virtual double get_DeltaTime() = 0;
virtual double get_RealTime() = 0;
virtual double get_DemoTime() = 0;
virtual void set_SpeedAndDirection(double argValue = 1.0) = 0;
virtual double get_SpeedAndDirection() = 0;
virtual void Advance(double argSeconds) = 0;
};

View File

@@ -0,0 +1,75 @@
#pragma once
struct TransformationBindings
{
static TransformationBindings CreateDefault()
{
TransformationBindings bindings;
bindings.WorldMatrixSemanticName = "WorldMatrix";
bindings.LocalMatrixSemanticName = "LocalMatrix";
bindings.WorldPositionSemanticName = "WorldPosition";
bindings.LocalPositionSemanticName = "LocalPosition";
bindings.WorldDirectionSemanticName = "WorldDirection";
bindings.LocalDirectionSemanticName = "LocalDirection";
bindings.WorldUpDirectionSemanticName = "WorldUpDirection";
bindings.LocalUpDirectionSemanticName = "LocalUpDirection";
bindings.WorldRightDirectionSemanticName = "WorldUpDirection";
bindings.LocalRightDirectionSemanticName = "LocalUpDirection";
return bindings;
}
string8 WorldMatrixSemanticName;
string8 LocalMatrixSemanticName;
string8 WorldPositionSemanticName;
string8 LocalPositionSemanticName;
string8 WorldDirectionSemanticName;
string8 LocalDirectionSemanticName;
string8 WorldUpDirectionSemanticName;
string8 LocalUpDirectionSemanticName;
string8 WorldRightDirectionSemanticName;
string8 LocalRightDirectionSemanticName;
};
struct __declspec(novtable) ITransformation
{
virtual void set_TransformationBindings(const TransformationBindings& argData) = 0;
virtual TransformationBindings get_TransformationBindings() const = 0;
virtual void set_LocalPosition(const D3DXVECTOR3& argValue) = 0;
virtual const D3DXVECTOR3& get_LocalPosition() const = 0;
virtual const D3DXVECTOR3& get_WorldPosition() const = 0;
virtual void set_LocalRotationYPR(const D3DXVECTOR3& argValue) = 0;
virtual const D3DXVECTOR3& get_LocalRotationYPR() const = 0;
virtual void set_LocalRotation(const D3DXQUATERNION& argValue) = 0;
virtual const D3DXQUATERNION& get_LocalRotation() const = 0;
virtual const D3DXQUATERNION& get_WorldRotation() const = 0;
virtual const D3DXVECTOR3& get_LocalDirection() const = 0;
virtual const D3DXVECTOR3& get_WorldDirection() const = 0;
virtual const D3DXVECTOR3& get_LocalUpDirection() const = 0;
virtual const D3DXVECTOR3& get_WorldUpDirection() const = 0;
virtual D3DXVECTOR3 get_LocalRightDirection() const = 0;
virtual D3DXVECTOR3 get_WorldRightDirection() const = 0;
virtual void set_LocalScale(const D3DXVECTOR3& argValue) = 0;
virtual const D3DXVECTOR3& get_LocalScale() const = 0;
virtual const D3DXVECTOR3& get_WorldScale() const = 0;
virtual const D3DXMATRIX& get_WorldMatrix() const = 0;
virtual const D3DXMATRIX& get_LocalMatrix() const = 0;
virtual void set_TransformationParent(ITransformation* argValue) = 0;
virtual ITransformation* get_TransformationParent() const = 0;
virtual void AddTransformation(ITransformation& argTransformation) = 0;
virtual void RemoveTransformation(ITransformation& argTransformation) = 0;
virtual const std::vector<ITransformation*>& get_Transformations() const = 0;
};

View File

@@ -0,0 +1,7 @@
#pragma once
struct __declspec(novtable) IUpdatable
{
virtual void Update(bool argForceUpdate) = 0;
virtual bool get_WantsUpdate() const = 0;
};

View File

@@ -0,0 +1,30 @@
#pragma once
struct ISwapChain;
struct __declspec(novtable) __declspec(uuid("{3ABA91B1-9B3E-4ae6-B5EA-EB24E77B6097}")) IWindow
{
virtual ~IWindow() {};
virtual void Initialize(const string16& argTitle, int argWidth, int argHeight, bool argFullscreen) = 0;
virtual LRESULT ProcessMessage(UINT argMessage, WPARAM argWParam, LPARAM argLParam) = 0;
virtual void SwapBuffers() = 0;
virtual void set_Active(bool argActive) = 0;
virtual bool get_Active() = 0;
virtual void set_Fullscreen(bool argFullscreen) = 0;
virtual bool get_Fullscreen() = 0;
virtual void set_VSync(bool argUseVSync) = 0;
virtual bool get_VSync() = 0;
virtual void set_DeviceContext(HDC argDeviceContext) = 0;
virtual HDC get_DeviceContext() = 0;
virtual void set_Title(const string16& argTitle) = 0;
virtual string16 get_Title() = 0;
virtual HWND get_Handle() = 0;
virtual ISwapChain& get_SwapChain() const = 0;
};

View File

@@ -0,0 +1,506 @@
#pragma once
struct DataFormatByteSize
{
enum Enumeration
{
Unknown = 0,
R32G32B32A32_Typeless = 16,
R32G32B32A32_Float = 16,
R32G32B32A32_UnsignedInteger = 16,
R32G32B32A32_SignedInteger = 16,
R32G32B32_Typeless = 12,
R32G32B32_Float = 12,
R32G32B32_UnsignedInteger = 12,
R32G32B32_SignedInteger = 12,
R16G16B16A16_Typeless = 8,
R16G16B16A16_Float = 8,
R16G16B16A16_UnsignedNormalized = 8,
R16G16B16A16_UnsignedInteger = 8,
R16G16B16A16_SignedNormalized = 8,
R16G16B16A16_SignedInteger = 8,
R32G32_Typeless = 8,
R32G32_Float = 8,
R32G32_UnsignedInteger = 8,
R32G32_SignedInteger = 8,
R32G8X24_Typeless = 8,
D32_Float_S8X24_UnsignedInteger = 8,
R32_Float_X8X24_Typeless = 8,
X32_Typeless_G8X24_UnsignedInteger = 8,
R10G10B10A2_Typeless = 4,
R10G10B10A2_UnsignedNormalized = 4,
R10G10B10A2_UnsignedInteger = 4,
R11G11B10_Float = 4,
R8G8B8A8_Typeless = 4,
R8G8B8A8_UnsignedNormalized = 4,
R8G8B8A8_UnsignedNormalized_SRGB = 4,
R8G8B8A8_UnsignedInteger = 4,
R8G8B8A8_SignedNormalized = 4,
R8G8B8A8_SignedInteger = 4,
R16G16_Typeless = 4,
R16G16_Float = 4,
R16G16_UnsignedNormalized = 4,
R16G16_UnsignedInteger = 4,
R16G16_SignedNormalized = 4,
R16G16_SignedInteger = 4,
R32_Typeless = 4,
D32_Float = 4,
R32_Float = 4,
R32_UnsignedInteger = 4,
R32_SignedInteger = 4,
R24G8_Typeless = 4,
D24_UnsignedNormalized_S8_UnsignedInteger = 4,
R24_UnsignedNormalized_X8_Typeless = 4,
X24_Typeless_G8_UnsignedInteger = 4,
R8G8_Typeless = 2,
R8G8_UnsignedNormalized = 2,
R8G8_UnsignedInteger = 2,
R8G8_SignedNormalized = 2,
R8G8_SignedInteger = 2,
R16_Typeless = 2,
R16_Float = 2,
D16_UnsignedNormalized = 2,
R16_UnsignedNormalized = 2,
R16_UnsignedInteger = 2,
R16_SignedNormalized = 2,
R16_SignedInteger = 2,
R8_Typeless = 1,
R8_UnsignedNormalized = 1,
R8_UnsignedInteger = 1,
R8_SignedNormalized = 1,
R8_SignedInteger = 1,
A8_UnsignedNormalized = 1,
R1_UnsignedNormalized = 1,
R9G9B9E5_SHAREDEXP = 4,
R8G8_B8G8_UnsignedNormalized = 4,
G8R8_G8B8_UnsignedNormalized = 4,
BC1_Typeless = 2,
BC1_UnsignedNormalized = 2,
BC1_UnsignedNormalized_SRGB = 2,
BC2_Typeless = 3,
BC2_UnsignedNormalized = 3,
BC2_UnsignedNormalized_SRGB = 3,
BC3_Typeless = 4,
BC3_UnsignedNormalized = 4,
BC3_UnsignedNormalized_SRGB = 4,
BC4_Typeless = 1,
BC4_UnsignedNormalized = 1,
BC4_SignedNormalized = 1,
BC5_Typeless = 2,
BC5_UnsignedNormalized = 2,
BC5_SignedNormalized = 2,
B5G6R5_UnsignedNormalized = 2,
B5G5R5A1_UnsignedNormalized = 2,
B8G8R8A8_UnsignedNormalized = 4,
B8G8R8X8_UnsignedNormalized = 4
};
};
struct DataFormat
{
enum Enumeration
{
Unknown = 0,
R32G32B32A32_Typeless = 1,
R32G32B32A32_Float = 2,
R32G32B32A32_UnsignedInteger = 3,
R32G32B32A32_SignedInteger = 4,
R32G32B32_Typeless = 5,
R32G32B32_Float = 6,
R32G32B32_UnsignedInteger = 7,
R32G32B32_SignedInteger = 8,
R16G16B16A16_Typeless = 9,
R16G16B16A16_Float = 10,
R16G16B16A16_UnsignedNormalized = 11,
R16G16B16A16_UnsignedInteger = 12,
R16G16B16A16_SignedNormalized = 13,
R16G16B16A16_SignedInteger = 14,
R32G32_Typeless = 15,
R32G32_Float = 16,
R32G32_UnsignedInteger = 17,
R32G32_SignedInteger = 18,
R32G8X24_Typeless = 19,
D32_Float_S8X24_UnsignedInteger = 20,
R32_Float_X8X24_Typeless = 21,
X32_Typeless_G8X24_UnsignedInteger = 22,
R10G10B10A2_Typeless = 23,
R10G10B10A2_UnsignedNormalized = 24,
R10G10B10A2_UnsignedInteger = 25,
R11G11B10_Float = 26,
R8G8B8A8_Typeless = 27,
R8G8B8A8_UnsignedNormalized = 28,
R8G8B8A8_UnsignedNormalized_SRGB = 29,
R8G8B8A8_UnsignedInteger = 30,
R8G8B8A8_SignedNormalized = 31,
R8G8B8A8_SignedInteger = 32,
R16G16_Typeless = 33,
R16G16_Float = 34,
R16G16_UnsignedNormalized = 35,
R16G16_UnsignedInteger = 36,
R16G16_SignedNormalized = 37,
R16G16_SignedInteger = 38,
R32_Typeless = 39,
D32_Float = 40,
R32_Float = 41,
R32_UnsignedInteger = 42,
R32_SignedInteger = 43,
R24G8_Typeless = 44,
D24_UnsignedNormalized_S8_UnsignedInteger = 45,
R24_UnsignedNormalized_X8_Typeless = 46,
X24_Typeless_G8_UnsignedInteger = 47,
R8G8_Typeless = 48,
R8G8_UnsignedNormalized = 49,
R8G8_UnsignedInteger = 50,
R8G8_SignedNormalized = 51,
R8G8_SignedInteger = 52,
R16_Typeless = 53,
R16_Float = 54,
D16_UnsignedNormalized = 55,
R16_UnsignedNormalized = 56,
R16_UnsignedInteger = 57,
R16_SignedNormalized = 58,
R16_SignedInteger = 59,
R8_Typeless = 60,
R8_UnsignedNormalized = 61,
R8_UnsignedInteger = 62,
R8_SignedNormalized = 63,
R8_SignedInteger = 64,
A8_UnsignedNormalized = 65,
R1_UnsignedNormalized = 66,
R9G9B9E5_SHAREDEXP = 67,
R8G8_B8G8_UnsignedNormalized = 68,
G8R8_G8B8_UnsignedNormalized = 69,
BC1_Typeless = 70,
BC1_UnsignedNormalized = 71,
BC1_UnsignedNormalized_SRGB = 72,
BC2_Typeless = 73,
BC2_UnsignedNormalized = 74,
BC2_UnsignedNormalized_SRGB = 75,
BC3_Typeless = 76,
BC3_UnsignedNormalized = 77,
BC3_UnsignedNormalized_SRGB = 78,
BC4_Typeless = 79,
BC4_UnsignedNormalized = 80,
BC4_SignedNormalized = 81,
BC5_Typeless = 82,
BC5_UnsignedNormalized = 83,
BC5_SignedNormalized = 84,
B5G6R5_UnsignedNormalized = 85,
B5G5R5A1_UnsignedNormalized = 86,
B8G8R8A8_UnsignedNormalized = 87,
B8G8R8X8_UnsignedNormalized = 88
};
static DataFormatByteSize::Enumeration GetDataFormatByteSize(Enumeration argValue)
{
switch (argValue)
{
case Unknown: return DataFormatByteSize::Unknown;
case R32G32B32A32_Typeless: return DataFormatByteSize::R32G32B32A32_Typeless;
case R32G32B32A32_Float: return DataFormatByteSize::R32G32B32A32_Float;
case R32G32B32A32_UnsignedInteger: return DataFormatByteSize::R32G32B32A32_UnsignedInteger;
case R32G32B32A32_SignedInteger: return DataFormatByteSize::R32G32B32A32_SignedInteger;
case R32G32B32_Typeless: return DataFormatByteSize::R32G32B32_Typeless;
case R32G32B32_Float: return DataFormatByteSize::R32G32B32_Float;
case R32G32B32_UnsignedInteger: return DataFormatByteSize::R32G32B32_UnsignedInteger;
case R32G32B32_SignedInteger: return DataFormatByteSize::R32G32B32_SignedInteger;
case R16G16B16A16_Typeless: return DataFormatByteSize::R16G16B16A16_Typeless;
case R16G16B16A16_Float: return DataFormatByteSize::R16G16B16A16_Float;
case R16G16B16A16_UnsignedNormalized: return DataFormatByteSize::R16G16B16A16_UnsignedNormalized;
case R16G16B16A16_UnsignedInteger: return DataFormatByteSize::R16G16B16A16_UnsignedInteger;
case R16G16B16A16_SignedNormalized: return DataFormatByteSize::R16G16B16A16_SignedNormalized;
case R16G16B16A16_SignedInteger: return DataFormatByteSize::R16G16B16A16_SignedInteger;
case R32G32_Typeless: return DataFormatByteSize::R32G32_Typeless;
case R32G32_Float: return DataFormatByteSize::R32G32_Float;
case R32G32_UnsignedInteger: return DataFormatByteSize::R32G32_UnsignedInteger;
case R32G32_SignedInteger: return DataFormatByteSize::R32G32_SignedInteger;
case R32G8X24_Typeless: return DataFormatByteSize::R32G8X24_Typeless;
case D32_Float_S8X24_UnsignedInteger: return DataFormatByteSize::D32_Float_S8X24_UnsignedInteger;
case R32_Float_X8X24_Typeless: return DataFormatByteSize::R32_Float_X8X24_Typeless;
case X32_Typeless_G8X24_UnsignedInteger: return DataFormatByteSize::X32_Typeless_G8X24_UnsignedInteger;
case R10G10B10A2_Typeless: return DataFormatByteSize::R10G10B10A2_Typeless;
case R10G10B10A2_UnsignedNormalized: return DataFormatByteSize::R10G10B10A2_UnsignedNormalized;
case R10G10B10A2_UnsignedInteger: return DataFormatByteSize::R10G10B10A2_UnsignedInteger;
case R11G11B10_Float: return DataFormatByteSize::R11G11B10_Float;
case R8G8B8A8_Typeless: return DataFormatByteSize::R8G8B8A8_Typeless;
case R8G8B8A8_UnsignedNormalized: return DataFormatByteSize::R8G8B8A8_UnsignedNormalized;
case R8G8B8A8_UnsignedNormalized_SRGB: return DataFormatByteSize::R8G8B8A8_UnsignedNormalized_SRGB;
case R8G8B8A8_UnsignedInteger: return DataFormatByteSize::R8G8B8A8_UnsignedInteger;
case R8G8B8A8_SignedNormalized: return DataFormatByteSize::R8G8B8A8_SignedNormalized;
case R8G8B8A8_SignedInteger: return DataFormatByteSize::R8G8B8A8_SignedInteger;
case R16G16_Typeless: return DataFormatByteSize::R16G16_Typeless;
case R16G16_Float: return DataFormatByteSize::R16G16_Float;
case R16G16_UnsignedNormalized: return DataFormatByteSize::R16G16_UnsignedNormalized;
case R16G16_UnsignedInteger: return DataFormatByteSize::R16G16_UnsignedInteger;
case R16G16_SignedNormalized: return DataFormatByteSize::R16G16_SignedNormalized;
case R16G16_SignedInteger: return DataFormatByteSize::R16G16_SignedInteger;
case R32_Typeless: return DataFormatByteSize::R32_Typeless;
case D32_Float: return DataFormatByteSize::D32_Float;
case R32_Float: return DataFormatByteSize::R32_Float;
case R32_UnsignedInteger: return DataFormatByteSize::R32_UnsignedInteger;
case R32_SignedInteger: return DataFormatByteSize::R32_SignedInteger;
case R24G8_Typeless: return DataFormatByteSize::R24G8_Typeless;
case D24_UnsignedNormalized_S8_UnsignedInteger: return DataFormatByteSize::D24_UnsignedNormalized_S8_UnsignedInteger;
case R24_UnsignedNormalized_X8_Typeless: return DataFormatByteSize::R24_UnsignedNormalized_X8_Typeless;
case X24_Typeless_G8_UnsignedInteger: return DataFormatByteSize::X24_Typeless_G8_UnsignedInteger;
case R8G8_Typeless: return DataFormatByteSize::R8G8_Typeless;
case R8G8_UnsignedNormalized: return DataFormatByteSize::R8G8_UnsignedNormalized;
case R8G8_UnsignedInteger: return DataFormatByteSize::R8G8_UnsignedInteger;
case R8G8_SignedNormalized: return DataFormatByteSize::R8G8_SignedNormalized;
case R8G8_SignedInteger: return DataFormatByteSize::R8G8_SignedInteger;
case R16_Typeless: return DataFormatByteSize::R16_Typeless;
case R16_Float: return DataFormatByteSize::R16_Float;
case D16_UnsignedNormalized: return DataFormatByteSize::D16_UnsignedNormalized;
case R16_UnsignedNormalized: return DataFormatByteSize::R16_UnsignedNormalized;
case R16_UnsignedInteger: return DataFormatByteSize::R16_UnsignedInteger;
case R16_SignedNormalized: return DataFormatByteSize::R16_SignedNormalized;
case R16_SignedInteger: return DataFormatByteSize::R16_SignedInteger;
case R8_Typeless: return DataFormatByteSize::R8_Typeless;
case R8_UnsignedNormalized: return DataFormatByteSize::R8_UnsignedNormalized;
case R8_UnsignedInteger: return DataFormatByteSize::R8_UnsignedInteger;
case R8_SignedNormalized: return DataFormatByteSize::R8_SignedNormalized;
case R8_SignedInteger: return DataFormatByteSize::R8_SignedInteger;
case A8_UnsignedNormalized: return DataFormatByteSize::A8_UnsignedNormalized;
case R1_UnsignedNormalized: return DataFormatByteSize::R1_UnsignedNormalized;
case R9G9B9E5_SHAREDEXP: return DataFormatByteSize::R9G9B9E5_SHAREDEXP;
case R8G8_B8G8_UnsignedNormalized: return DataFormatByteSize::R8G8_B8G8_UnsignedNormalized;
case G8R8_G8B8_UnsignedNormalized: return DataFormatByteSize::G8R8_G8B8_UnsignedNormalized;
case BC1_Typeless: return DataFormatByteSize::BC1_Typeless;
case BC1_UnsignedNormalized: return DataFormatByteSize::BC1_UnsignedNormalized;
case BC1_UnsignedNormalized_SRGB: return DataFormatByteSize::BC1_UnsignedNormalized_SRGB;
case BC2_Typeless: return DataFormatByteSize::BC2_Typeless;
case BC2_UnsignedNormalized: return DataFormatByteSize::BC2_UnsignedNormalized;
case BC2_UnsignedNormalized_SRGB: return DataFormatByteSize::BC2_UnsignedNormalized_SRGB;
case BC3_Typeless: return DataFormatByteSize::BC3_Typeless;
case BC3_UnsignedNormalized: return DataFormatByteSize::BC3_UnsignedNormalized;
case BC3_UnsignedNormalized_SRGB: return DataFormatByteSize::BC3_UnsignedNormalized_SRGB;
case BC4_Typeless: return DataFormatByteSize::BC4_Typeless;
case BC4_UnsignedNormalized: return DataFormatByteSize::BC4_UnsignedNormalized;
case BC4_SignedNormalized: return DataFormatByteSize::BC4_SignedNormalized;
case BC5_Typeless: return DataFormatByteSize::BC5_Typeless;
case BC5_UnsignedNormalized: return DataFormatByteSize::BC5_UnsignedNormalized;
case BC5_SignedNormalized: return DataFormatByteSize::BC5_SignedNormalized;
case B5G6R5_UnsignedNormalized: return DataFormatByteSize::B5G6R5_UnsignedNormalized;
case B5G5R5A1_UnsignedNormalized: return DataFormatByteSize::B5G5R5A1_UnsignedNormalized;
case B8G8R8A8_UnsignedNormalized: return DataFormatByteSize::B8G8R8A8_UnsignedNormalized;
case B8G8R8X8_UnsignedNormalized: return DataFormatByteSize::B8G8R8X8_UnsignedNormalized;
default: return DataFormatByteSize::Unknown;
}
}
static Enumeration Parse(string8 argValue)
{
if (argValue == "R32G32B32A32_Typeless") return R32G32B32A32_Typeless;
else if (argValue == "R32G32B32A32_Float") return R32G32B32A32_Float;
else if (argValue == "R32G32B32A32_UnsignedInteger") return R32G32B32A32_UnsignedInteger;
else if (argValue == "R32G32B32A32_SignedInteger") return R32G32B32A32_SignedInteger;
else if (argValue == "R32G32B32_Typeless") return R32G32B32_Typeless;
else if (argValue == "R32G32B32_Float") return R32G32B32_Float;
else if (argValue == "R32G32B32_UnsignedInteger") return R32G32B32_UnsignedInteger;
else if (argValue == "R32G32B32_SignedInteger") return R32G32B32_SignedInteger;
else if (argValue == "R16G16B16A16_Typeless") return R16G16B16A16_Typeless;
else if (argValue == "R16G16B16A16_Float") return R16G16B16A16_Float;
else if (argValue == "R16G16B16A16_UnsignedNormalized") return R16G16B16A16_UnsignedNormalized;
else if (argValue == "R16G16B16A16_UnsignedInteger") return R16G16B16A16_UnsignedInteger;
else if (argValue == "R16G16B16A16_SignedNormalized") return R16G16B16A16_SignedNormalized;
else if (argValue == "R16G16B16A16_SignedInteger") return R16G16B16A16_SignedInteger;
else if (argValue == "R32G32_Typeless") return R32G32_Typeless;
else if (argValue == "R32G32_Float") return R32G32_Float;
else if (argValue == "R32G32_UnsignedInteger") return R32G32_UnsignedInteger;
else if (argValue == "R32G32_SignedInteger") return R32G32_SignedInteger;
else if (argValue == "R32G8X24_Typeless") return R32G8X24_Typeless;
else if (argValue == "D32_Float_S8X24_UnsignedInteger") return D32_Float_S8X24_UnsignedInteger;
else if (argValue == "R32_Float_X8X24_Typeless") return R32_Float_X8X24_Typeless;
else if (argValue == "X32_Typeless_G8X24_UnsignedInteger") return X32_Typeless_G8X24_UnsignedInteger;
else if (argValue == "R10G10B10A2_Typeless") return R10G10B10A2_Typeless;
else if (argValue == "R10G10B10A2_UnsignedNormalized") return R10G10B10A2_UnsignedNormalized;
else if (argValue == "R10G10B10A2_UnsignedInteger") return R10G10B10A2_UnsignedInteger;
else if (argValue == "R11G11B10_Float") return R11G11B10_Float;
else if (argValue == "R8G8B8A8_Typeless") return R8G8B8A8_Typeless;
else if (argValue == "R8G8B8A8_UnsignedNormalized") return R8G8B8A8_UnsignedNormalized;
else if (argValue == "R8G8B8A8_UnsignedNormalized_SRGB") return R8G8B8A8_UnsignedNormalized_SRGB;
else if (argValue == "R8G8B8A8_UnsignedInteger") return R8G8B8A8_UnsignedInteger;
else if (argValue == "R8G8B8A8_SignedNormalized") return R8G8B8A8_SignedNormalized;
else if (argValue == "R8G8B8A8_SignedInteger") return R8G8B8A8_SignedInteger;
else if (argValue == "R16G16_Typeless") return R16G16_Typeless;
else if (argValue == "R16G16_Float") return R16G16_Float;
else if (argValue == "R16G16_UnsignedNormalized") return R16G16_UnsignedNormalized;
else if (argValue == "R16G16_UnsignedInteger") return R16G16_UnsignedInteger;
else if (argValue == "R16G16_SignedNormalized") return R16G16_SignedNormalized;
else if (argValue == "R16G16_SignedInteger") return R16G16_SignedInteger;
else if (argValue == "R32_Typeless") return R32_Typeless;
else if (argValue == "D32_Float") return D32_Float;
else if (argValue == "R32_Float") return R32_Float;
else if (argValue == "R32_UnsignedInteger") return R32_UnsignedInteger;
else if (argValue == "R32_SignedInteger") return R32_SignedInteger;
else if (argValue == "R24G8_Typeless") return R24G8_Typeless;
else if (argValue == "D24_UnsignedNormalized_S8_UnsignedInteger") return D24_UnsignedNormalized_S8_UnsignedInteger;
else if (argValue == "R24_UnsignedNormalized_X8_Typeless") return R24_UnsignedNormalized_X8_Typeless;
else if (argValue == "X24_Typeless_G8_UnsignedInteger") return X24_Typeless_G8_UnsignedInteger;
else if (argValue == "R8G8_Typeless") return R8G8_Typeless;
else if (argValue == "R8G8_UnsignedNormalized") return R8G8_UnsignedNormalized;
else if (argValue == "R8G8_UnsignedInteger") return R8G8_UnsignedInteger;
else if (argValue == "R8G8_SignedNormalized") return R8G8_SignedNormalized;
else if (argValue == "R8G8_SignedInteger") return R8G8_SignedInteger;
else if (argValue == "R16_Typeless") return R16_Typeless;
else if (argValue == "R16_Float") return R16_Float;
else if (argValue == "D16_UnsignedNormalized") return D16_UnsignedNormalized;
else if (argValue == "R16_UnsignedNormalized") return R16_UnsignedNormalized;
else if (argValue == "R16_UnsignedInteger") return R16_UnsignedInteger;
else if (argValue == "R16_SignedNormalized") return R16_SignedNormalized;
else if (argValue == "R16_SignedInteger") return R16_SignedInteger;
else if (argValue == "R8_Typeless") return R8_Typeless;
else if (argValue == "R8_UnsignedNormalized") return R8_UnsignedNormalized;
else if (argValue == "R8_UnsignedInteger") return R8_UnsignedInteger;
else if (argValue == "R8_SignedNormalized") return R8_SignedNormalized;
else if (argValue == "R8_SignedInteger") return R8_SignedInteger;
else if (argValue == "A8_UnsignedNormalized") return A8_UnsignedNormalized;
else if (argValue == "R1_UnsignedNormalized") return R1_UnsignedNormalized;
else if (argValue == "R9G9B9E5_SHAREDEXP") return R9G9B9E5_SHAREDEXP;
else if (argValue == "R8G8_B8G8_UnsignedNormalized") return R8G8_B8G8_UnsignedNormalized;
else if (argValue == "G8R8_G8B8_UnsignedNormalized") return G8R8_G8B8_UnsignedNormalized;
else if (argValue == "BC1_Typeless") return BC1_Typeless;
else if (argValue == "BC1_UnsignedNormalized") return BC1_UnsignedNormalized;
else if (argValue == "BC1_UnsignedNormalized_SRGB") return BC1_UnsignedNormalized_SRGB;
else if (argValue == "BC2_Typeless") return BC2_Typeless;
else if (argValue == "BC2_UnsignedNormalized") return BC2_UnsignedNormalized;
else if (argValue == "BC2_UnsignedNormalized_SRGB") return BC2_UnsignedNormalized_SRGB;
else if (argValue == "BC3_Typeless") return BC3_Typeless;
else if (argValue == "BC3_UnsignedNormalized") return BC3_UnsignedNormalized;
else if (argValue == "BC3_UnsignedNormalized_SRGB") return BC3_UnsignedNormalized_SRGB;
else if (argValue == "BC4_Typeless") return BC4_Typeless;
else if (argValue == "BC4_UnsignedNormalized") return BC4_UnsignedNormalized;
else if (argValue == "BC4_SignedNormalized") return BC4_SignedNormalized;
else if (argValue == "BC5_Typeless") return BC5_Typeless;
else if (argValue == "BC5_UnsignedNormalized") return BC5_UnsignedNormalized;
else if (argValue == "BC5_SignedNormalized") return BC5_SignedNormalized;
else if (argValue == "B5G6R5_UnsignedNormalized") return B5G6R5_UnsignedNormalized;
else if (argValue == "B5G5R5A1_UnsignedNormalized") return B5G5R5A1_UnsignedNormalized;
else if (argValue == "B8G8R8A8_UnsignedNormalized") return B8G8R8A8_UnsignedNormalized;
else if (argValue == "B8G8R8X8_UnsignedNormalized") return B8G8R8X8_UnsignedNormalized;
else return Unknown;
}
// {^.*case}:b{<.*}:b[=].*
// \1 \2: return "\2";
static string8 ToString(Enumeration argValue)
{
switch (argValue)
{
case Unknown: return "Unknown";
case R32G32B32A32_Typeless: return "R32G32B32A32_Typeless";
case R32G32B32A32_Float: return "R32G32B32A32_Float";
case R32G32B32A32_UnsignedInteger: return "R32G32B32A32_UnsignedInteger";
case R32G32B32A32_SignedInteger: return "R32G32B32A32_SignedInteger";
case R32G32B32_Typeless: return "R32G32B32_Typeless";
case R32G32B32_Float: return "R32G32B32_Float";
case R32G32B32_UnsignedInteger: return "R32G32B32_UnsignedInteger";
case R32G32B32_SignedInteger: return "R32G32B32_SignedInteger";
case R16G16B16A16_Typeless: return "R16G16B16A16_Typeless";
case R16G16B16A16_Float: return "R16G16B16A16_Float";
case R16G16B16A16_UnsignedNormalized: return "R16G16B16A16_UnsignedNormalized";
case R16G16B16A16_UnsignedInteger: return "R16G16B16A16_UnsignedInteger";
case R16G16B16A16_SignedNormalized: return "R16G16B16A16_SignedNormalized";
case R16G16B16A16_SignedInteger: return "R16G16B16A16_SignedInteger";
case R32G32_Typeless: return "R32G32_Typeless";
case R32G32_Float: return "R32G32_Float";
case R32G32_UnsignedInteger: return "R32G32_UnsignedInteger";
case R32G32_SignedInteger: return "R32G32_SignedInteger";
case R32G8X24_Typeless: return "R32G8X24_Typeless";
case D32_Float_S8X24_UnsignedInteger: return "D32_Float_S8X24_UnsignedInteger";
case R32_Float_X8X24_Typeless: return "R32_Float_X8X24_Typeless";
case X32_Typeless_G8X24_UnsignedInteger: return "X32_Typeless_G8X24_UnsignedInteger";
case R10G10B10A2_Typeless: return "R10G10B10A2_Typeless";
case R10G10B10A2_UnsignedNormalized: return "R10G10B10A2_UnsignedNormalized";
case R10G10B10A2_UnsignedInteger: return "R10G10B10A2_UnsignedInteger";
case R11G11B10_Float: return "R11G11B10_Float";
case R8G8B8A8_Typeless: return "R8G8B8A8_Typeless";
case R8G8B8A8_UnsignedNormalized: return "R8G8B8A8_UnsignedNormalized";
case R8G8B8A8_UnsignedNormalized_SRGB: return "R8G8B8A8_UnsignedNormalized_SRGB";
case R8G8B8A8_UnsignedInteger: return "R8G8B8A8_UnsignedInteger";
case R8G8B8A8_SignedNormalized: return "R8G8B8A8_SignedNormalized";
case R8G8B8A8_SignedInteger: return "R8G8B8A8_SignedInteger";
case R16G16_Typeless: return "R16G16_Typeless";
case R16G16_Float: return "R16G16_Float";
case R16G16_UnsignedNormalized: return "R16G16_UnsignedNormalized";
case R16G16_UnsignedInteger: return "R16G16_UnsignedInteger";
case R16G16_SignedNormalized: return "R16G16_SignedNormalized";
case R16G16_SignedInteger: return "R16G16_SignedInteger";
case R32_Typeless: return "R32_Typeless";
case D32_Float: return "D32_Float";
case R32_Float: return "R32_Float";
case R32_UnsignedInteger: return "R32_UnsignedInteger";
case R32_SignedInteger: return "R32_SignedInteger";
case R24G8_Typeless: return "R24G8_Typeless";
case D24_UnsignedNormalized_S8_UnsignedInteger: return "D24_UnsignedNormalized_S8_UnsignedInteger";
case R24_UnsignedNormalized_X8_Typeless: return "R24_UnsignedNormalized_X8_Typeless";
case X24_Typeless_G8_UnsignedInteger: return "X24_Typeless_G8_UnsignedInteger";
case R8G8_Typeless: return "R8G8_Typeless";
case R8G8_UnsignedNormalized: return "R8G8_UnsignedNormalized";
case R8G8_UnsignedInteger: return "R8G8_UnsignedInteger";
case R8G8_SignedNormalized: return "R8G8_SignedNormalized";
case R8G8_SignedInteger: return "R8G8_SignedInteger";
case R16_Typeless: return "R16_Typeless";
case R16_Float: return "R16_Float";
case D16_UnsignedNormalized: return "D16_UnsignedNormalized";
case R16_UnsignedNormalized: return "R16_UnsignedNormalized";
case R16_UnsignedInteger: return "R16_UnsignedInteger";
case R16_SignedNormalized: return "R16_SignedNormalized";
case R16_SignedInteger: return "R16_SignedInteger";
case R8_Typeless: return "R8_Typeless";
case R8_UnsignedNormalized: return "R8_UnsignedNormalized";
case R8_UnsignedInteger: return "R8_UnsignedInteger";
case R8_SignedNormalized: return "R8_SignedNormalized";
case R8_SignedInteger: return "R8_SignedInteger";
case A8_UnsignedNormalized: return "A8_UnsignedNormalized";
case R1_UnsignedNormalized: return "R1_UnsignedNormalized";
case R9G9B9E5_SHAREDEXP: return "R9G9B9E5_SHAREDEXP";
case R8G8_B8G8_UnsignedNormalized: return "R8G8_B8G8_UnsignedNormalized";
case G8R8_G8B8_UnsignedNormalized: return "G8R8_G8B8_UnsignedNormalized";
case BC1_Typeless: return "BC1_Typeless";
case BC1_UnsignedNormalized: return "BC1_UnsignedNormalized";
case BC1_UnsignedNormalized_SRGB: return "BC1_UnsignedNormalized_SRGB";
case BC2_Typeless: return "BC2_Typeless";
case BC2_UnsignedNormalized: return "BC2_UnsignedNormalized";
case BC2_UnsignedNormalized_SRGB: return "BC2_UnsignedNormalized_SRGB";
case BC3_Typeless: return "BC3_Typeless";
case BC3_UnsignedNormalized: return "BC3_UnsignedNormalized";
case BC3_UnsignedNormalized_SRGB: return "BC3_UnsignedNormalized_SRGB";
case BC4_Typeless: return "BC4_Typeless";
case BC4_UnsignedNormalized: return "BC4_UnsignedNormalized";
case BC4_SignedNormalized: return "BC4_SignedNormalized";
case BC5_Typeless: return "BC5_Typeless";
case BC5_UnsignedNormalized: return "BC5_UnsignedNormalized";
case BC5_SignedNormalized: return "BC5_SignedNormalized";
case B5G6R5_UnsignedNormalized: return "B5G6R5_UnsignedNormalized";
case B5G5R5A1_UnsignedNormalized: return "B5G5R5A1_UnsignedNormalized";
case B8G8R8A8_UnsignedNormalized: return "B8G8R8A8_UnsignedNormalized";
case B8G8R8X8_UnsignedNormalized: return "B8G8R8X8_UnsignedNormalized";
default: return "Unknown";
}
}
};
struct DataAccessMode
{
enum Enumeration
{
Read = 1,
Write = 2,
ReadAndWrite = 3,
WriteAndDiscard = 4
};
};
struct DataAccessType
{
enum Enumeration
{
Static, // no CPU access
CpuReadOnly, // Resource is only readable and cannot be used by the GPU for rendering purposes
Dynamic // Resource may change every frame
};
};

View File

@@ -0,0 +1,45 @@
#pragma once
struct KeyFrameTarget
{
enum Enumeration
{
Position,
Rotation,
Scale
};
};
struct KeyFrame
{
KeyFrame()
: m_Target(KeyFrameTarget::Position)
, m_Time(0.0f)
{}
KeyFrame(KeyFrameTarget::Enumeration argTarget, const D3DXVECTOR3& argValue, float argTime)
: m_Target(argTarget)
, m_Value(argValue)
, m_Time(argTime)
{}
KeyFrameTarget::Enumeration m_Target;
D3DXVECTOR3 m_Value;
float m_Time;
};
struct __declspec(novtable) ITransformationAnimation
{
virtual ~ITransformationAnimation() {};
//virtual std::wstring get_Name() const = 0;
virtual void AddKeyFrame(const KeyFrame& argKeyFrame) = 0;
virtual float get_Duration() const = 0;
virtual D3DXMATRIX GetTransformationAtTime(float argT) = 0; // [0.0] - [1.0]
};