Răsfoiți Sursa

Android fixed RGBA16F texture format.

bkaradzic 12 ani în urmă
părinte
comite
492e99e1c3
2 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  1. 1 0
      src/glcontext_egl.cpp
  2. 4 0
      src/renderer_gl.cpp

+ 1 - 0
src/glcontext_egl.cpp

@@ -18,6 +18,7 @@ namespace bgfx
 
 	void GlContext::create(uint32_t _width, uint32_t _height)
 	{
+		BX_UNUSED(_width, _height);
 		EGLNativeDisplayType ndt = EGL_DEFAULT_DISPLAY;
 		EGLNativeWindowType nwt = (EGLNativeWindowType)NULL;
 #	if BX_PLATFORM_WINDOWS

+ 4 - 0
src/renderer_gl.cpp

@@ -1272,6 +1272,10 @@ namespace bgfx
 
 	static void texImage(GLenum _target, GLint _level, GLint _internalFormat, GLsizei _width, GLsizei _height, GLsizei _depth, GLint _border, GLenum _format, GLenum _type, const GLvoid* _data)
 	{
+#if !BGFX_CONFIG_RENDERER_OPENGL
+		_internalFormat = _format; // GLES wants internal format to match format...
+#endif // !BGFX_CONFIG_RENDERER_OPENGL
+
 #if BGFX_CONFIG_RENDERER_OPENGL|BGFX_CONFIG_RENDERER_OPENGLES3
 		if (_target == GL_TEXTURE_3D)
 		{