![]() |
Tulip
4.6.0
Better Visualization Through Research
|
00001 /* 00002 * 00003 * This file is part of Tulip (www.tulip-software.org) 00004 * 00005 * Authors: David Auber and the Tulip development Team 00006 * from LaBRI, University of Bordeaux 00007 * 00008 * Tulip is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation, either version 3 00011 * of the License, or (at your option) any later version. 00012 * 00013 * Tulip is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 * See the GNU General Public License for more details. 00017 * 00018 */ 00019 ///@cond DOXYGEN_HIDDEN 00020 00021 #ifndef Tulip_GLFEEDBACKBUILDER_H 00022 #define Tulip_GLFEEDBACKBUILDER_H 00023 00024 #if defined(_MSC_VER) 00025 #include <Windows.h> 00026 #endif 00027 00028 #if defined(__APPLE__) 00029 #include <OpenGL/gl.h> 00030 #include <OpenGL/glu.h> 00031 #else 00032 #include <GL/gl.h> 00033 #include <GL/glu.h> 00034 #endif 00035 00036 #include <tulip/tulipconf.h> 00037 #include <tulip/Vector.h> 00038 00039 namespace tlp { 00040 00041 //==================================================== 00042 typedef struct _FeedBack3Dcolor { 00043 GLfloat x; 00044 GLfloat y; 00045 GLfloat z; 00046 GLfloat red; 00047 GLfloat green; 00048 GLfloat blue; 00049 GLfloat alpha; 00050 } Feedback3Dcolor; 00051 00052 //==================================================== 00053 typedef struct _DepthIndex { 00054 GLfloat *ptr; 00055 GLfloat depth; 00056 } DepthIndex; 00057 00058 //==================================================== 00059 /** 00060 * Abstract class used to build a object with a OpenGl feedback buffer 00061 */ 00062 class TLP_GL_SCOPE GlFeedBackBuilder { 00063 00064 public: 00065 00066 virtual ~GlFeedBackBuilder() {} 00067 00068 virtual void begin(const Vector<int, 4> &) {} 00069 virtual void passThroughToken(GLfloat*) {} 00070 virtual void pointToken(GLfloat*) {} 00071 virtual void lineToken(GLfloat*) {} 00072 virtual void lineResetToken(GLfloat*) {} 00073 virtual void polygonToken(GLfloat*) {} 00074 virtual void bitmapToken(GLfloat*) {} 00075 virtual void drawPixelToken(GLfloat*) {} 00076 virtual void copyPixelToken(GLfloat*) {} 00077 virtual void end() {} 00078 00079 virtual void getResult(std::string* str) = 0; 00080 00081 }; 00082 00083 } 00084 00085 #endif // Tulip_GLFEEDBACKBUILDER_H 00086 ///@endcond