Просмотр исходного кода

Few tiny debug-related changes

Marko Pintera 12 лет назад
Родитель
Сommit
0b49ec1162

+ 2 - 1
CamelotClient/CmEditorWindow.cpp

@@ -92,7 +92,8 @@ namespace BansheeEditor
 		//titleBarBackgroundArea->getLayout().addElement(GUITexture::create(*mGUI, GUIImageScaleMode::RepeatToFit, GUILayoutOptions::expandableXY(), mGUI->getGUISkin()->getStyle("TitleBarBg")));
 		//titleBarBackgroundArea->getLayout().addElement(GUITexture::create(*mGUI, GUIImageScaleMode::RepeatToFit, GUILayoutOptions::expandableXY(), mGUI->getGUISkin()->getStyle("TitleBarBg")));
 		//titleBarBackgroundArea->getLayout().addSpace(1);
 		//titleBarBackgroundArea->getLayout().addSpace(1);
 		
 		
-		mRenderWindow->resize(300, 250);
+		//mRenderWindow->resize(300, 250);
+		mRenderWindow->setVisible(false);
 	}
 	}
 
 
 	EditorWindow::~EditorWindow()
 	EditorWindow::~EditorWindow()

+ 4 - 0
CamelotCore/Source/CmTexture.cpp

@@ -195,11 +195,15 @@ namespace CamelotFramework {
 	//-----------------------------------------------------------------------------
 	//-----------------------------------------------------------------------------
 	void Texture::unlock()
 	void Texture::unlock()
 	{
 	{
+		THROW_IF_NOT_RENDER_THREAD;
+
 		unlockImpl();
 		unlockImpl();
 	}
 	}
 	//-----------------------------------------------------------------------------
 	//-----------------------------------------------------------------------------
 	void Texture::copy(TexturePtr& target)
 	void Texture::copy(TexturePtr& target)
 	{
 	{
+		THROW_IF_NOT_RENDER_THREAD;
+
 		if (target->getUsage() != this->getUsage() ||
 		if (target->getUsage() != this->getUsage() ||
 			target->getTextureType() != this->getTextureType())
 			target->getTextureType() != this->getTextureType())
 		{
 		{

+ 2 - 2
CamelotD3D11RenderSystem/Source/CmD3D11RenderWindow.cpp

@@ -301,7 +301,7 @@ namespace CamelotFramework
 		if (mHWnd && !mIsFullScreen)
 		if (mHWnd && !mIsFullScreen)
 		{
 		{
 			SetWindowPos(mHWnd, 0, top, left, 0, 0,
 			SetWindowPos(mHWnd, 0, top, left, 0, 0,
-				SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_ASYNCWINDOWPOS);
+				SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
 		}
 		}
 	}
 	}
 
 
@@ -314,7 +314,7 @@ namespace CamelotFramework
 			width = rc.right - rc.left;
 			width = rc.right - rc.left;
 			height = rc.bottom - rc.top;
 			height = rc.bottom - rc.top;
 			SetWindowPos(mHWnd, 0, 0, 0, width, height,
 			SetWindowPos(mHWnd, 0, 0, 0, width, height,
-				SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_ASYNCWINDOWPOS);
+				SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
 		}
 		}
 	}
 	}
 
 

+ 1 - 4
CamelotD3D9Renderer/Source/CmD3D9RenderWindow.cpp

@@ -742,11 +742,8 @@ namespace CamelotFramework
 		if (width != mWidth || height != mHeight)
 		if (width != mWidth || height != mHeight)
 		{
 		{
 			mWidth  = rc.right - rc.left;
 			mWidth  = rc.right - rc.left;
-			mHeight = rc.bottom - rc.top;
-
-			// TODO - Notify viewports of resize		
+			mHeight = rc.bottom - rc.top;	
 		}	
 		}	
-
 	}
 	}
 
 
 	//-----------------------------------------------------------------------------
 	//-----------------------------------------------------------------------------

+ 4 - 9
TODO.txt

@@ -22,20 +22,15 @@ I call waitUntilLoaded too many times. Sometimes 5-6 times in a single function.
 GUIWidget::updateMeshes leaks. If I leave the game running I can see memory continously going up
 GUIWidget::updateMeshes leaks. If I leave the game running I can see memory continously going up
 
 
 IMMEDIATE:
 IMMEDIATE:
- - Test GUILayoutY and nested layouts
- - GUIButton needs:
-  - Padding
-  - Icon image
-  - Support for text color in GUIStyles
+ - Add window-management command to DeferredRenderContext - I already have resource management commands
+   there, few window related ones won't hurt. I can always split the class if needed.
+     - Possibly add guards to render target classes so they aren't accidentaly accessed from the render thread (similar to how Texture is handled)
+
  - I have disabled linear filtering because it doesn't look good on scale9grid textures. (Add another material so it works with stretched textures?)
  - I have disabled linear filtering because it doesn't look good on scale9grid textures. (Add another material so it works with stretched textures?)
  - Enable alpha test so I don't render completely transparent pixels.
  - Enable alpha test so I don't render completely transparent pixels.
  - What happens when I don't set a texture for a state of a GUI element. Use a dummy white texture probably?
  - What happens when I don't set a texture for a state of a GUI element. Use a dummy white texture probably?
     - Make sure GUI system uses a dummy texture if one isn't available
     - Make sure GUI system uses a dummy texture if one isn't available
 	- SpriteTexture keeps a static reference to DUmmyTexture which I need to release before shutdown
 	- SpriteTexture keeps a static reference to DUmmyTexture which I need to release before shutdown
- - GUITexture gui element, with support for tileable textures I can use window background!
- - Add "Arial" size 10 font
-  - Add support for bold (and maybe italic) fonts in Font importer
-  - Add support to disable aliasing when importing font
 
 
 Window needed systems:
 Window needed systems:
 EditorWindowContainer
 EditorWindowContainer