2
0
Эх сурвалжийг харах

Fix for invalid operation errors:
- When deleting a shader
- When uploading data to an RG format texture

Marko Pintera 12 жил өмнө
parent
commit
bfef9f98a0

+ 2 - 2
BansheeEngine/Source/BsGLBuiltinMaterialFactory.cpp

@@ -128,11 +128,11 @@ namespace BansheeEngine
 						";
 
 		String psCode = "#version 400\n										\
-																			\
+						\
 						uniform sampler2D mainTexture;						\
 						in vec2 texcoord0;									\
 						out vec4 fragColor;									\
-																			\
+						\
 						void main()										\
 						{													\
 						vec4 color = texture2D(mainTexture, texcoord0.st);	\

+ 3 - 1
CamelotClient/CamelotClient.cpp

@@ -51,7 +51,9 @@ int CALLBACK WinMain(
 	gBansheeApp().startUp("CamelotGLRenderSystem", "BansheeForwardRenderer", "D:\\CamelotResourceMetas");
 #endif
 
-	//CommandQueue::addBreakpoint(1, 11);
+	//CommandQueue::addBreakpoint(0, 19);
+	//CommandQueue::addBreakpoint(0, 22);
+	//CommandQueue::addBreakpoint(0, 12);
 
 	RenderSystem* renderSystem = RenderSystem::instancePtr();
 	RenderWindowPtr renderWindow = gApplication().getPrimaryRenderWindow();

+ 1 - 3
CamelotGLRenderer/Source/CmGLPixelFormat.cpp

@@ -90,16 +90,14 @@ namespace CamelotFramework  {
             case PF_R8G8B8:
             case PF_B8G8R8:
 			case PF_R8G8:
-                return GL_UNSIGNED_INT_8_8_8_8_REV;
+				return GL_UNSIGNED_BYTE;
 			case PF_X8B8G8R8:
 			case PF_A8B8G8R8:
-                return GL_UNSIGNED_INT_8_8_8_8;
 			case PF_X8R8G8B8:
             case PF_A8R8G8B8:
 				return GL_UNSIGNED_INT_8_8_8_8;
             case PF_B8G8R8A8:
 			case PF_B8G8R8X8:
-                return GL_UNSIGNED_INT_8_8_8_8_REV;
 			case PF_R8G8B8A8:
 			case PF_R8G8B8X8:
 				return GL_UNSIGNED_INT_8_8_8_8_REV;

+ 1 - 1
CamelotGLRenderer/Source/GLSL/src/CmGLSLProgram.cpp

@@ -185,7 +185,7 @@ namespace CamelotFramework
 		mAssemblerProgram = nullptr;
 
 		if (isSupported())
-			glDeleteShader(mGLHandle);
+			glDeleteProgram(mGLHandle);
 
 		HighLevelGpuProgram::destroy_internal();
 	}

+ 0 - 1
TODO.txt

@@ -24,7 +24,6 @@ Immediate TODO:
  - TextSprite bounds are wrong. Y coordinate is flipped
  - Calculate entire GUIWidget bounds and store them
  - Current way of transforming ORect from GUIWidget is almost certainly not correct
- - Implement D3D9 and GL BuiltInMaterialManager
  - A way to update mesh buffers without recreating vertex/index buffers (Setting data currently does exactly that)
  - Transformable GUI elements and their bounds