Browse Source

More renaming

Marko Pintera 12 years ago
parent
commit
0964e0832e

+ 2 - 2
CamelotCore/Include/CmCoreObject.h

@@ -20,7 +20,7 @@ namespace CamelotEngine
 		enum Flags
 		enum Flags
 		{
 		{
 			CGO_INITIALIZED = 0x01,
 			CGO_INITIALIZED = 0x01,
-			CGO_REQUIRES_GPU_INIT = 0x02,
+			CGO_INIT_ON_RENDER_THREAD = 0x02,
 			CGO_SCHEDULED_FOR_INIT = 0x04,
 			CGO_SCHEDULED_FOR_INIT = 0x04,
 			CGO_SCHEDULED_FOR_DELETE = 0x08
 			CGO_SCHEDULED_FOR_DELETE = 0x08
 		};
 		};
@@ -121,7 +121,7 @@ o		 *
 
 
 		bool isScheduledToBeInitialized() const { return (mFlags & CGO_SCHEDULED_FOR_INIT) != 0; }
 		bool isScheduledToBeInitialized() const { return (mFlags & CGO_SCHEDULED_FOR_INIT) != 0; }
 		bool isScheduledToBeDeleted() const { return (mFlags & CGO_SCHEDULED_FOR_DELETE) != 0; }
 		bool isScheduledToBeDeleted() const { return (mFlags & CGO_SCHEDULED_FOR_DELETE) != 0; }
-		bool requiresGpuInitialization() const { return (mFlags & CGO_REQUIRES_GPU_INIT) != 0; }
+		bool requiresInitOnRenderThread() const { return (mFlags & CGO_INIT_ON_RENDER_THREAD) != 0; }
 
 
 		void setIsInitialized(bool initialized) { mFlags = initialized ? mFlags | CGO_INITIALIZED : mFlags & ~CGO_INITIALIZED; }
 		void setIsInitialized(bool initialized) { mFlags = initialized ? mFlags | CGO_INITIALIZED : mFlags & ~CGO_INITIALIZED; }
 		void setScheduledToBeInitialized(bool scheduled) { mFlags = scheduled ? mFlags | CGO_SCHEDULED_FOR_INIT : mFlags & ~CGO_SCHEDULED_FOR_INIT; }
 		void setScheduledToBeInitialized(bool scheduled) { mFlags = scheduled ? mFlags | CGO_SCHEDULED_FOR_INIT : mFlags & ~CGO_SCHEDULED_FOR_INIT; }

+ 6 - 6
CamelotCore/Source/CmCoreObject.cpp

@@ -8,11 +8,11 @@ namespace CamelotEngine
 	CM_STATIC_THREAD_SYNCHRONISER_CLASS_INSTANCE(mCoreGpuObjectLoadedCondition, CoreObject)
 	CM_STATIC_THREAD_SYNCHRONISER_CLASS_INSTANCE(mCoreGpuObjectLoadedCondition, CoreObject)
 	CM_STATIC_MUTEX_CLASS_INSTANCE(mCoreGpuObjectLoadedMutex, CoreObject)
 	CM_STATIC_MUTEX_CLASS_INSTANCE(mCoreGpuObjectLoadedMutex, CoreObject)
 
 
-	CoreObject::CoreObject(bool requiresGpuInit)
+	CoreObject::CoreObject(bool initializeOnRenderThread)
 		: mFlags(0), mInternalID(0)
 		: mFlags(0), mInternalID(0)
 	{
 	{
 		mInternalID = CoreGpuObjectManager::instance().registerObject(this);
 		mInternalID = CoreGpuObjectManager::instance().registerObject(this);
-		mFlags = requiresGpuInit ? mFlags | CGO_REQUIRES_GPU_INIT : mFlags;
+		mFlags = initializeOnRenderThread ? mFlags | CGO_INIT_ON_RENDER_THREAD : mFlags;
 	}
 	}
 
 
 	CoreObject::~CoreObject() 
 	CoreObject::~CoreObject() 
@@ -37,7 +37,7 @@ namespace CamelotEngine
 
 
 	void CoreObject::destroy()
 	void CoreObject::destroy()
 	{
 	{
-		if(requiresGpuInitialization())
+		if(requiresInitOnRenderThread())
 		{
 		{
 			setScheduledToBeDeleted(true);
 			setScheduledToBeDeleted(true);
 
 
@@ -66,7 +66,7 @@ namespace CamelotEngine
 			CM_EXCEPT(InternalErrorException, "Trying to initialize an object that is already initialized.");
 			CM_EXCEPT(InternalErrorException, "Trying to initialize an object that is already initialized.");
 #endif
 #endif
 
 
-		if(requiresGpuInitialization())
+		if(requiresInitOnRenderThread())
 		{
 		{
 			setScheduledToBeInitialized(true);
 			setScheduledToBeInitialized(true);
 
 
@@ -80,7 +80,7 @@ namespace CamelotEngine
 
 
 	void CoreObject::initialize_internal()
 	void CoreObject::initialize_internal()
 	{
 	{
-		if(requiresGpuInitialization())
+		if(requiresInitOnRenderThread())
 		{
 		{
 			{
 			{
 				CM_LOCK_MUTEX(mCoreGpuObjectLoadedMutex);
 				CM_LOCK_MUTEX(mCoreGpuObjectLoadedMutex);
@@ -106,7 +106,7 @@ namespace CamelotEngine
 
 
 		if(!isInitialized())
 		if(!isInitialized())
 		{
 		{
-			if(requiresGpuInitialization())
+			if(requiresInitOnRenderThread())
 			{
 			{
 				CM_LOCK_MUTEX_NAMED(mCoreGpuObjectLoadedMutex, lock);
 				CM_LOCK_MUTEX_NAMED(mCoreGpuObjectLoadedMutex, lock);
 				while(!isInitialized())
 				while(!isInitialized())

+ 1 - 0
CamelotCore/Source/CmFont.cpp

@@ -5,6 +5,7 @@
 namespace CamelotEngine
 namespace CamelotEngine
 {
 {
 	Font::Font()
 	Font::Font()
+		:Resource(false)
 	{
 	{
 
 
 	}
 	}

+ 2 - 2
CamelotCore/Source/CmResource.cpp

@@ -5,8 +5,8 @@
 
 
 namespace CamelotEngine
 namespace CamelotEngine
 {
 {
-	Resource::Resource(bool requiresGpuInitialization)
-		:CoreObject(requiresGpuInitialization), mSize(0)
+	Resource::Resource(bool initializeOnRenderThread)
+		:CoreObject(initializeOnRenderThread), mSize(0)
 	{
 	{
 		// We always generate a random UUID, and then overwrite it with the actual one 
 		// We always generate a random UUID, and then overwrite it with the actual one 
 		// during loading if one was previously generated and saved.
 		// during loading if one was previously generated and saved.