Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef GLTEST_H
- #define GLTEST_H
- #include <QGLWidget>
- #include "ui_gltest.h"
- class GLTest : public QGLWidget
- {
- Q_OBJECT
- public:
- GLTest(QWidget *parent = 0);
- ~GLTest();
- protected:
- void initializeGL(void);
- void resizeGL(int width, int height);
- void paintGL(void);
- private:
- //set up the projection matrix and viewport for 3d rendering
- void setupViewport(int width, int height);
- //intialize the moxModel1 display list to a box with the given color
- void makeModel(const QRgb &color);
- Ui::GLTestClass ui;
- GLuint model;
- GLuint index;
- const static int NUM_VERTICES=3;
- const static int NUM_INDEXES=3;
- };
- struct CompleteVertex
- {
- float px,py,pz; //0 to 11
- unsigned char r,g,b,a; //12 to 15
- };
- #endif // GLTEST_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement