Branimir Karadžić 9 роки тому
батько
коміт
407c37e8d3
2 змінених файлів з 3 додано та 3 видалено
  1. 1 1
      src/renderer_gl.cpp
  2. 2 2
      tools/shaderc/shaderc_glsl.cpp

+ 1 - 1
src/renderer_gl.cpp

@@ -5090,7 +5090,7 @@ namespace bgfx { namespace gl
 					uint32_t version =
 						  usesIUsamplers || usesTexelFetch ? 130
 						: usesTextureLod ? 120
-						: 0
+						: 120
 						;
 
 					if (0 != version)

+ 2 - 2
tools/shaderc/shaderc_glsl.cpp

@@ -10,7 +10,7 @@ namespace bgfx
 {
 	bool compileGLSLShader(bx::CommandLine& _cmdLine, uint32_t _gles, const std::string& _code, bx::WriterI* _writer)
 	{
-		char ch = tolower(_cmdLine.findOption('\0', "type")[0]);
+		char ch = char(tolower(_cmdLine.findOption('\0', "type")[0]) );
 		const glslopt_shader_type type = ch == 'f'
 			? kGlslOptShaderFragment
 			: (ch == 'c' ? kGlslOptShaderCompute : kGlslOptShaderVertex);
@@ -152,7 +152,7 @@ namespace bgfx
 						char arraySize[32];
 						const char* end = bx::strnstr(array, "]", eol-array);
 						bx::strlcpy(arraySize, array+1, end-array);
-						num = atoi(arraySize);
+						num = uint8_t(atoi(arraySize) );
 					}
 					else
 					{