22 m_projection.setToIdentity();
23 m_projection.perspective(45.0f,
w /
float(
h), 0.01f, 100.0f);
88 : m_program(0), m_shader(0), m_texture(0)
93MyGLWidget::~MyGLWidget()
129MyGLWidget::~MyGLWidget()
140void MyGLWidget::cleanup()
158 format.setStencilBufferSize(8);
The QApplication class manages the GUI application's control flow and main settings.
static int exec()
Enters the main event loop and waits until exit() is called, then returns the value that was set to e...
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
The QOpenGLBuffer class provides functions for creating and managing OpenGL buffer objects.
bool bind()
Binds the buffer associated with this object to the current OpenGL context.
bool create()
Creates the buffer object in the OpenGL server.
void allocate(const void *data, int count)
Allocates count bytes of space to the buffer, initialized to the contents of data.
void destroy()
Destroys this buffer object, including the storage being used in the OpenGL server.
void aboutToBeDestroyed()
This signal is emitted before the underlying native OpenGL context is destroyed, such that users may ...
static QOpenGLContext * currentContext()
Returns the last context which called makeCurrent in the current thread, or \nullptr,...
QOpenGLFunctions * functions() const
Get the QOpenGLFunctions instance for this context.
void glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount)
The QOpenGLFunctions class provides cross-platform access to the OpenGL ES 2.0 API.
void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
Convenience function that calls glClearColor(red, green, blue, alpha).
void glClear(GLbitfield mask)
Convenience function that calls glClear(mask).
void initializeOpenGLFunctions()
Initializes OpenGL function resolution for the current context.
The QOpenGLShaderProgram class allows OpenGL shader programs to be linked and used.
The QOpenGLShader class allows OpenGL shaders to be compiled.
The QOpenGLVertexArrayObject class wraps an OpenGL Vertex Array Object.
void destroy()
Destroys the underlying OpenGL vertex array object.
bool create()
Creates the underlying OpenGL vertex array object.
bool isCreated() const
Returns true is the underlying OpenGL vertex array object has been created.
void bind()
Binds this vertex array object to the OpenGL binding point.
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei GLenum format
GLfloat GLfloat GLfloat GLfloat h
myObject disconnect()
[26]
QApplication app(argc, argv)
[0]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent