Closed
Bug 891204
Opened 11 years ago
Closed 9 years ago
GFX shaders fail to compile when creating a OpenGL 3.2 Core profile
Categories
(Core :: Graphics: Layers, defect)
Core
Graphics: Layers
Tracking
()
RESOLVED
FIXED
People
(Reporter: guillaume.abadie, Unassigned)
References
Details
Attachments
(1 file)
1.93 KB,
text/plain
|
Details |
WebGL 2 prototype require an OpenGL 3.0 context or higher.
On Mac OS X, to get a OpenGL 3.0 context, we have to create a 3.2 core profile. But shaders are not compatible with 3.2 core profile.
Note that some WebGL 2 features like sampler objects would need a 3.3 context if note available by extension. So on Mac OS X, we would need to create a 4.3 context because they are only Core Profile.
To reproduce the bug, add the 2 following lines in GLContextProviderCGL.mm:62 :
NSOpenGLPFAOpenGLProfile,
NSOpenGLProfileVersion3_2Core,
Can surly be reproduced on other OS by the same way.
Reporter | ||
Updated•11 years ago
|
Attachment #772436 -
Attachment mime type: text/x-log → text/plain
You may be able to get around this by adding a "#version 110" to the start of each shader in the text file (or modifying the script that generates the header file to insert it, which would be easier)
Comment 2•11 years ago
|
||
Vlad's suggestion should work as the short-term fix for this.
Component: Graphics → Graphics: Layers
Summary: GFX shaders compilation fail when creating a OpenGL Core profil needed by WebGL2 → GFX shaders fail to compile when creating a OpenGL 3.2 Core profile
Reporter | ||
Comment 3•11 years ago
|
||
(In reply to Vladimir Vukicevic [:vlad] [:vladv] from comment #1)
> You may be able to get around this by adding a "#version 110" to the start
> of each shader in the text file (or modifying the script that generates the
> header file to insert it, which would be easier)
That doesn't work either, I'm getting :
ERROR: 0:2: '' : version '110' is not supported
ERROR: 0:3: '' : #version required and missing.
ERROR: 0:18: 'varying' : syntax error syntax error
I think it's because the 3.2 core profile is only looking for GLSL 1.5.
Comment 4•11 years ago
|
||
GLSL preprocessor commands are a little weird. Check out this post about a similar problem on Mac:
http://stackoverflow.com/questions/8540489/glsl-version-gives-syntax-error-lwjgl-on-mac
Alternatively, check the 3.2 spec and GLSL specs themselves.
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•