Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

textureobj.hpp

00001 //============================================================================
00002 // textureobj.hpp : routines for handling the creation/deletion of texture
00003 // objects. The following routines are provided:
00004 //   1) creation of a texture object from an RGB color buffer
00005 //   2) creation of a texture object direction from an RGB framebuffer
00006 //   3) texture drawing routine
00007 //   4) texture object deletion and existence checking
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 // Kept for compatibility reasons with old GLVU.
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 

Generated at Fri Oct 12 15:12:21 2001 for GLVU by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001