PythonQtWrapper_QGLFramebufferObject.h
68 lines
| 3.9 KiB
| text/x-c
|
CLexer
florianlink
|
r13 | #ifndef PYTHONQTWRAPPER_QGLFRAMEBUFFEROBJECT_H | ||
#define PYTHONQTWRAPPER_QGLFRAMEBUFFEROBJECT_H | ||||
#include <qglframebufferobject.h> | ||||
#include <QObject> | ||||
florianlink
|
r24 | #include <PythonQt.h> | ||
florianlink
|
r13 | #include <QVariant> | ||
#include <qglframebufferobject.h> | ||||
#include <qimage.h> | ||||
#include <qpaintdevice.h> | ||||
#include <qpaintengine.h> | ||||
#include <qpoint.h> | ||||
#include <qrect.h> | ||||
#include <qsize.h> | ||||
florianlink
|
r24 | class PythonQtShell_QGLFramebufferObject : public QGLFramebufferObject | ||
{ | ||||
public: | ||||
PythonQtShell_QGLFramebufferObject(const QSize& size, QGLFramebufferObject::Attachment attachment, unsigned int target = 0x0DE1, unsigned int internal_format = 0x8058):QGLFramebufferObject(size, attachment, target, internal_format),_wrapper(NULL) {}; | ||||
PythonQtShell_QGLFramebufferObject(const QSize& size, unsigned int target = 0x0DE1):QGLFramebufferObject(size, target),_wrapper(NULL) {}; | ||||
PythonQtShell_QGLFramebufferObject(int width, int height, QGLFramebufferObject::Attachment attachment, unsigned int target = 0x0DE1, unsigned int internal_format = 0x8058):QGLFramebufferObject(width, height, attachment, target, internal_format),_wrapper(NULL) {}; | ||||
PythonQtShell_QGLFramebufferObject(int width, int height, unsigned int target = 0x0DE1):QGLFramebufferObject(width, height, target),_wrapper(NULL) {}; | ||||
virtual int devType() const; | ||||
virtual int metric(QPaintDevice::PaintDeviceMetric metric) const; | ||||
virtual QPaintEngine* paintEngine() const; | ||||
PythonQtInstanceWrapper* _wrapper; | ||||
}; | ||||
class PythonQtPublicPromoter_QGLFramebufferObject : public QGLFramebufferObject | ||||
{ public: | ||||
florianlink
|
r28 | inline int promoted_devType() const { return QGLFramebufferObject::devType(); } | ||
inline int promoted_metric(QPaintDevice::PaintDeviceMetric metric) const { return QGLFramebufferObject::metric(metric); } | ||||
inline QPaintEngine* promoted_paintEngine() const { return QGLFramebufferObject::paintEngine(); } | ||||
florianlink
|
r24 | }; | ||
florianlink
|
r13 | class PythonQtWrapper_QGLFramebufferObject : public QObject | ||
{ Q_OBJECT | ||||
public: | ||||
Q_ENUMS(Attachment ) | ||||
enum Attachment{ | ||||
NoAttachment = QGLFramebufferObject::NoAttachment, CombinedDepthStencil = QGLFramebufferObject::CombinedDepthStencil, Depth = QGLFramebufferObject::Depth}; | ||||
public slots: | ||||
QGLFramebufferObject* new_QGLFramebufferObject(const QSize& size, QGLFramebufferObject::Attachment attachment, unsigned int target = 0x0DE1, unsigned int internal_format = 0x8058); | ||||
QGLFramebufferObject* new_QGLFramebufferObject(const QSize& size, unsigned int target = 0x0DE1); | ||||
QGLFramebufferObject* new_QGLFramebufferObject(int width, int height, QGLFramebufferObject::Attachment attachment, unsigned int target = 0x0DE1, unsigned int internal_format = 0x8058); | ||||
QGLFramebufferObject* new_QGLFramebufferObject(int width, int height, unsigned int target = 0x0DE1); | ||||
void delete_QGLFramebufferObject(QGLFramebufferObject* obj) { delete obj; } | ||||
florianlink
|
r24 | bool release(QGLFramebufferObject* theWrappedObject); | ||
florianlink
|
r73 | int devType(QGLFramebufferObject* theWrappedObject) const; | ||
florianlink
|
r13 | bool isValid(QGLFramebufferObject* theWrappedObject) const; | ||
florianlink
|
r24 | QImage toImage(QGLFramebufferObject* theWrappedObject) const; | ||
int metric(QGLFramebufferObject* theWrappedObject, QPaintDevice::PaintDeviceMetric metric) const; | ||||
florianlink
|
r13 | QPaintEngine* paintEngine(QGLFramebufferObject* theWrappedObject) const; | ||
florianlink
|
r24 | QGLFramebufferObject::Attachment attachment(QGLFramebufferObject* theWrappedObject) const; | ||
void drawTexture(QGLFramebufferObject* theWrappedObject, const QRectF& target, unsigned int textureId, unsigned int textureTarget = 0x0DE1); | ||||
bool static_QGLFramebufferObject_hasOpenGLFramebufferObjects(); | ||||
florianlink
|
r73 | QSize size(QGLFramebufferObject* theWrappedObject) const; | ||
unsigned int texture(QGLFramebufferObject* theWrappedObject) const; | ||||
unsigned int handle(QGLFramebufferObject* theWrappedObject) const; | ||||
bool bind(QGLFramebufferObject* theWrappedObject); | ||||
void drawTexture(QGLFramebufferObject* theWrappedObject, const QPointF& point, unsigned int textureId, unsigned int textureTarget = 0x0DE1); | ||||
florianlink
|
r13 | }; | ||
#endif // PYTHONQTWRAPPER_QGLFRAMEBUFFEROBJECT_H | ||||