sources:


website:
more info here


screenshot:
studies/grafik2/Computergrafik-Code9/Aufgabe23/cgcontour.h
download file

  1 //
  2 // Computergraphik II
  3 // Prof. Dr. Juergen Doellner
  4 // Wintersemester 2001/02
  5 //
  6 // Rahmenprogramm zu Aufgabenzettel 9
  7 //
  8
  9 #ifndef CG_CONTOUR_H
 10 #define CG_CONTOUR_H
 11
 12 #include "cgapplication.h"
 13
 14 class CGContour : public CGApplication {
 15 public:
 16     CGContour();
 17     virtual ~CGContour();
 18
 19     virtual void onInit();
 20     virtual void onDraw();       
 21     virtual void onIdle();
 22     virtual void onKey(unsigned char key);   
 23     virtual void onSize(unsigned int newWidth, unsigned int newHeight);
 24    
 25     void createTexture();
 26 private:
 27
 28     void drawScene();
 29     void drawFunction();
 30
 31     // dimension of viewport
 32     int width_;
 33     int height_;
 34
 35     double zoom_;
 36
 37     enum { TEXTURE_SIZE = 32 };
 38     GLubyte image_[TEXTURE_SIZE*3];
 39     GLuint texName_;
 40
 41     bool normals_;
 42     bool run_;
 43     bool light0_, light1_;
 44 };
 45
 46 #endif
 47
 48
 49