Browse Source

New VideoModeInfo changes compile

Marko Pintera 11 years ago
parent
commit
32c45ecb8e

+ 1 - 1
CamelotCore/Include/CmDrawOps.h

@@ -22,5 +22,5 @@ namespace BansheeEngine
 	* @brief	Converts the number of vertices to number of primitives
 	* 			based on the specified draw operation.
 	*/
-	UINT32 CM_UTILITY_EXPORT vertexCountToPrimCount(DrawOperationType type, UINT32 elementCount);
+	UINT32 CM_EXPORT vertexCountToPrimCount(DrawOperationType type, UINT32 elementCount);
 }

+ 1 - 1
CamelotCore/Include/CmRenderWindow.h

@@ -92,7 +92,7 @@ namespace BansheeEngine
 		/**
 		 * @brief	Switches the window to windowed mode.
 		 */
-		virtual void setWindowed();
+		virtual void setWindowed() { }
 
         /**
          * @brief	Hide or show the window.

+ 7 - 46
CamelotD3D9Renderer/Include/CmD3D9Driver.h

@@ -1,39 +1,10 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-    (Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2011 Torus Knot Software Ltd
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-#ifndef __D3D9DRIVER_H__
-#define __D3D9DRIVER_H__
+#pragma once
 
 #include "CmD3D9Prerequisites.h"
 #include "CmString.h"
 
 namespace BansheeEngine
 {
-
 	class D3D9VideoModeList;
 	class D3D9VideoMode;
 
@@ -61,20 +32,10 @@ namespace BansheeEngine
 		D3D9VideoModeList*				getVideoModeList	();
 			
 	private:				
-		// Adapter number.
-		unsigned int			mAdapterNumber;
-		
-		// Device caps.
-		D3DCAPS9				mD3D9DeviceCaps;		
-		
-		// Adapter identifier
-		D3DADAPTER_IDENTIFIER9	mAdapterIdentifier;
-
-		// Desktop display mode.
-		D3DDISPLAYMODE			mDesktopDisplayMode;
-
-		// Video modes list.
-		D3D9VideoModeList*		mpVideoModeList;	
+		unsigned int mAdapterNumber;
+		D3DCAPS9 mD3D9DeviceCaps;		
+		D3DADAPTER_IDENTIFIER9 mAdapterIdentifier;
+		D3DDISPLAYMODE mDesktopDisplayMode;
+		D3D9VideoModeList* mpVideoModeList;	
 	};
-}
-#endif
+}

+ 3 - 30
CamelotD3D9Renderer/Source/CmD3D9Driver.cpp

@@ -1,30 +1,3 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-(Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2011 Torus Knot Software Ltd
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
 #include "CmD3D9Driver.h"
 #include "CmD3D9VideoModeList.h"
 #include "CmD3D9VideoMode.h"
@@ -34,9 +7,9 @@ namespace BansheeEngine
 	D3D9Driver::D3D9Driver()
 	{						
 		mAdapterNumber	= 0;
-		ZeroMemory( &mD3D9DeviceCaps, sizeof(mD3D9DeviceCaps) );
-		ZeroMemory( &mAdapterIdentifier, sizeof(mAdapterIdentifier) );
-		ZeroMemory( &mDesktopDisplayMode, sizeof(mDesktopDisplayMode) );		
+		ZeroMemory(&mD3D9DeviceCaps, sizeof(mD3D9DeviceCaps));
+		ZeroMemory(&mAdapterIdentifier, sizeof(mAdapterIdentifier));
+		ZeroMemory(&mDesktopDisplayMode, sizeof(mDesktopDisplayMode));		
 		mpVideoModeList = NULL;				
 	}
 

+ 0 - 2
CamelotGLRenderer/Source/CmGLRenderSystem.cpp

@@ -1624,8 +1624,6 @@ namespace BansheeEngine
 		checkForErrors();
 
 		// GPU Program Manager setup
-		checkForErrors();
-
 		if(caps->isShaderProfileSupported("glsl"))
 		{
 			mGLSLProgramFactory = cm_new<GLSLProgramFactory>();

+ 7 - 0
Polish.txt

@@ -11,6 +11,13 @@ Finish GPUProfiler:
 
  Fullscreen stuff:
 
+Add VideoModeInfo to OpenGL and DX9. Remove any existing functionality.
+ - Don't forget desktop mode
+ - Don't forget child window check
+
+Test if it all works. Especially going fullscreen on another monitor.
+When initializing a render window I don't have an option to use exact refresh rate (i.e. in RENDER_WINDOW_DESC)
+
  EnumDisplayMonitors - Get all available monitors
  - http://msdn.microsoft.com/en-us/library/windows/desktop/dd162617(v=vs.85).aspx
 GetMonitorInfo - Get display name for monitor