00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include <GL/glut.h>
00011
00012 #ifdef OPENGL_VERSION_1
00013 #define glGenTextures glGenTexturesEXT
00014 #define glBindTexture glBindTextureEXT
00015 #define glIsTexture glIsTextureEXT
00016 #define glDeleteTextures glDeleteTexturesEXT
00017 #define glCopyTexImage2D glCopyTexImage2DEXT
00018 #endif
00019
00020 GLuint CreateTextureObjFromColorBuffer(GLubyte *Color, int Width, int Height,
00021 GLfloat WrapMode=GL_REPEAT,
00022 GLfloat InterpMode=GL_LINEAR,
00023 GLint internalFormat=GL_RGB,
00024 GLenum format=GL_RGB);
00025
00026
00027
00028 GLuint CreateTextureObjFromColorBuffer(GLubyte *Color, int Width, int Height,
00029 GLfloat WrapMode,
00030 GLfloat InterpMode,
00031 bool UseAlpha);
00032
00033 GLuint CreateTextureObjFromColorBuffer(int Width, int Height,
00034 GLint ReadBuffer,
00035 GLfloat WrapMode=GL_REPEAT,
00036 GLfloat InterpMode=GL_LINEAR,
00037 bool UseAlpha=false);
00038
00039 GLuint CreateTextureObjFromDepthBuffer(GLubyte *Depth, int Width, int Height,
00040 GLfloat WrapMode=GL_REPEAT,
00041 GLfloat InterpMode=GL_LINEAR);
00042
00043 GLuint CreateTextureObjFromDepthBuffer(int Width, int Height,
00044 GLint ReadBuffer,
00045 GLfloat WrapMode=GL_REPEAT,
00046 GLfloat InterpMode=GL_LINEAR);
00047
00048 void DeleteTextureObj(GLuint TexID);
00049 int TextureObjExists(GLuint TexID);
00050 void DrawTextureObj(GLuint TexID, int Width, int Height);
00051
00052