Morph-SynRJ
view cmn_texture.h @ 0:22de913c2d84
morph-synrj intro
| author | "Cedric Pinson <cedric.pinson@alcove.fr> <mornifle@plopbyte.net>" |
|---|---|
| date | Tue Nov 27 15:23:52 2007 +0100 (2007-11-27) |
| parents | |
| children |
line source
1 #ifndef CMN_TEXTURE_H
2 #define CMN_TEXTURE_H
4 #include "gl_header.h"
6 void txtBindTexture2d(GLuint _texture,int _unit);
7 void txtUnBindTexture2d(int _unit);
11 GLuint txtInitTexture(GLenum _internalFormat,int _width,int _height,void* _data,bool _clamp=false,GLenum _type=GL_UNSIGNED_BYTE);
14 GLuint txtLoadTextureFromMemory(int _name);
18 // Create an empty texture
19 GLuint txtCreateEmptyTexture(int _width,int _height);
22 typedef unsigned char uchar;
23 // defaut value for the back ground of screen1
24 GLuint txtCreatePerlin2d(int _width,int _height,float _scaleOnX=1.0,float _scaleOnY=1.0,float _amp=0.5,int _freq=6,uchar* _map=0);
26 // get a image in rgba format from backbuffer
27 typedef unsigned char uchar;
28 void txtGetTextureFromBackBuffer(void* _result,int _cornerX,int _cornerY,int _width,int _height);
31 GLuint txtCreateGrid(int _width,int _height,int _sizeofSquare,float _minValue);
34 GLuint txtCreateObliqueTexture(int _width,int _height,float _angle,const char* _text=0,char _letter=0);
37 GLuint txtCreateTextureFromLetter(int _width,int _height,char _letter);
39 GLuint txtCreateTextureCircular(int _width,int _height,float _radius,int _fade=0);
42 void CopyBackBufferToTexture(GLuint _destination,int _sizex,int _sizey,int _bgOffsetX=0,int _bgOffsetY=0,int _txtOffsetX=0,int _txtOffsetY=0);
44 #endif
