Commit e639b4a4 authored by Martin Flöser's avatar Martin Flöser
Browse files

Make KWin-GLES branch compile with desktop GL

parent 12ef5617
......@@ -103,6 +103,7 @@ glUniform1fv_func glUniform1fv;
glUniform2fv_func glUniform2fv;
glUniform3fv_func glUniform3fv;
glUniform4fv_func glUniform4fv;
glGetUniformfv_func glGetUniformfv;
glUniformMatrix4fv_func glUniformMatrix4fv;
glValidateProgram_func glValidateProgram;
glGetUniformLocation_func glGetUniformLocation;
......@@ -267,6 +268,7 @@ void glResolveFunctions()
GL_RESOLVE_WITH_EXT( glVertexAttrib1f, glVertexAttrib1fARB );
GL_RESOLVE_WITH_EXT( glGetAttribLocation, glGetAttribLocationARB );
GL_RESOLVE_WITH_EXT( glBindAttribLocation, glBindAttribLocationARB );
GL_RESOLVE_WITH_EXT( glGetUniformfv, glGetUniformfvARB );
}
if( hasGLExtension( "GL_ARB_fragment_program" ) && hasGLExtension( "GL_ARB_vertex_program" ))
{
......
......@@ -286,6 +286,7 @@ typedef GLvoid (*glUniform2fv_func)(GLint, GLsizei, const GLfloat*);
typedef GLvoid (*glUniform3fv_func)(GLint, GLsizei, const GLfloat*);
typedef GLvoid (*glUniform4fv_func)(GLint, GLsizei, const GLfloat*);
typedef GLvoid (*glUniformMatrix4fv_func)(GLint, GLsizei, GLboolean, const GLfloat*);
typedef GLvoid (*glGetUniformfv_func)(GLuint, GLint, GLfloat*);
typedef GLvoid (*glValidateProgram_func)(GLuint);
typedef GLint (*glGetUniformLocation_func)(GLuint, const GLchar*);
typedef GLvoid (*glVertexAttrib1f_func)(GLuint, GLfloat);
......@@ -319,6 +320,7 @@ extern KWIN_EXPORT glUniform1fv_func glUniform1fv;
extern KWIN_EXPORT glUniform2fv_func glUniform2fv;
extern KWIN_EXPORT glUniform3fv_func glUniform3fv;
extern KWIN_EXPORT glUniform4fv_func glUniform4fv;
extern KWIN_EXPORT glGetUniformfv_func glGetUniformfv;
extern KWIN_EXPORT glUniformMatrix4fv_func glUniformMatrix4fv;
extern KWIN_EXPORT glValidateProgram_func glValidateProgram;
extern KWIN_EXPORT glGetUniformLocation_func glGetUniformLocation;
......
......@@ -95,7 +95,6 @@ SceneOpenGL::SceneOpenGL( Workspace* ws )
debug = qstrcmp( qgetenv( "KWIN_GL_DEBUG" ), "1" ) == 0;
// scene shader setup
GLPlatform::instance()->detect();
if( GLPlatform::instance()->supports( GLSL ) )
{
if (!ShaderManager::instance()->isValid()) {
......@@ -898,7 +897,7 @@ bool SceneOpenGL::Texture::load( const Pixmap& pix, const QSize& size,
}
if( options->glStrictBinding )
// Mark the texture as damaged so it will be updated on the next call to bind()
damaged = true;
glXBindTexImageEXT( display(), glxpixmap, GLX_FRONT_LEFT_EXT, NULL );
}
else if( shm_mode )
{ // copy pixmap contents to a texture via shared memory
......
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