Kaynağa Gözat

Merge pull request #1051 from rcmaniac25/opengl-fallback

Update define for #1043
Sean Paul Taylor 12 yıl önce
ebeveyn
işleme
5d2b2f8815
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 3 3
      gameplay/src/Texture.cpp

+ 3 - 3
gameplay/src/Texture.cpp

@@ -162,11 +162,11 @@ Texture* Texture::create(Format format, unsigned int width, unsigned int height,
     GL_ASSERT( glGenTextures(1, &textureId) );
     GL_ASSERT( glBindTexture(GL_TEXTURE_2D, textureId) );
     GL_ASSERT( glPixelStorei(GL_UNPACK_ALIGNMENT, 1) );
-#ifndef GL_ES_VERSION_2_0
+#ifndef OPENGL_ES
     // glGenerateMipmap is new in OpenGL 3.0. For OpenGL 2.0 we must fallback to use glTexParameteri 
     // with GL_GENERATE_MIPMAP prior to actual texture creation (glTexImage2D)
-    if( generateMipmaps && glGenerateMipmap == NULL )
-        GL_ASSERT( glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE ) );
+    if ( generateMipmaps && glGenerateMipmap == NULL )
+        GL_ASSERT( glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE) );
 #endif
     GL_ASSERT( glTexImage2D(GL_TEXTURE_2D, 0, (GLenum)format, width, height, 0, (GLenum)format, GL_UNSIGNED_BYTE, data) );