2013-01-13 23:29:42 +00:00
|
|
|
#ifndef QTEMUGL_H
|
|
|
|
#define QTEMUGL_H
|
|
|
|
|
|
|
|
#include "gfx_es2/glsl_program.h"
|
|
|
|
#include <QGLWidget>
|
|
|
|
#include "EmuThread.h"
|
|
|
|
|
|
|
|
class QtEmuGL : public QGLWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit QtEmuGL(QWidget *parent = 0);
|
|
|
|
void init(InputState* inputState);
|
|
|
|
|
|
|
|
void SetRunning(bool value);
|
|
|
|
|
|
|
|
void start_rendering();
|
|
|
|
void stop_rendering();
|
2013-02-05 21:22:14 +00:00
|
|
|
void start_game(QString filename);
|
|
|
|
void stop_game();
|
|
|
|
void LockDraw(bool value);
|
2013-02-10 15:36:06 +00:00
|
|
|
signals:
|
|
|
|
void doubleClick();
|
2013-01-13 23:29:42 +00:00
|
|
|
protected:
|
|
|
|
void initializeGL();
|
|
|
|
|
|
|
|
void paintGL();
|
|
|
|
void resizeEvent(QResizeEvent *evt);
|
|
|
|
void paintEvent(QPaintEvent *);
|
|
|
|
void closeEvent(QCloseEvent *evt);
|
2013-02-10 15:36:06 +00:00
|
|
|
void mouseDoubleClickEvent(QMouseEvent *);
|
2013-01-13 23:29:42 +00:00
|
|
|
signals:
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool running_;
|
|
|
|
EmuThread thread;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QTEMUGL_H
|