Browse Source

RenderPath: unsigned to signed

Related: https://github.com/urho3d/Urho3D/issues/2940
1vanK 3 years ago
parent
commit
5702384e34

+ 27 - 27
Source/Urho3D/AngelScript/Generated_Members.h

@@ -4022,17 +4022,17 @@ template <class T> void RegisterMembers_RenderPathCommand(asIScriptEngine* engin
     engine->RegisterObjectMethod(className, "const String& GetDepthStencilName() const", AS_METHODPR(T, GetDepthStencilName, () const, const String&), AS_CALL_THISCALL);
     engine->RegisterObjectMethod(className, "const String& GetDepthStencilName() const", AS_METHODPR(T, GetDepthStencilName, () const, const String&), AS_CALL_THISCALL);
     engine->RegisterObjectMethod(className, "const String& get_depthStencilName() const", AS_METHODPR(T, GetDepthStencilName, () const, const String&), AS_CALL_THISCALL);
     engine->RegisterObjectMethod(className, "const String& get_depthStencilName() const", AS_METHODPR(T, GetDepthStencilName, () const, const String&), AS_CALL_THISCALL);
 
 
-    // unsigned RenderPathCommand::GetNumOutputs() const
-    engine->RegisterObjectMethod(className, "uint GetNumOutputs() const", AS_METHODPR(T, GetNumOutputs, () const, unsigned), AS_CALL_THISCALL);
-    engine->RegisterObjectMethod(className, "uint get_numOutputs() const", AS_METHODPR(T, GetNumOutputs, () const, unsigned), AS_CALL_THISCALL);
+    // i32 RenderPathCommand::GetNumOutputs() const
+    engine->RegisterObjectMethod(className, "int GetNumOutputs() const", AS_METHODPR(T, GetNumOutputs, () const, i32), AS_CALL_THISCALL);
+    engine->RegisterObjectMethod(className, "int get_numOutputs() const", AS_METHODPR(T, GetNumOutputs, () const, i32), AS_CALL_THISCALL);
 
 
-    // CubeMapFace RenderPathCommand::GetOutputFace(unsigned index) const
-    engine->RegisterObjectMethod(className, "CubeMapFace GetOutputFace(uint) const", AS_METHODPR(T, GetOutputFace, (unsigned) const, CubeMapFace), AS_CALL_THISCALL);
-    engine->RegisterObjectMethod(className, "CubeMapFace get_outputFaces(uint) const", AS_METHODPR(T, GetOutputFace, (unsigned) const, CubeMapFace), AS_CALL_THISCALL);
+    // CubeMapFace RenderPathCommand::GetOutputFace(i32 index) const
+    engine->RegisterObjectMethod(className, "CubeMapFace GetOutputFace(int) const", AS_METHODPR(T, GetOutputFace, (i32) const, CubeMapFace), AS_CALL_THISCALL);
+    engine->RegisterObjectMethod(className, "CubeMapFace get_outputFaces(int) const", AS_METHODPR(T, GetOutputFace, (i32) const, CubeMapFace), AS_CALL_THISCALL);
 
 
-    // const String& RenderPathCommand::GetOutputName(unsigned index) const
-    engine->RegisterObjectMethod(className, "const String& GetOutputName(uint) const", AS_METHODPR(T, GetOutputName, (unsigned) const, const String&), AS_CALL_THISCALL);
-    engine->RegisterObjectMethod(className, "const String& get_outputNames(uint) const", AS_METHODPR(T, GetOutputName, (unsigned) const, const String&), AS_CALL_THISCALL);
+    // const String& RenderPathCommand::GetOutputName(i32 index) const
+    engine->RegisterObjectMethod(className, "const String& GetOutputName(int) const", AS_METHODPR(T, GetOutputName, (i32) const, const String&), AS_CALL_THISCALL);
+    engine->RegisterObjectMethod(className, "const String& get_outputNames(int) const", AS_METHODPR(T, GetOutputName, (i32) const, const String&), AS_CALL_THISCALL);
 
 
     // const Variant& RenderPathCommand::GetShaderParameter(const String& name) const
     // const Variant& RenderPathCommand::GetShaderParameter(const String& name) const
     engine->RegisterObjectMethod(className, "const Variant& GetShaderParameter(const String&in) const", AS_METHODPR(T, GetShaderParameter, (const String&) const, const Variant&), AS_CALL_THISCALL);
     engine->RegisterObjectMethod(className, "const Variant& GetShaderParameter(const String&in) const", AS_METHODPR(T, GetShaderParameter, (const String&) const, const Variant&), AS_CALL_THISCALL);
@@ -4052,20 +4052,20 @@ template <class T> void RegisterMembers_RenderPathCommand(asIScriptEngine* engin
     engine->RegisterObjectMethod(className, "void SetDepthStencilName(const String&in)", AS_METHODPR(T, SetDepthStencilName, (const String&), void), AS_CALL_THISCALL);
     engine->RegisterObjectMethod(className, "void SetDepthStencilName(const String&in)", AS_METHODPR(T, SetDepthStencilName, (const String&), void), AS_CALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_depthStencilName(const String&in)", AS_METHODPR(T, SetDepthStencilName, (const String&), void), AS_CALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_depthStencilName(const String&in)", AS_METHODPR(T, SetDepthStencilName, (const String&), void), AS_CALL_THISCALL);
 
 
-    // void RenderPathCommand::SetNumOutputs(unsigned num)
-    engine->RegisterObjectMethod(className, "void SetNumOutputs(uint)", AS_METHODPR(T, SetNumOutputs, (unsigned), void), AS_CALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void set_numOutputs(uint)", AS_METHODPR(T, SetNumOutputs, (unsigned), void), AS_CALL_THISCALL);
+    // void RenderPathCommand::SetNumOutputs(i32 num)
+    engine->RegisterObjectMethod(className, "void SetNumOutputs(int)", AS_METHODPR(T, SetNumOutputs, (i32), void), AS_CALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void set_numOutputs(int)", AS_METHODPR(T, SetNumOutputs, (i32), void), AS_CALL_THISCALL);
 
 
-    // void RenderPathCommand::SetOutput(unsigned index, const String& name, CubeMapFace face = FACE_POSITIVE_X)
-    engine->RegisterObjectMethod(className, "void SetOutput(uint, const String&in, CubeMapFace = FACE_POSITIVE_X)", AS_METHODPR(T, SetOutput, (unsigned, const String&, CubeMapFace), void), AS_CALL_THISCALL);
+    // void RenderPathCommand::SetOutput(i32 index, const String& name, CubeMapFace face = FACE_POSITIVE_X)
+    engine->RegisterObjectMethod(className, "void SetOutput(int, const String&in, CubeMapFace = FACE_POSITIVE_X)", AS_METHODPR(T, SetOutput, (i32, const String&, CubeMapFace), void), AS_CALL_THISCALL);
 
 
-    // void RenderPathCommand::SetOutputFace(unsigned index, CubeMapFace face)
-    engine->RegisterObjectMethod(className, "void SetOutputFace(uint, CubeMapFace)", AS_METHODPR(T, SetOutputFace, (unsigned, CubeMapFace), void), AS_CALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void set_outputFaces(uint, CubeMapFace)", AS_METHODPR(T, SetOutputFace, (unsigned, CubeMapFace), void), AS_CALL_THISCALL);
+    // void RenderPathCommand::SetOutputFace(i32 index, CubeMapFace face)
+    engine->RegisterObjectMethod(className, "void SetOutputFace(int, CubeMapFace)", AS_METHODPR(T, SetOutputFace, (i32, CubeMapFace), void), AS_CALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void set_outputFaces(int, CubeMapFace)", AS_METHODPR(T, SetOutputFace, (i32, CubeMapFace), void), AS_CALL_THISCALL);
 
 
-    // void RenderPathCommand::SetOutputName(unsigned index, const String& name)
-    engine->RegisterObjectMethod(className, "void SetOutputName(uint, const String&in)", AS_METHODPR(T, SetOutputName, (unsigned, const String&), void), AS_CALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void set_outputNames(uint, const String&in)", AS_METHODPR(T, SetOutputName, (unsigned, const String&), void), AS_CALL_THISCALL);
+    // void RenderPathCommand::SetOutputName(i32 index, const String& name)
+    engine->RegisterObjectMethod(className, "void SetOutputName(int, const String&in)", AS_METHODPR(T, SetOutputName, (i32, const String&), void), AS_CALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void set_outputNames(int, const String&in)", AS_METHODPR(T, SetOutputName, (i32, const String&), void), AS_CALL_THISCALL);
 
 
     // void RenderPathCommand::SetShaderParameter(const String& name, const Variant& value)
     // void RenderPathCommand::SetShaderParameter(const String& name, const Variant& value)
     engine->RegisterObjectMethod(className, "void SetShaderParameter(const String&in, const Variant&in)", AS_METHODPR(T, SetShaderParameter, (const String&, const Variant&), void), AS_CALL_THISCALL);
     engine->RegisterObjectMethod(className, "void SetShaderParameter(const String&in, const Variant&in)", AS_METHODPR(T, SetShaderParameter, (const String&, const Variant&), void), AS_CALL_THISCALL);
@@ -8383,7 +8383,7 @@ template <class T> void RegisterMembers_RenderPath(asIScriptEngine* engine, cons
 {
 {
     RegisterMembers_RefCounted<T>(engine, className);
     RegisterMembers_RefCounted<T>(engine, className);
 
 
-    // RenderPathCommand* RenderPath::GetCommand(unsigned index)
+    // RenderPathCommand* RenderPath::GetCommand(i32 index)
     // Error: type "RenderPathCommand*" can not automatically bind
     // Error: type "RenderPathCommand*" can not automatically bind
 
 
     // void RenderPath::AddCommand(const RenderPathCommand& command)
     // void RenderPath::AddCommand(const RenderPathCommand& command)
@@ -8398,13 +8398,13 @@ template <class T> void RegisterMembers_RenderPath(asIScriptEngine* engine, cons
     // SharedPtr<RenderPath> RenderPath::Clone()
     // SharedPtr<RenderPath> RenderPath::Clone()
     engine->RegisterObjectMethod(className, "RenderPath@+ Clone()", AS_FUNCTION_OBJFIRST(RenderPath_SharedPtrlesRenderPathgre_Clone_void_template<RenderPath>), AS_CALL_CDECL_OBJFIRST);
     engine->RegisterObjectMethod(className, "RenderPath@+ Clone()", AS_FUNCTION_OBJFIRST(RenderPath_SharedPtrlesRenderPathgre_Clone_void_template<RenderPath>), AS_CALL_CDECL_OBJFIRST);
 
 
-    // unsigned RenderPath::GetNumCommands() const
-    engine->RegisterObjectMethod(className, "uint GetNumCommands() const", AS_METHODPR(T, GetNumCommands, () const, unsigned), AS_CALL_THISCALL);
-    engine->RegisterObjectMethod(className, "uint get_numCommands() const", AS_METHODPR(T, GetNumCommands, () const, unsigned), AS_CALL_THISCALL);
+    // i32 RenderPath::GetNumCommands() const
+    engine->RegisterObjectMethod(className, "int GetNumCommands() const", AS_METHODPR(T, GetNumCommands, () const, i32), AS_CALL_THISCALL);
+    engine->RegisterObjectMethod(className, "int get_numCommands() const", AS_METHODPR(T, GetNumCommands, () const, i32), AS_CALL_THISCALL);
 
 
-    // unsigned RenderPath::GetNumRenderTargets() const
-    engine->RegisterObjectMethod(className, "uint GetNumRenderTargets() const", AS_METHODPR(T, GetNumRenderTargets, () const, unsigned), AS_CALL_THISCALL);
-    engine->RegisterObjectMethod(className, "uint get_numRenderTargets() const", AS_METHODPR(T, GetNumRenderTargets, () const, unsigned), AS_CALL_THISCALL);
+    // i32 RenderPath::GetNumRenderTargets() const
+    engine->RegisterObjectMethod(className, "int GetNumRenderTargets() const", AS_METHODPR(T, GetNumRenderTargets, () const, i32), AS_CALL_THISCALL);
+    engine->RegisterObjectMethod(className, "int get_numRenderTargets() const", AS_METHODPR(T, GetNumRenderTargets, () const, i32), AS_CALL_THISCALL);
 
 
     // const Variant& RenderPath::GetShaderParameter(const String& name) const
     // const Variant& RenderPath::GetShaderParameter(const String& name) const
     engine->RegisterObjectMethod(className, "const Variant& GetShaderParameter(const String&in) const", AS_METHODPR(T, GetShaderParameter, (const String&) const, const Variant&), AS_CALL_THISCALL);
     engine->RegisterObjectMethod(className, "const Variant& GetShaderParameter(const String&in) const", AS_METHODPR(T, GetShaderParameter, (const String&) const, const Variant&), AS_CALL_THISCALL);

+ 24 - 18
Source/Urho3D/Graphics/RenderPath.cpp

@@ -226,30 +226,34 @@ void RenderPathCommand::RemoveShaderParameter(const String& name)
     shaderParameters_.Erase(name);
     shaderParameters_.Erase(name);
 }
 }
 
 
-void RenderPathCommand::SetNumOutputs(unsigned num)
+void RenderPathCommand::SetNumOutputs(i32 num)
 {
 {
-    num = (unsigned)Clamp((int)num, 1, MAX_RENDERTARGETS);
+    assert(num >= 0);
+    num = Clamp(num, 1, MAX_RENDERTARGETS);
     outputs_.Resize(num);
     outputs_.Resize(num);
 }
 }
 
 
-void RenderPathCommand::SetOutput(unsigned index, const String& name, CubeMapFace face)
+void RenderPathCommand::SetOutput(i32 index, const String& name, CubeMapFace face)
 {
 {
+    assert(index >= 0);
     if (index < outputs_.Size())
     if (index < outputs_.Size())
         outputs_[index] = MakePair(name, face);
         outputs_[index] = MakePair(name, face);
     else if (index == outputs_.Size() && index < MAX_RENDERTARGETS)
     else if (index == outputs_.Size() && index < MAX_RENDERTARGETS)
         outputs_.Push(MakePair(name, face));
         outputs_.Push(MakePair(name, face));
 }
 }
 
 
-void RenderPathCommand::SetOutputName(unsigned index, const String& name)
+void RenderPathCommand::SetOutputName(i32 index, const String& name)
 {
 {
+    assert(index >= 0);
     if (index < outputs_.Size())
     if (index < outputs_.Size())
         outputs_[index].first_ = name;
         outputs_[index].first_ = name;
     else if (index == outputs_.Size() && index < MAX_RENDERTARGETS)
     else if (index == outputs_.Size() && index < MAX_RENDERTARGETS)
         outputs_.Push(MakePair(name, FACE_POSITIVE_X));
         outputs_.Push(MakePair(name, FACE_POSITIVE_X));
 }
 }
 
 
-void RenderPathCommand::SetOutputFace(unsigned index, CubeMapFace face)
+void RenderPathCommand::SetOutputFace(i32 index, CubeMapFace face)
 {
 {
+    assert(index >= 0);
     if (index < outputs_.Size())
     if (index < outputs_.Size())
         outputs_[index].second_ = face;
         outputs_[index].second_ = face;
     else if (index == outputs_.Size() && index < MAX_RENDERTARGETS)
     else if (index == outputs_.Size() && index < MAX_RENDERTARGETS)
@@ -273,13 +277,15 @@ const Variant& RenderPathCommand::GetShaderParameter(const String& name) const
     return i != shaderParameters_.End() ? i->second_ : Variant::EMPTY;
     return i != shaderParameters_.End() ? i->second_ : Variant::EMPTY;
 }
 }
 
 
-const String& RenderPathCommand::GetOutputName(unsigned index) const
+const String& RenderPathCommand::GetOutputName(i32 index) const
 {
 {
+    assert(index >= 0);
     return index < outputs_.Size() ? outputs_[index].first_ : String::EMPTY;
     return index < outputs_.Size() ? outputs_[index].first_ : String::EMPTY;
 }
 }
 
 
-CubeMapFace RenderPathCommand::GetOutputFace(unsigned index) const
+CubeMapFace RenderPathCommand::GetOutputFace(i32 index) const
 {
 {
+    assert(index >= 0);
     return index < outputs_.Size() ? outputs_[index].second_ : FACE_POSITIVE_X;
     return index < outputs_.Size() ? outputs_[index].second_ : FACE_POSITIVE_X;
 }
 }
 
 
@@ -339,13 +345,13 @@ bool RenderPath::Append(XMLFile* file)
 
 
 void RenderPath::SetEnabled(const String& tag, bool active)
 void RenderPath::SetEnabled(const String& tag, bool active)
 {
 {
-    for (unsigned i = 0; i < renderTargets_.Size(); ++i)
+    for (i32 i = 0; i < renderTargets_.Size(); ++i)
     {
     {
         if (!renderTargets_[i].tag_.Compare(tag, false))
         if (!renderTargets_[i].tag_.Compare(tag, false))
             renderTargets_[i].enabled_ = active;
             renderTargets_[i].enabled_ = active;
     }
     }
 
 
-    for (unsigned i = 0; i < commands_.Size(); ++i)
+    for (i32 i = 0; i < commands_.Size(); ++i)
     {
     {
         if (!commands_[i].tag_.Compare(tag, false))
         if (!commands_[i].tag_.Compare(tag, false))
             commands_[i].enabled_ = active;
             commands_[i].enabled_ = active;
@@ -354,13 +360,13 @@ void RenderPath::SetEnabled(const String& tag, bool active)
 
 
 bool RenderPath::IsEnabled(const String& tag) const
 bool RenderPath::IsEnabled(const String& tag) const
 {
 {
-    for (unsigned i = 0; i < renderTargets_.Size(); ++i)
+    for (i32 i = 0; i < renderTargets_.Size(); ++i)
     {
     {
         if (!renderTargets_[i].tag_.Compare(tag, false) && renderTargets_[i].enabled_)
         if (!renderTargets_[i].tag_.Compare(tag, false) && renderTargets_[i].enabled_)
             return true;
             return true;
     }
     }
 
 
-    for (unsigned i = 0; i < commands_.Size(); ++i)
+    for (i32 i = 0; i < commands_.Size(); ++i)
     {
     {
         if (!commands_[i].tag_.Compare(tag, false) && commands_[i].enabled_)
         if (!commands_[i].tag_.Compare(tag, false) && commands_[i].enabled_)
             return true;
             return true;
@@ -371,13 +377,13 @@ bool RenderPath::IsEnabled(const String& tag) const
 
 
 bool RenderPath::IsAdded(const String& tag) const
 bool RenderPath::IsAdded(const String& tag) const
 {
 {
-    for (unsigned i = 0; i < renderTargets_.Size(); ++i)
+    for (i32 i = 0; i < renderTargets_.Size(); ++i)
     {
     {
         if (!renderTargets_[i].tag_.Compare(tag, false))
         if (!renderTargets_[i].tag_.Compare(tag, false))
             return true;
             return true;
     }
     }
 
 
-    for (unsigned i = 0; i < commands_.Size(); ++i)
+    for (i32 i = 0; i < commands_.Size(); ++i)
     {
     {
         if (!commands_[i].tag_.Compare(tag, false))
         if (!commands_[i].tag_.Compare(tag, false))
             return true;
             return true;
@@ -388,13 +394,13 @@ bool RenderPath::IsAdded(const String& tag) const
 
 
 void RenderPath::ToggleEnabled(const String& tag)
 void RenderPath::ToggleEnabled(const String& tag)
 {
 {
-    for (unsigned i = 0; i < renderTargets_.Size(); ++i)
+    for (i32 i = 0; i < renderTargets_.Size(); ++i)
     {
     {
         if (!renderTargets_[i].tag_.Compare(tag, false))
         if (!renderTargets_[i].tag_.Compare(tag, false))
             renderTargets_[i].enabled_ = !renderTargets_[i].enabled_;
             renderTargets_[i].enabled_ = !renderTargets_[i].enabled_;
     }
     }
 
 
-    for (unsigned i = 0; i < commands_.Size(); ++i)
+    for (i32 i = 0; i < commands_.Size(); ++i)
     {
     {
         if (!commands_[i].tag_.Compare(tag, false))
         if (!commands_[i].tag_.Compare(tag, false))
             commands_[i].enabled_ = !commands_[i].enabled_;
             commands_[i].enabled_ = !commands_[i].enabled_;
@@ -421,7 +427,7 @@ void RenderPath::RemoveRenderTarget(unsigned index)
 
 
 void RenderPath::RemoveRenderTarget(const String& name)
 void RenderPath::RemoveRenderTarget(const String& name)
 {
 {
-    for (unsigned i = 0; i < renderTargets_.Size(); ++i)
+    for (i32 i = 0; i < renderTargets_.Size(); ++i)
     {
     {
         if (!renderTargets_[i].name_.Compare(name, false))
         if (!renderTargets_[i].name_.Compare(name, false))
         {
         {
@@ -476,7 +482,7 @@ void RenderPath::SetShaderParameter(const String& name, const Variant& value)
 {
 {
     StringHash nameHash(name);
     StringHash nameHash(name);
 
 
-    for (unsigned i = 0; i < commands_.Size(); ++i)
+    for (i32 i = 0; i < commands_.Size(); ++i)
     {
     {
         HashMap<StringHash, Variant>::Iterator j = commands_[i].shaderParameters_.Find(nameHash);
         HashMap<StringHash, Variant>::Iterator j = commands_[i].shaderParameters_.Find(nameHash);
         if (j != commands_[i].shaderParameters_.End())
         if (j != commands_[i].shaderParameters_.End())
@@ -488,7 +494,7 @@ const Variant& RenderPath::GetShaderParameter(const String& name) const
 {
 {
     StringHash nameHash(name);
     StringHash nameHash(name);
 
 
-    for (unsigned i = 0; i < commands_.Size(); ++i)
+    for (i32 i = 0; i < commands_.Size(); ++i)
     {
     {
         HashMap<StringHash, Variant>::ConstIterator j = commands_[i].shaderParameters_.Find(nameHash);
         HashMap<StringHash, Variant>::ConstIterator j = commands_[i].shaderParameters_.Find(nameHash);
         if (j != commands_[i].shaderParameters_.End())
         if (j != commands_[i].shaderParameters_.End())

+ 14 - 10
Source/Urho3D/Graphics/RenderPath.h

@@ -92,15 +92,15 @@ struct URHO3D_API RenderPathCommand
     void RemoveShaderParameter(const String& name);
     void RemoveShaderParameter(const String& name);
     /// Set number of output rendertargets.
     /// Set number of output rendertargets.
     /// @property
     /// @property
-    void SetNumOutputs(unsigned num);
+    void SetNumOutputs(i32 num);
     /// Set output rendertarget name and face index for cube maps.
     /// Set output rendertarget name and face index for cube maps.
-    void SetOutput(unsigned index, const String& name, CubeMapFace face = FACE_POSITIVE_X);
+    void SetOutput(i32 index, const String& name, CubeMapFace face = FACE_POSITIVE_X);
     /// Set output rendertarget name.
     /// Set output rendertarget name.
     /// @property{set_outputNames}
     /// @property{set_outputNames}
-    void SetOutputName(unsigned index, const String& name);
+    void SetOutputName(i32 index, const String& name);
     /// Set output rendertarget face index for cube maps.
     /// Set output rendertarget face index for cube maps.
     /// @property{set_outputFaces}
     /// @property{set_outputFaces}
-    void SetOutputFace(unsigned index, CubeMapFace face);
+    void SetOutputFace(i32 index, CubeMapFace face);
     /// Set depth-stencil output name. When empty, will assign a depth-stencil buffer automatically.
     /// Set depth-stencil output name. When empty, will assign a depth-stencil buffer automatically.
     /// @property
     /// @property
     void SetDepthStencilName(const String& name);
     void SetDepthStencilName(const String& name);
@@ -114,14 +114,14 @@ struct URHO3D_API RenderPathCommand
 
 
     /// Return number of output rendertargets.
     /// Return number of output rendertargets.
     /// @property
     /// @property
-    unsigned GetNumOutputs() const { return outputs_.Size(); }
+    i32 GetNumOutputs() const { return outputs_.Size(); }
 
 
     /// Return output rendertarget name.
     /// Return output rendertarget name.
     /// @property{get_outputNames}
     /// @property{get_outputNames}
-    const String& GetOutputName(unsigned index) const;
+    const String& GetOutputName(i32 index) const;
     /// Return output rendertarget face index.
     /// Return output rendertarget face index.
     /// @property{get_outputFaces}
     /// @property{get_outputFaces}
-    CubeMapFace GetOutputFace(unsigned index) const;
+    CubeMapFace GetOutputFace(i32 index) const;
 
 
     /// Return depth-stencil output name.
     /// Return depth-stencil output name.
     /// @property
     /// @property
@@ -232,14 +232,18 @@ public:
 
 
     /// Return number of rendertargets.
     /// Return number of rendertargets.
     /// @property
     /// @property
-    unsigned GetNumRenderTargets() const { return renderTargets_.Size(); }
+    i32 GetNumRenderTargets() const { return renderTargets_.Size(); }
 
 
     /// Return number of commands.
     /// Return number of commands.
     /// @property
     /// @property
-    unsigned GetNumCommands() const { return commands_.Size(); }
+    i32 GetNumCommands() const { return commands_.Size(); }
 
 
     /// Return command at index, or null if does not exist.
     /// Return command at index, or null if does not exist.
-    RenderPathCommand* GetCommand(unsigned index) { return index < commands_.Size() ? &commands_[index] : nullptr; }
+    RenderPathCommand* GetCommand(i32 index)
+    {
+        assert(index >= 0);
+        return index < commands_.Size() ? &commands_[index] : nullptr;
+    }
 
 
     /// Return a shader parameter (first appearance in any command).
     /// Return a shader parameter (first appearance in any command).
     /// @property{get_shaderParameters}
     /// @property{get_shaderParameters}