Browse Source

Fixed an issue with DX9 shader saving & loading

Marko Pintera 11 years ago
parent
commit
fa5f03d373

+ 3 - 3
BansheeD3D9RenderSystem/Source/BsD3D9GpuProgram.cpp

@@ -148,12 +148,12 @@ namespace BansheeEngine
 
 
 		String hlslProfile = D3D9RenderSystem::instance().getCapabilities()->gpuProgProfileToRSSpecificProfile(mProfile);
 		String hlslProfile = D3D9RenderSystem::instance().getCapabilities()->gpuProgProfileToRSSpecificProfile(mProfile);
 
 
-		mSource = D3D9EmulatedParamBlockParser::parse(mSource, mBlocks);
+		String parsedSource = D3D9EmulatedParamBlockParser::parse(mSource, mBlocks);
 
 
 		// Compile & assemble into microcode
 		// Compile & assemble into microcode
 		HRESULT hr = D3DXCompileShader(
 		HRESULT hr = D3DXCompileShader(
-			mSource.c_str(),
-			static_cast<UINT>(mSource.length()),
+			parsedSource.c_str(),
+			static_cast<UINT>(parsedSource.length()),
 			pDefines,
 			pDefines,
 			nullptr,
 			nullptr,
 			mEntryPoint.c_str(),
 			mEntryPoint.c_str(),

+ 1 - 1
BansheeEditorExec/BsEditorExec.cpp

@@ -11,7 +11,7 @@ int CALLBACK WinMain(
 	_In_  int nCmdShow
 	_In_  int nCmdShow
 	)
 	)
 {
 {
-	EditorApplication::startUp(RenderSystemPlugin::OpenGL);
+	EditorApplication::startUp(RenderSystemPlugin::DX9);
 	EditorApplication::instance().runMainLoop();
 	EditorApplication::instance().runMainLoop();
 	EditorApplication::shutDown();
 	EditorApplication::shutDown();
 
 

+ 2 - 2
SceneView.txt

@@ -94,8 +94,8 @@ Need to allow the user to specify custom gizmos.
 RenderTarget (and in turn, Viewport) make data available to sim thread, even though that data can be arbitrarily modified from the core thread
 RenderTarget (and in turn, Viewport) make data available to sim thread, even though that data can be arbitrarily modified from the core thread
 
 
 TODO:
 TODO:
- - Fix invalid height
- - Test DX9 and OpenGL
+ - Core thread gets stuck on shutdown when OpenGL is used...Somewhere in kernel
+ - DX9 doesn't render anything in viewport (shader issue?)
  - getProperties on non-core should just make a copy of core for now to check if everything works
  - getProperties on non-core should just make a copy of core for now to check if everything works
  - Remove the debug stuff in RenderTarget when done testing
  - Remove the debug stuff in RenderTarget when done testing