Skip to content

Commit

Permalink
Minor code review
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Jan 6, 2020
1 parent 0796dcd commit eb4f3c0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Inc/Model.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace DirectX
std::shared_ptr<std::vector<D3D11_INPUT_ELEMENT_DESC>> vbDecl;
bool isAlpha;

typedef std::vector<std::unique_ptr<ModelMeshPart>> Collection;
using Collection = std::vector<std::unique_ptr<ModelMeshPart>>;

// Draw mesh part with custom effect
void __cdecl Draw(_In_ ID3D11DeviceContext* deviceContext, _In_ IEffect* ieffect, _In_ ID3D11InputLayout* iinputLayout,
Expand Down Expand Up @@ -91,7 +91,7 @@ namespace DirectX
bool ccw;
bool pmalpha;

typedef std::vector<std::shared_ptr<ModelMesh>> Collection;
using Collection = std::vector<std::shared_ptr<ModelMesh>>;

// Setup states for drawing mesh
void __cdecl PrepareForRendering(_In_ ID3D11DeviceContext* deviceContext, const CommonStates& states, bool alpha = false, bool wireframe = false) const;
Expand All @@ -116,7 +116,7 @@ namespace DirectX
void XM_CALLCONV Draw(_In_ ID3D11DeviceContext* deviceContext, const CommonStates& states, FXMMATRIX world, CXMMATRIX view, CXMMATRIX projection,
bool wireframe = false, _In_opt_ std::function<void __cdecl()> setCustomState = nullptr) const;

// Notify model that effects, parts list, or mesh list has changed
// Notify model that effects, parts list, or mesh list has changed
void __cdecl Modified() noexcept { mEffectCache.clear(); }

// Update all effects used by the model
Expand All @@ -128,13 +128,13 @@ namespace DirectX
static std::unique_ptr<Model> __cdecl CreateFromCMO(_In_ ID3D11Device* d3dDevice, _In_z_ const wchar_t* szFileName,
_In_ IEffectFactory& fxFactory, bool ccw = true, bool pmalpha = false);

// Loads a model from a DirectX SDK .SDKMESH file
// Loads a model from a DirectX SDK .SDKMESH file
static std::unique_ptr<Model> __cdecl CreateFromSDKMESH(_In_ ID3D11Device* d3dDevice, _In_reads_bytes_(dataSize) const uint8_t* meshData, _In_ size_t dataSize,
_In_ IEffectFactory& fxFactory, bool ccw = false, bool pmalpha = false);
static std::unique_ptr<Model> __cdecl CreateFromSDKMESH(_In_ ID3D11Device* d3dDevice, _In_z_ const wchar_t* szFileName,
_In_ IEffectFactory& fxFactory, bool ccw = false, bool pmalpha = false);

// Loads a model from a .VBO file
// Loads a model from a .VBO file
static std::unique_ptr<Model> __cdecl CreateFromVBO(_In_ ID3D11Device* d3dDevice, _In_reads_bytes_(dataSize) const uint8_t* meshData, _In_ size_t dataSize,
_In_opt_ std::shared_ptr<IEffect> ieffect = nullptr, bool ccw = false, bool pmalpha = false);
static std::unique_ptr<Model> __cdecl CreateFromVBO(_In_ ID3D11Device* d3dDevice, _In_z_ const wchar_t* szFileName,
Expand Down

0 comments on commit eb4f3c0

Please sign in to comment.