Ticket #98: texture.d.patch98

File texture.d.patch98, 0.6 kB (added by cyhawk, 3 years ago)
Line 
1 --- texture.d.orig  2009-02-26 16:13:50.781250000 +0100
2 +++ texture.d.ticket98  2009-02-27 11:29:22.359375000 +0100
3 @@ -289,11 +289,12 @@
4  ///
5  void updateTexture(inout Texture tex, Point origin, Size size, ubyte[] data)
6  {
7 +   glPushAttrib(GL_TEXTURE_2D);
8     glEnable(GL_TEXTURE_2D);
9     glBindTexture(GL_TEXTURE_2D, tex.getID);
10    
11     const int level = 0;
12     glTexSubImage2D(GL_TEXTURE_2D, level, cast(int)origin.x, cast(int)origin.y, cast(int)size.w, cast(int)size.h, GL_RGBA, GL_UNSIGNED_BYTE, data.ptr);
13    
14 -   glDisable(GL_TEXTURE_2D);
15 +   glPopAttrib(GL_TEXTURE_2D);
16  }