git-svn-id: svn://db.shs.com.ru/libs@260 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -1,18 +1,29 @@
|
||||
#ifndef UGLWIDGET_H
|
||||
#define UGLWIDGET_H
|
||||
|
||||
#include <QGLWidget>
|
||||
#ifndef GL_MULTISAMPLE
|
||||
#define GL_MULTISAMPLE 0x809D
|
||||
#include <QWidget>
|
||||
#if QT_VERSION >= 0x050400
|
||||
# include <QOpenGLWidget>
|
||||
typedef QOpenGLWidget __GLWidget__;
|
||||
#else
|
||||
# include <QGLWidget>
|
||||
typedef QGLWidget __GLWidget__;
|
||||
# ifndef GL_MULTISAMPLE
|
||||
# define GL_MULTISAMPLE 0x809D
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
class UGLWidget: public QGLWidget
|
||||
class UGLWidget: public __GLWidget__
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
UGLWidget(QWidget * parent = 0): QGLWidget(QGLFormat(QGL::DoubleBuffer | QGL::AlphaChannel | QGL::DirectRendering | QGL::SampleBuffers), parent) {};
|
||||
UGLWidget(QGLContext * context, QWidget * parent = 0): QGLWidget(context, parent) {};
|
||||
UGLWidget(QWidget * parent = 0): __GLWidget__(/*QGLFormat(QGL::DoubleBuffer | QGL::AlphaChannel | QGL::DirectRendering | QGL::SampleBuffers),*/ parent) {}
|
||||
//UGLWidget(QGLContext * context, QWidget * parent = 0): __GLWidget__(context, parent) {}
|
||||
|
||||
#if QT_VERSION >= 0x050400
|
||||
QImage grabFrameBuffer() {return grabFramebuffer();}
|
||||
#endif
|
||||
|
||||
signals:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
|
||||
Reference in New Issue
Block a user