Browse Source

-Fix eternal black screen on Windows
-Disabled warnings on windows, need to properly set up warnings

Juan Linietsky 8 years ago
parent
commit
fccf2816d4

+ 1 - 1
SConstruct

@@ -275,7 +275,7 @@ if selected_platform in platform_list:
     # TODO: Add support to specify different levels of warning, e.g. only critical/significant, instead of on/off
     # TODO: Add support to specify different levels of warning, e.g. only critical/significant, instead of on/off
     if (env["warnings"] == "yes"):
     if (env["warnings"] == "yes"):
         if (os.name == "nt" and os.getenv("VSINSTALLDIR")): # MSVC, needs to stand out of course
         if (os.name == "nt" and os.getenv("VSINSTALLDIR")): # MSVC, needs to stand out of course
-            env.Append(CCFLAGS=['/W4'])
+	   pass# env.Append(CCFLAGS=['/W2'])
         else: # Rest of the world
         else: # Rest of the world
             env.Append(CCFLAGS=['-Wall'])
             env.Append(CCFLAGS=['-Wall'])
     else:
     else:

+ 1 - 1
drivers/gles3/rasterizer_storage_gles3.cpp

@@ -5533,7 +5533,7 @@ void RasterizerStorageGLES3::_render_target_allocate(RenderTarget *rt) {
 
 
 		glGenTextures(1, &rt->depth);
 		glGenTextures(1, &rt->depth);
 		glBindTexture(GL_TEXTURE_2D, rt->depth);
 		glBindTexture(GL_TEXTURE_2D, rt->depth);
-		glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, rt->width, rt->height, 0,
+		glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, rt->width, rt->height, 0,
 				GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
 				GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
 		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
 		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);

+ 3 - 3
editor/editor_node.cpp

@@ -4862,9 +4862,9 @@ EditorNode::EditorNode() {
 		import_wav.instance();
 		import_wav.instance();
 		ResourceFormatImporter::get_singleton()->add_importer(import_wav);
 		ResourceFormatImporter::get_singleton()->add_importer(import_wav);
 
 
-		Ref<ResourceImporterOBJ> import_obj;
-		import_obj.instance();
-		ResourceFormatImporter::get_singleton()->add_importer(import_obj);
+		//Ref<ResourceImporterOBJ> import_obj;
+		//import_obj.instance();
+		//ResourceFormatImporter::get_singleton()->add_importer(import_obj);
 
 
 		Ref<ResourceImporterScene> import_scene;
 		Ref<ResourceImporterScene> import_scene;
 		import_scene.instance();
 		import_scene.instance();

+ 1 - 1
platform/windows/detect.py

@@ -242,7 +242,7 @@ def configure(env):
             env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE'])
             env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE'])
             env.Append(LINKFLAGS=['/DEBUG'])
             env.Append(LINKFLAGS=['/DEBUG'])
 
 
-        env.Append(CCFLAGS=['/MT', '/Gd', '/GR', '/nologo'])
+	env.Append(CCFLAGS=['/MT', '/Gd', '/GR', '/nologo'])
         env.Append(CXXFLAGS=['/TP'])
         env.Append(CXXFLAGS=['/TP'])
         env.Append(CPPFLAGS=['/DMSVC', '/GR', ])
         env.Append(CPPFLAGS=['/DMSVC', '/GR', ])
         env.Append(CCFLAGS=['/I' + os.getenv("WindowsSdkDir") + "/Include"])
         env.Append(CCFLAGS=['/I' + os.getenv("WindowsSdkDir") + "/Include"])

+ 1 - 0
servers/visual/rasterizer.h

@@ -886,6 +886,7 @@ public:
 	};
 	};
 
 
 	virtual void canvas_begin() = 0;
 	virtual void canvas_begin() = 0;
+	virtual void canvas_end() = 0;
 
 
 	virtual void canvas_render_items(Item *p_item_list, int p_z, const Color &p_modulate, Light *p_light) = 0;
 	virtual void canvas_render_items(Item *p_item_list, int p_z, const Color &p_modulate, Light *p_light) = 0;
 	virtual void canvas_debug_viewport_shadows(Light *p_lights_with_shadow) = 0;
 	virtual void canvas_debug_viewport_shadows(Light *p_lights_with_shadow) = 0;

+ 3 - 0
servers/visual/visual_server_canvas.cpp

@@ -231,6 +231,9 @@ void VisualServerCanvas::render_canvas(Canvas *p_canvas, const Transform2D &p_tr
 			}
 			}
 		}
 		}
 	}
 	}
+
+	VSG::canvas_render->canvas_end();
+
 }
 }
 
 
 RID VisualServerCanvas::canvas_create() {
 RID VisualServerCanvas::canvas_create() {