Browse Source

rename DRAWABLE_PROXYGEOMETRY DRAWABLE_RENDERER2D

aster2013 11 years ago
parent
commit
ae33830dd2

+ 1 - 1
Source/Engine/Graphics/Drawable.h

@@ -33,7 +33,7 @@ namespace Urho3D
 static const unsigned DRAWABLE_GEOMETRY = 0x1;
 static const unsigned DRAWABLE_LIGHT = 0x2;
 static const unsigned DRAWABLE_ZONE = 0x4;
-static const unsigned DRAWABLE_PROXYGEOMETRY = 0x8;
+static const unsigned DRAWABLE_RENDERER2D = 0x8;
 static const unsigned DRAWABLE_ANY = 0xff;
 static const unsigned DEFAULT_VIEWMASK = M_MAX_UNSIGNED;
 static const unsigned DEFAULT_LIGHTMASK = M_MAX_UNSIGNED;

+ 7 - 7
Source/Engine/Graphics/View.cpp

@@ -108,7 +108,7 @@ public:
             Drawable* drawable = *start++;
             unsigned char flags = drawable->GetDrawableFlags();
             
-            if ((flags == DRAWABLE_ZONE || ((flags == DRAWABLE_GEOMETRY || flags == DRAWABLE_PROXYGEOMETRY) &&
+            if ((flags == DRAWABLE_ZONE || ((flags == DRAWABLE_GEOMETRY || flags == DRAWABLE_RENDERER2D) &&
                 drawable->IsOccluder())) && (drawable->GetViewMask() & viewMask_))
             {
                 if (inside || frustum_.IsInsideFast(drawable->GetWorldBoundingBox()))
@@ -198,7 +198,7 @@ void CheckVisibilityWork(const WorkItem* item, unsigned threadIndex)
             drawable->MarkInView(view->frame_);
             
             // For geometries, find zone, clear lights and calculate view space Z range
-            if (drawable->GetDrawableFlags() & (DRAWABLE_GEOMETRY | DRAWABLE_PROXYGEOMETRY))
+            if (drawable->GetDrawableFlags() & (DRAWABLE_GEOMETRY | DRAWABLE_RENDERER2D))
             {
                 Zone* drawableZone = drawable->GetZone();
                 if (!cameraZoneOverride && (drawable->IsZoneDirty() || !drawableZone || (drawableZone->GetViewMask() &
@@ -784,12 +784,12 @@ void View::GetDrawables()
     if (occlusionBuffer_)
     {
         OccludedFrustumOctreeQuery query(tempDrawables, camera_->GetFrustum(), occlusionBuffer_, DRAWABLE_GEOMETRY |
-            DRAWABLE_PROXYGEOMETRY | DRAWABLE_LIGHT, camera_->GetViewMask());
+            DRAWABLE_RENDERER2D | DRAWABLE_LIGHT, camera_->GetViewMask());
         octree_->GetDrawables(query);
     }
     else
     {
-        FrustumOctreeQuery query(tempDrawables, camera_->GetFrustum(), DRAWABLE_GEOMETRY | DRAWABLE_PROXYGEOMETRY |
+        FrustumOctreeQuery query(tempDrawables, camera_->GetFrustum(), DRAWABLE_GEOMETRY | DRAWABLE_RENDERER2D |
             DRAWABLE_LIGHT, camera_->GetViewMask());
         octree_->GetDrawables(query);
     }
@@ -2086,7 +2086,7 @@ void View::ProcessLight(LightQueryResult& query, unsigned threadIndex)
         
     case LIGHT_SPOT:
         {
-            FrustumOctreeQuery octreeQuery(tempDrawables, light->GetFrustum(), DRAWABLE_GEOMETRY | DRAWABLE_PROXYGEOMETRY,
+            FrustumOctreeQuery octreeQuery(tempDrawables, light->GetFrustum(), DRAWABLE_GEOMETRY | DRAWABLE_RENDERER2D,
                 camera_->GetViewMask());
             octree_->GetDrawables(octreeQuery);
             for (unsigned i = 0; i < tempDrawables.Size(); ++i)
@@ -2100,7 +2100,7 @@ void View::ProcessLight(LightQueryResult& query, unsigned threadIndex)
     case LIGHT_POINT:
         {
             SphereOctreeQuery octreeQuery(tempDrawables, Sphere(light->GetNode()->GetWorldPosition(), light->GetRange()),
-                DRAWABLE_GEOMETRY | DRAWABLE_PROXYGEOMETRY, camera_->GetViewMask());
+                DRAWABLE_GEOMETRY | DRAWABLE_RENDERER2D, camera_->GetViewMask());
             octree_->GetDrawables(octreeQuery);
             for (unsigned i = 0; i < tempDrawables.Size(); ++i)
             {
@@ -2142,7 +2142,7 @@ void View::ProcessLight(LightQueryResult& query, unsigned threadIndex)
                 continue;
         
             // Reuse lit geometry query for all except directional lights
-            ShadowCasterOctreeQuery query(tempDrawables, shadowCameraFrustum, DRAWABLE_GEOMETRY | DRAWABLE_PROXYGEOMETRY,
+            ShadowCasterOctreeQuery query(tempDrawables, shadowCameraFrustum, DRAWABLE_GEOMETRY | DRAWABLE_RENDERER2D,
                 camera_->GetViewMask());
             octree_->GetDrawables(query);
         }

+ 2 - 2
Source/Engine/Graphics/Zone.cpp

@@ -337,14 +337,14 @@ void Zone::ClearDrawablesZone()
     if (octant_ && lastWorldBoundingBox_.defined_)
     {
         PODVector<Drawable*> result;
-        BoxOctreeQuery query(result, lastWorldBoundingBox_, DRAWABLE_GEOMETRY | DRAWABLE_PROXYGEOMETRY | DRAWABLE_ZONE);
+        BoxOctreeQuery query(result, lastWorldBoundingBox_, DRAWABLE_GEOMETRY | DRAWABLE_RENDERER2D | DRAWABLE_ZONE);
         octant_->GetRoot()->GetDrawables(query);
 
         for (PODVector<Drawable*>::Iterator i = result.Begin(); i != result.End(); ++i)
         {
             Drawable* drawable = *i;
             unsigned drawableFlags = drawable->GetDrawableFlags();
-            if (drawableFlags & (DRAWABLE_GEOMETRY | DRAWABLE_PROXYGEOMETRY))
+            if (drawableFlags & (DRAWABLE_GEOMETRY | DRAWABLE_RENDERER2D))
                 drawable->SetZone(0);
             else if (drawableFlags & DRAWABLE_ZONE)
             {

+ 1 - 1
Source/Engine/LuaScript/pkgs/Graphics/Drawable.pkg

@@ -3,7 +3,7 @@ $#include "Drawable.h"
 static const unsigned DRAWABLE_GEOMETRY;
 static const unsigned DRAWABLE_LIGHT;
 static const unsigned DRAWABLE_ZONE;
-static const unsigned DRAWABLE_PROXYGEOMETRY;
+static const unsigned DRAWABLE_RENDERER2D;
 static const unsigned DRAWABLE_ANY;
 static const unsigned DEFAULT_VIEWMASK;
 static const unsigned DEFAULT_LIGHTMASK;

+ 1 - 1
Source/Engine/Script/GraphicsAPI.cpp

@@ -741,7 +741,7 @@ static void RegisterDrawable(asIScriptEngine* engine)
     engine->RegisterGlobalProperty("uint DRAWABLE_GEOMETRY", (void*)&DRAWABLE_GEOMETRY);
     engine->RegisterGlobalProperty("uint DRAWABLE_LIGHT", (void*)&DRAWABLE_LIGHT);
     engine->RegisterGlobalProperty("uint DRAWABLE_ZONE", (void*)&DRAWABLE_ZONE);
-    engine->RegisterGlobalProperty("uint DRAWABLE_PROXYGEOMETRY", (void*)&DRAWABLE_PROXYGEOMETRY);
+    engine->RegisterGlobalProperty("uint DRAWABLE_PROXYGEOMETRY", (void*)&DRAWABLE_RENDERER2D);
     engine->RegisterGlobalProperty("uint DRAWABLE_ANY", (void*)&DRAWABLE_ANY);
     engine->RegisterGlobalProperty("uint DEFAULT_VIEWMASK", (void*)&DEFAULT_VIEWMASK);
     engine->RegisterGlobalProperty("uint DEFAULT_LIGHTMASK", (void*)&DEFAULT_LIGHTMASK);

+ 1 - 1
Source/Engine/Urho2D/Renderer2D.cpp

@@ -47,7 +47,7 @@ namespace Urho3D
 extern const char* blendModeNames[];
 
 Renderer2D::Renderer2D(Context* context) :
-    Drawable(context, DRAWABLE_PROXYGEOMETRY),
+    Drawable(context, DRAWABLE_RENDERER2D),
     indexBuffer_(new IndexBuffer(context_)),
     vertexBuffer_(new VertexBuffer(context_)),
     frustum_(0),