Merge lp:~compiz-team/compiz/compiz.fix_1095915 into lp:compiz/0.9.9

Proposed by Sam Spilsbury
Status: Merged
Approved by: Daniel van Vugt
Approved revision: 3537
Merged at revision: 3540
Proposed branch: lp:~compiz-team/compiz/compiz.fix_1095915
Merge into: lp:compiz/0.9.9
Diff against target: 12 lines (+1/-1)
1 file modified
plugins/opengl/src/screen.cpp (+1/-1)
To merge this branch: bzr merge lp:~compiz-team/compiz/compiz.fix_1095915
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Daniel van Vugt Approve
Review via email: mp+141851@code.launchpad.net

Commit message

Fix definition of glShaderSource function pointer.

Its GLvoid glShaderSource (GLuint, GLsizei, const GLchar * const *, const GLint *); in the header file, not GLvoid glShaderSource (GLuint, GLsizei, const GLchar **, const GLint *); like the specification.

Use a function pointer cast to work around it.

(LP: #1095915)

Description of the change

Fix definition of glShaderSource function pointer.

Its GLvoid glShaderSource (GLuint, GLsizei, const GLchar * const *, const GLint *); in the header file, not GLvoid glShaderSource (GLuint, GLsizei, const GLchar **, const GLint *); like the specification.

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) :
review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

BUILD_GLES:

/home/dan/bzr/compiz/tmp.915/plugins/opengl/src/screen.cpp: In member function ‘bool GLScreen::glInitContext(XVisualInfo*)’:
/home/dan/bzr/compiz/tmp.915/plugins/opengl/src/screen.cpp:547:24: error: invalid conversion from ‘void (*)(GLuint, GLsizei, const GLchar**, const GLint*) {aka void (*)(unsigned int, int, const char**, const int*)}’ to ‘GL::GLShaderSourceProc {aka void (*)(unsigned int, int, const char* const*, const int*)}’ [-fpermissive]

review: Needs Fixing
3536. By Sam Spilsbury

Cast to GLShaderSourceProc instead.

Its evil but not that evil

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

It seems like the function signature changed between mesa versions incorrectly.

I've filed a bug upstream and am using a function pointer cast to work around it for now.

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Fixing the useless indentation change now ... 2 minutes ...

3537. By Sam Spilsbury

Remove indentation change

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Much nicer. Fix indentation change?

review: Needs Fixing
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Ah you did it

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

GLES is happy on quantal now.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/opengl/src/screen.cpp'
2--- plugins/opengl/src/screen.cpp 2013-01-01 09:41:41 +0000
3+++ plugins/opengl/src/screen.cpp 2013-01-04 07:52:22 +0000
4@@ -544,7 +544,7 @@
5 GL::getProgramiv = glGetProgramiv;
6 GL::getProgramInfoLog = glGetProgramInfoLog;
7 GL::createShader = glCreateShader;
8- GL::shaderSource = glShaderSource;
9+ GL::shaderSource = (GL::GLShaderSourceProc) glShaderSource;
10 GL::compileShader = glCompileShader;
11 GL::createProgram = glCreateProgram;
12 GL::attachShader = glAttachShader;

Subscribers

People subscribed via source and target branches