Просмотр исходного кода

Merge pull request #1099 from rgngl/textureInitializerFix

Texture: Make the data buffer parameter in the initializer const.
Sean Paul Taylor 12 лет назад
Родитель
Сommit
8c46299022
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      gameplay/src/Texture.cpp
  2. 1 1
      gameplay/src/Texture.h

+ 1 - 1
gameplay/src/Texture.cpp

@@ -155,7 +155,7 @@ Texture* Texture::create(Image* image, bool generateMipmaps)
     }
 }
 
-Texture* Texture::create(Format format, unsigned int width, unsigned int height, unsigned char* data, bool generateMipmaps)
+Texture* Texture::create(Format format, unsigned int width, unsigned int height, const unsigned char* data, bool generateMipmaps)
 {
     // Create and load the texture.
     GLuint textureId;

+ 1 - 1
gameplay/src/Texture.h

@@ -177,7 +177,7 @@ public:
      * @return The new texture.
      * @script{create}
      */
-    static Texture* create(Format format, unsigned int width, unsigned int height, unsigned char* data, bool generateMipmaps = false);
+    static Texture* create(Format format, unsigned int width, unsigned int height, const unsigned char* data, bool generateMipmaps = false);
 
     /**
      * Creates a texture object to wrap the specified pre-created native texture handle.