Kaydet (Commit) 5809f506 authored tarafından Caolán McNamara's avatar Caolán McNamara

rework diamond transition to use only opengl core

cause that's all we've got in gtk3

Change-Id: I6a47e344ccd39ba63e7a51ae18f89bb05bb642c4
Reviewed-on: https://gerrit.libreoffice.org/31496Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst be446eb6
......@@ -316,8 +316,6 @@ OGLTransitionImpl::displayUnbufferedSlide(
const sal_Int32 glSlideTex, const Primitives_t& primitives,
double SlideWidthScale, double SlideHeightScale )
{
CHECK_GL_ERROR();
glPushMatrix();
CHECK_GL_ERROR();
glBindTexture(GL_TEXTURE_2D, glSlideTex);
CHECK_GL_ERROR();
......@@ -336,8 +334,6 @@ OGLTransitionImpl::displayUnbufferedSlide(
CHECK_GL_ERROR();
glBindBuffer(GL_ARRAY_BUFFER, m_nVertexBufferObject);
CHECK_GL_ERROR();
glPopMatrix();
CHECK_GL_ERROR();
}
void OGLTransitionImpl::displayScene( double nTime, double SlideWidth, double SlideHeight, double DispWidth, double DispHeight )
......@@ -360,16 +356,30 @@ void Primitive::display(GLint primitiveTransformLocation, double nTime, double W
CHECK_GL_ERROR();
}
glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);
GLuint nVertexArrayObject;
glGenVertexArrays(1, &nVertexArrayObject);
CHECK_GL_ERROR();
glEnableClientState( GL_VERTEX_ARRAY );
glBindVertexArray(nVertexArrayObject);
CHECK_GL_ERROR();
glVertexPointer( 3, GL_FLOAT, sizeof(Vertex), &Vertices[0] );
GLuint nBuffer;
glGenBuffers(1, &nBuffer);
CHECK_GL_ERROR();
glBindBuffer(GL_ARRAY_BUFFER, nBuffer);
CHECK_GL_ERROR();
glBufferData(GL_ARRAY_BUFFER, getVerticesSize(), Vertices.data(), GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
CHECK_GL_ERROR();
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), nullptr);
CHECK_GL_ERROR();
glDrawArrays( GL_TRIANGLES, 0, Vertices.size() );
CHECK_GL_ERROR();
glPopClientAttrib();
glDeleteBuffers(1, &nBuffer);
CHECK_GL_ERROR();
glDeleteVertexArrays(1, &nVertexArrayObject);
CHECK_GL_ERROR();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment