00001
00002
00003
00004
00005
00006
00007 #ifndef GLBUFFERS_H
00008 #define GLBUFFERS_H
00009
00010 #include <GL/glut.h>
00011 #include <stdio.h>
00012
00013 #ifdef W
00014 #undef W
00015 #endif
00016
00017 inline void SetPixel(const GLubyte *Color,
00018 const int x, const int y,
00019 GLubyte *ColorBuffer,
00020 const int Width);
00021 void DrawBorder(const GLubyte *C, GLubyte *ColorBuffer, const int W,
00022 const int H);
00023 void SaveColorBuffer(GLubyte* &Color, int &Width, int &Height,
00024 const GLint ReadBuffer=GL_BACK);
00025 void SaveAlphaBuffer(GLubyte* &Alpha, int &Width, int &Height,
00026 const GLint ReadBuffer=GL_BACK);
00027
00028 void SaveColorBufferToPPM(char *FileName, const GLint ReadBuffer=GL_BACK);
00029
00030 void DrawColorBuffer(GLubyte *Color, int Width, int Height,
00031 const GLint DrawBuffer=GL_BACK);
00032
00033 inline void SetPixel(const GLfloat Depth,
00034 const int x, const int y,
00035 GLfloat *DepthBuffer,
00036 const int Width);
00037 void SaveDepthBuffer(GLfloat* &Depth, int &Width, int &Height,
00038 const GLint ReadBuffer=GL_BACK);
00039 void DrawDepthBuffer(GLfloat *Depth, int Width, int Height,
00040 const GLint DrawBuffer=GL_BACK);
00041
00042
00043 #endif