57 #if !defined(QT_OPENGL_ES_2) 63 :
QRectF(
QPointF(br.x(), texSize.height() - br.bottom()), br.size());
75 const GLfloat tx1 = src.
left();
76 const GLfloat tx2 = src.
right();
77 const GLfloat ty1 = src.
top();
78 const GLfloat ty2 = src.
bottom();
80 GLfloat texCoordArray[4*2] = {
81 tx1, ty2, tx2, ty2, tx2, ty1, tx1, ty1
84 GLfloat vertexArray[4*2];
85 vertexArray[0] = rect.
left(); vertexArray[1] = rect.
top();
86 vertexArray[2] = rect.
right(); vertexArray[3] = rect.
top();
87 vertexArray[4] = rect.
right(); vertexArray[5] = rect.
bottom();
88 vertexArray[6] = rect.
left(); vertexArray[7] = rect.
bottom();
93 glBindTexture(target, tex_id);
101 glBindTexture(target, 0);
qreal right() const
Returns the x-coordinate of the rectangle's right edge.
void setLeft(qreal pos)
Sets the left edge of the rectangle to the given x coordinate.
The QPointF class defines a point in the plane using floating point precision.
qreal left() const
Returns the x-coordinate of the rectangle's left edge.
void setTop(qreal pos)
Sets the top edge of the rectangle to the given y coordinate.
#define glVertexAttribPointer
void setBottom(qreal pos)
Sets the bottom edge of the rectangle to the given y coordinate.
#define glEnableVertexAttribArray
void setRight(qreal pos)
Sets the right edge of the rectangle to the given x coordinate.
static const QGLContext * currentContext()
Returns the current context, i.e.
int width() const
Returns the width.
The QRectF class defines a rectangle in the plane using floating point precision. ...
The QGLContext class encapsulates an OpenGL rendering context.
#define glDisableVertexAttribArray
int height() const
Returns the height.
static const GLuint QT_TEXTURE_COORDS_ATTR
qreal top() const
Returns the y-coordinate of the rectangle's top edge.
qreal bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
static const GLuint QT_VERTEX_COORDS_ATTR
bool isEmpty() const
Returns true if the rectangle is empty, otherwise returns false.