Qt_OpenGL:3D图形小测
//.h
#ifndef GLWIDGET_H
#define GLWIDGET_H
#include <QtOpenGL>
#include <QWidget>
class GLWidget : public QGLWidget
{
Q_OBJECT
public:
explicit GLWidget(QGLWidget *parent = 0);
~GLWidget();
protected:
void initializeGL();
void paintGL();
void resizeGL(int width, int height);
void keyPressEvent(QKeyEvent *e);
bool fullscreen;
private:
float triangle_rotate;
float circle_rotate;
float quads_rotate;
float rotate_angle1;
float rotate_angle2;
};