Selaa lähdekoodia

Rename ClearMode to ClearTarget.

Rokas Kupstys 7 vuotta sitten
vanhempi
sitoutus
d9d51b9c27

+ 4 - 4
Source/Urho3D/AngelScript/GraphicsAPI.cpp

@@ -327,10 +327,10 @@ static void RegisterRenderPath(asIScriptEngine* engine)
     engine->RegisterEnumValue("TextureUnit", "MAX_MATERIAL_TEXTURE_UNITS", MAX_MATERIAL_TEXTURE_UNITS);
     engine->RegisterEnumValue("TextureUnit", "MAX_TEXTURE_UNITS", MAX_TEXTURE_UNITS);
 
-    engine->RegisterEnum("ClearMode");
-    engine->RegisterEnumValue("ClearMode", "CLEAR_COLOR", CLEAR_COLOR);
-    engine->RegisterEnumValue("ClearMode", "CLEAR_DEPTH", CLEAR_DEPTH);
-    engine->RegisterEnumValue("ClearMode", "CLEAR_STENCIL", CLEAR_STENCIL);
+    engine->RegisterEnum("ClearTarget");
+    engine->RegisterEnumValue("ClearTarget", "CLEAR_COLOR", CLEAR_COLOR);
+    engine->RegisterEnumValue("ClearTarget", "CLEAR_DEPTH", CLEAR_DEPTH);
+    engine->RegisterEnumValue("ClearTarget", "CLEAR_STENCIL", CLEAR_STENCIL);
 
     engine->RegisterObjectType("RenderTargetInfo", sizeof(RenderTargetInfo), asOBJ_VALUE | asOBJ_APP_CLASS_C);
     engine->RegisterObjectBehaviour("RenderTargetInfo", asBEHAVE_CONSTRUCT, "void f()", asFUNCTION(ConstructRenderTargetInfo), asCALL_CDECL_OBJLAST);

+ 1 - 1
Source/Urho3D/Graphics/Direct3D11/D3D11Graphics.cpp

@@ -590,7 +590,7 @@ void Graphics::EndFrame()
     CleanupScratchBuffers();
 }
 
-void Graphics::Clear(ClearModeFlags flags, const Color& color, float depth, unsigned stencil)
+void Graphics::Clear(ClearTargetFlags flags, const Color& color, float depth, unsigned stencil)
 {
     IntVector2 rtSize = GetRenderTargetDimensions();
 

+ 1 - 1
Source/Urho3D/Graphics/Direct3D9/D3D9Graphics.cpp

@@ -771,7 +771,7 @@ void Graphics::EndFrame()
     CleanupScratchBuffers();
 }
 
-void Graphics::Clear(ClearModeFlags flags, const Color& color, float depth, unsigned stencil)
+void Graphics::Clear(ClearTargetFlags flags, const Color& color, float depth, unsigned stencil)
 {
     DWORD d3dFlags = 0;
     if (flags & CLEAR_COLOR)

+ 1 - 1
Source/Urho3D/Graphics/Graphics.h

@@ -125,7 +125,7 @@ public:
     /// End frame rendering and swap buffers.
     void EndFrame();
     /// Clear any or all of rendertarget, depth buffer and stencil buffer.
-    void Clear(ClearModeFlags flags, const Color& color = Color(0.0f, 0.0f, 0.0f, 0.0f), float depth = 1.0f, unsigned stencil = 0);
+    void Clear(ClearTargetFlags flags, const Color& color = Color(0.0f, 0.0f, 0.0f, 0.0f), float depth = 1.0f, unsigned stencil = 0);
     /// Resolve multisampled backbuffer to a texture rendertarget. The texture's size should match the viewport size.
     bool ResolveToTexture(Texture2D* destination, const IntRect& viewport);
     /// Resolve a multisampled texture on itself.

+ 2 - 2
Source/Urho3D/Graphics/GraphicsDefs.h

@@ -439,13 +439,13 @@ enum MaterialQuality : unsigned
     QUALITY_MAX = 15,
 };
 
-enum ClearMode : unsigned
+enum ClearTarget : unsigned
 {
     CLEAR_COLOR = 0x1,
     CLEAR_DEPTH = 0x2,
     CLEAR_STENCIL = 0x4,
 };
-URHO3D_FLAGSET(ClearMode, ClearModeFlags);
+URHO3D_FLAGSET(ClearTarget, ClearTargetFlags);
 
 // Legacy vertex element bitmasks.
 enum VertexMask : unsigned

+ 1 - 1
Source/Urho3D/Graphics/OpenGL/OGLGraphics.cpp

@@ -659,7 +659,7 @@ void Graphics::EndFrame()
     CleanupScratchBuffers();
 }
 
-void Graphics::Clear(ClearModeFlags flags, const Color& color, float depth, unsigned stencil)
+void Graphics::Clear(ClearTargetFlags flags, const Color& color, float depth, unsigned stencil)
 {
     PrepareDraw();
 

+ 1 - 1
Source/Urho3D/Graphics/RenderPath.h

@@ -161,7 +161,7 @@ struct URHO3D_API RenderPathCommand
     /// Depth-stencil output name.
     String depthStencilName_;
     /// Clear flags. Affects clear command only.
-    ClearModeFlags clearFlags_{};
+    ClearTargetFlags clearFlags_{};
     /// Clear color. Affects clear command only.
     Color clearColor_;
     /// Clear depth. Affects clear command only.

+ 1 - 1
Source/Urho3D/LuaScript/pkgs/Graphics/GraphicsDefs.pkg

@@ -237,7 +237,7 @@ enum MaterialQuality
     QUALITY_MAX
 };
 
-enum ClearMode
+enum ClearTarget
 {
     CLEAR_COLOR,
     CLEAR_DEPTH,

+ 1 - 1
Source/Urho3D/LuaScript/pkgs/Graphics/RenderPath.pkg

@@ -140,7 +140,7 @@ static int tolua_set_RenderPathCommand_clearFlags(lua_State* tolua_S)
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
 #endif
-  self->clearFlags_ = ClearModeFlags((unsigned)  tolua_tonumber(tolua_S,2,0))
+  self->clearFlags_ = ClearTargetFlags((unsigned)  tolua_tonumber(tolua_S,2,0))
 ;
  return 0;
 }