Browse Source

Fixing an issue where editor windows weren't being destroyed in the proper order

Marko Pintera 12 years ago
parent
commit
d153f45214
3 changed files with 17 additions and 22 deletions
  1. 2 1
      CamelotCore/Source/CmApplication.cpp
  2. 0 12
      CamelotGLRenderer/Source/CmGLRenderSystem.cpp
  3. 15 9
      TODO.txt

+ 2 - 1
CamelotCore/Source/CmApplication.cpp

@@ -146,6 +146,7 @@ namespace CamelotFramework
 
 
 	void Application::shutDown()
 	void Application::shutDown()
 	{
 	{
+		mPrimaryRenderWindow->destroy();
 		mPrimaryRenderWindow = nullptr;
 		mPrimaryRenderWindow = nullptr;
 
 
 		Importer::shutDown();
 		Importer::shutDown();
@@ -201,7 +202,7 @@ namespace CamelotFramework
 	{
 	{
 		if(!mPrimaryRenderWindow)
 		if(!mPrimaryRenderWindow)
 		{
 		{
-			CM_EXCEPT(InternalErrorException, "Unable to get window handle. No active window is set!");
+			CM_EXCEPT(InternalErrorException, "Unable to get window handle. No active window exists!");
 		}
 		}
 
 
 		UINT64 windowId = 0;
 		UINT64 windowId = 0;

+ 0 - 12
CamelotGLRenderer/Source/CmGLRenderSystem.cpp

@@ -1301,18 +1301,6 @@ namespace CamelotFramework
 	//---------------------------------------------------------------------
 	//---------------------------------------------------------------------
 	void GLRenderSystem::oneTimeContextInitialization()
 	void GLRenderSystem::oneTimeContextInitialization()
 	{
 	{
-		if (GLEW_VERSION_1_2)
-		{
-		// Set nicer lighting model -- d3d9 has this by default
-		glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);
-		glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1);        
-		}
-		if (GLEW_VERSION_1_4)
-		{
-		glEnable(GL_COLOR_SUM);
-		glDisable(GL_DITHER);
-		}
-
 		// Check for FSAA
 		// Check for FSAA
 		// Enable the extension if it was enabled by the GLSupport
 		// Enable the extension if it was enabled by the GLSupport
 		if (mGLSupport->checkExtension("GL_ARB_multisample"))
 		if (mGLSupport->checkExtension("GL_ARB_multisample"))

+ 15 - 9
TODO.txt

@@ -1,19 +1,24 @@
 ----------------------- CAMELOT 2D / GUI -----------------------------------------------------------
 ----------------------- CAMELOT 2D / GUI -----------------------------------------------------------
 
 
 ----------------------------------------------------------------------------------------------
 ----------------------------------------------------------------------------------------------
+<<<<<<OpenGL issues>>>>>>>
+Camera in new window in OpenGL doesn't render anything
+Destroying OpenGL window doesn't work
+OpenGL camera/rendering is acting really jerky and weird
 
 
-<<<<<<<Resource update/read>>>>>>>>
-Make sure to update the actual buffer in bindGpuParams
- - It needs to accept an Unique GpuParams ptr
- - It needs to call releaseCopyForDeferred when it ends
-
-Material::setParamBlock probably doesn't work anymore (and is atm commented out)
+-------------
 
 
-INSTEAD OF createCopyForDeferred create a new BindableGpuParams class which basically just wraps GpuParams, with the difference that it is accepted in render system, and normal GpuParams isn't. Also create a special deleter that automatically calls releaseCopyForDeferred so that it doesn't need to be called manually.
- - unique_ptr doesn't seem to work for GpuParams so maybe have that class handle that as well.
- - pass a reference instead? take care with bind so it doesn't store a copy (boost::ref)
+When I'm canceling command queue commands I might be canceling important user commands.
+ - (e.g. user schedules a resource update and I cancel the command)
+ - render commands can be cancelled with no repercussions?
+ - maybe I should someone block sim thread if its running too fast?
+   - input lag?
 
 
+Shared GPU buffers
+ - wouldn't work atm due to the way I update the buffers (and the way I mark them dirty)
+ - Material::setParamBlock is commented out
 
 
+<<<<<<<Resource update/read>>>>>>>>
 All data classes (MeshData, PixelData, etc) derive from GpuBufferData class. 
 All data classes (MeshData, PixelData, etc) derive from GpuBufferData class. 
  - It contains basically just raw bytes.
  - It contains basically just raw bytes.
  - It has lock/unlock methods (used mostly internally)
  - It has lock/unlock methods (used mostly internally)
@@ -29,6 +34,7 @@ Inherit all buffer classes (texture, mesh, GPUBlock) from IGpuBuffer interface
 
 
 DeferredRenderContext::updateResource(IGpuBuffer, GpuBufferData)
 DeferredRenderContext::updateResource(IGpuBuffer, GpuBufferData)
 AsyncOp DeferredRenderContext::readResource(IGpuBuffer)
 AsyncOp DeferredRenderContext::readResource(IGpuBuffer)
+ - When Resources::save needs to save a resource how do I easily read the data!?
 
 
 --------
 --------