Changeset 1116
- Timestamp:
- 09/15/08 15:03:07
- Files:
-
- trunk/libs/opengl/api/opengl/GL.hx (modified) (1 diff)
- trunk/libs/opengl/src/additions.c (modified) (1 diff)
- trunk/xinf/inity/ColorSpace.hx (modified) (2 diffs)
- trunk/xinf/inity/Texture.hx (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libs/opengl/api/opengl/GL.hx
r1112 r1116 918 918 919 919 /** <nekobind><cptr name="pixels" type="unsigned char" min-size="(width*height)"/></nekobind> **/ 920 public static function texSubImageALPHA( target:Int, x:Int, y:Int, width:Int, height:Int, pixels:Dynamic ) :Void; 921 922 /** <nekobind><cptr name="pixels" type="unsigned char" min-size="(width*height)"/></nekobind> **/ 920 923 public static function texImageClearFT( target:Int, width:Int, height:Int ) :Void; 921 924 trunk/libs/opengl/src/additions.c
r1031 r1116 37 37 GL_LUMINANCE, GL_UNSIGNED_BYTE, (unsigned char *)data ); 38 38 // glPopClientAttrib(); 39 } 40 41 void glTexSubImageALPHA( unsigned int tex, int x, int y, int w, int h, const unsigned char *data ) { 42 glTexSubImage2D( GL_TEXTURE_2D, 0, x, y, w, h, 43 GL_ALPHA, GL_UNSIGNED_BYTE, (unsigned char *)data ); 39 44 } 40 45 trunk/xinf/inity/ColorSpace.hx
r1036 r1116 10 10 BGRA; 11 11 GRAY; 12 ALPHA; 12 13 Other(depth:Int,channels:Int); 13 14 } … … 18 19 return 19 20 switch( cs ) { 20 case RGB :21 case RGB,BGR: 21 22 width*3; 22 case RGBA :23 case RGBA,BGRA: 23 24 width*4; 24 case BGR: 25 width*3; 26 case BGRA: 27 width*4; 28 case GRAY: 25 case GRAY,ALPHA: 29 26 width; 30 27 case Other(d,c): trunk/xinf/inity/Texture.hx
r1063 r1116 49 49 case BGRA: GL.RGBA; 50 50 case GRAY: GL.LUMINANCE; 51 case ALPHA: 52 trace("INTENSITY!"); GL.INTENSITY; 51 53 default: GL.RGBA; 52 54 } … … 88 90 case GRAY: 89 91 GL.texSubImageGRAY( texture, pos.x, pos.y, size.x, size.y, data ); 92 case ALPHA: 93 GL.texSubImageALPHA( texture, pos.x, pos.y, size.x, size.y, data ); 90 94 default: 91 95 throw("unknown colorspace "+cspace );