Advertisement
Guest User

gltest.h

a guest
Dec 9th, 2011
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. #ifndef GLTEST_H
  2. #define GLTEST_H
  3.  
  4. #include <QGLWidget>
  5. #include "ui_gltest.h"
  6.  
  7. class GLTest : public QGLWidget
  8. {
  9.     Q_OBJECT
  10.  
  11. public:
  12.     GLTest(QWidget *parent = 0);
  13.     ~GLTest();
  14.  
  15. protected:
  16.     void initializeGL(void);
  17.     void resizeGL(int width, int height);
  18.     void paintGL(void);
  19.  
  20. private:
  21.     //set up the projection matrix and viewport for 3d rendering
  22.     void setupViewport(int width, int height);
  23.  
  24.     //intialize the moxModel1 display list to a box with the given color
  25.     void makeModel(const QRgb &color);
  26.  
  27.     Ui::GLTestClass ui;
  28.  
  29.     GLuint model;
  30.     GLuint index;
  31.  
  32.     const static int NUM_VERTICES=3;
  33.     const static int NUM_INDEXES=3;
  34. };
  35.  
  36. struct CompleteVertex
  37. {
  38.     float px,py,pz; //0 to 11
  39.     unsigned char r,g,b,a; //12 to 15
  40. };
  41.  
  42. #endif // GLTEST_H
  43.  
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement