62 "attribute highp vec4 a_Pos;"
63 "attribute lowp vec4 a_Color;"
64 "varying lowp vec4 v_Color;"
66 " gl_Position = a_Pos;"
70 "varying lowp vec4 v_Color;"
72 " gl_FragColor = v_Color;"
78 functions->
glClear(GL_COLOR_BUFFER_BIT);
84 float coords[] = { -0.7f, 0.7f,
88 float colors[] = { 1, 0, 0, 1,
146 p.fillPath(
path, lg);
156 int main(
int argc,
char **argv)
163 for (
int i=0;
i<4; ++
i) {
165 bool opacity =
i & 0x2;
173 window->setGeometry(100 + 100 *
i, 200, 80, 80);
small capitals from c petite p scientific i
[1]
GLWindow(Qt::WindowFlags flags)
void mousePressEvent(QMouseEvent *)
void exposeEvent(QExposeEvent *)
The QApplication class manages the GUI application's control flow and main settings.
The QColor class provides colors based on RGB, HSV or CMYK values.
The QExposeEvent class contains event parameters for expose events. \inmodule QtGui.
void setColorAt(qreal pos, const QColor &color)
The QLinearGradient class is used in combination with QBrush to specify a linear gradient brush.
The QMouseEvent class contains parameters that describe a mouse event.
The QOpenGLContext class represents a native OpenGL context, enabling OpenGL rendering on a QSurface.
bool makeCurrent(QSurface *surface)
void setFormat(const QSurfaceFormat &format)
QOpenGLFunctions * functions() const
void swapBuffers(QSurface *surface)
The QOpenGLFunctions class provides cross-platform access to the OpenGL ES 2.0 API.
void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
void glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
void glDrawArrays(GLenum mode, GLint first, GLsizei count)
void glClear(GLbitfield mask)
The QOpenGLShaderProgram class allows OpenGL shader programs to be linked and used.
bool addShaderFromSourceCode(QOpenGLShader::ShaderType type, const char *source)
void enableAttributeArray(int location)
void disableAttributeArray(int location)
void setAttributeArray(int location, const GLfloat *values, int tupleSize, int stride=0)
The QPaintEvent class contains event parameters for paint events. \inmodule QtGui.
The QPainter class performs low-level painting on widgets and other paint devices.
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
The QRegion class specifies a clip region for a painter.
The QWindow class represents a window in the underlying windowing system.
int width
the width of the window's geometry
int height
the height of the window's geometry
@ WA_TranslucentBackground
GLfloat GLfloat GLfloat w
[0]
GLsizei const GLubyte GLsizei GLenum const void * coords
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLint GLsizei GLsizei GLenum format
GLfloat GLfloat GLfloat GLfloat h
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint GLdouble GLdouble w2
GLsizei const GLchar *const * path
QApplication app(argc, argv)
[0]
int main(int argc, char **argv)
[1]