Gl Graph
Gl Graph Source of glimagerenderer.h
#ifndef GL_IMAGE_RENDERER_H #define GL_IMAGE_RENDERER_H #define GLX_GLXEXT_PROTOTYPES #include <stdio.h> #include <stdlib.h> #include <string.h> #include <GL/gl.h> #include <GL/glext.h> #include <GL/glx.h> #include <GL/glxext.h> #include <GL/glut.h> #include <time.h> #include <unistd.h> #include <X11/X.h> #include <X11/Xatom.h> #include <glrenderer.h> #include <drawableset.h> #include <glscene.h> class GlImageRenderer : public GlRenderer { private: Display *dpy; Window xWin; XEvent event; XVisualInfo *vInfo; XSetWindowAttributes swa; GLXFBConfig *fbConfigs; GLXContext context; GLXWindow glxWin; GlScene * scene; int swaMask; int numReturned; std::string filename; //image data unsigned char * data; public: GlImageRenderer(unsigned int width, unsigned int height, std::string filename); GlImageRenderer(unsigned int width, unsigned int height); void init(DrawableSet* set); void drawScene(); void drawText(); void run(); std::string getPngFileName() { return filename; }; }; #endif