Remove SceneOpenGL::Window::renderQuads()

Leftover from the OpenGL 1.x backend.
This commit is contained in:
Fredrik Höglund 2014-07-30 16:19:13 +02:00
parent c9aacbc460
commit 3d3a52c32d
2 changed files with 0 additions and 40 deletions

View file

@ -998,36 +998,6 @@ GLTexture *SceneOpenGL::Window::getDecorationTexture() const
return texture;
}
void SceneOpenGL::Window::renderQuads(int, const QRegion& region, const WindowQuadList& quads,
GLTexture *tex, bool normalized)
{
if (quads.isEmpty())
return;
const QMatrix4x4 matrix = tex->matrix(normalized ? NormalizedCoordinates : UnnormalizedCoordinates);
// Render geometry
GLenum primitiveType;
int primcount;
if (GLVertexBuffer::supportsIndexedQuads()) {
primitiveType = GL_QUADS;
primcount = quads.count() * 4;
} else {
primitiveType = GL_TRIANGLES;
primcount = quads.count() * 6;
}
GLVertexBuffer *vbo = GLVertexBuffer::streamingBuffer();
vbo->setVertexCount(primcount);
GLVertex2D *map = (GLVertex2D *) vbo->map(primcount * sizeof(GLVertex2D));
quads.makeInterleavedArrays(primitiveType, map, matrix);
vbo->unmap();
vbo->render(region, primitiveType, m_hardwareClipping);
}
WindowPixmap* SceneOpenGL::Window::createWindowPixmap()
{
return new OpenGLWindowPixmap(this, m_scene);

View file

@ -209,16 +209,6 @@ protected:
QMatrix4x4 transformation(int mask, const WindowPaintData &data) const;
GLTexture *getDecorationTexture() const;
void renderQuads(int, const QRegion& region, const WindowQuadList& quads, GLTexture* tex, bool normalized);
/**
* @brief Prepare the OpenGL rendering state before the texture with @p type will be rendered.
*
* @param type The type of the Texture which will be rendered
* @param opacity The opacity value to use for this rendering
* @param brightness The brightness value to use for this rendering
* @param saturation The saturation value to use for this rendering
* @param screen The index of the screen to use for this rendering
**/
virtual void prepareStates(TextureType type, qreal opacity, qreal brightness, qreal saturation, int screen) = 0;
/**
* @brief Restores the OpenGL rendering state after the texture with @p type has been rendered.