johnshu / coral-repo

Automatically exported from code.google.com/p/coral-repo
0 stars 0 forks source link

ShaderNode::recompileShader() is executed even if there is no OpenGL context #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I just had a segfault trying to investigate on another segfault. :D

- I launch coral without viewport (never launched at all).
- Select "Shader1" node and see the message "Ready to do some shading!"
- I and click on "Compile Shader".
- it crash.

After investigation it crash at:

GLuint vertexShader = glCreateShader(GL_VERTEX_SHADER);

The first OpenGL function actually.

And there is no OpenGL context.

I this the log message could write:

No Viewport available, can't compile shader.

Or something similar.

Original issue reported on code.google.com by dorian.f...@gmail.com on 12 Feb 2012 at 3:15

GoogleCodeExporter commented 8 years ago
Ouch, my bad, I'll fix this now.

Original comment by aintergu...@gmail.com on 12 Feb 2012 at 3:28

GoogleCodeExporter commented 8 years ago
this should be fixed with latest commit.

Original comment by aintergu...@gmail.com on 12 Feb 2012 at 4:35

GoogleCodeExporter commented 8 years ago
It's ok now! Thanks Andrea!

Original comment by dorian.f...@gmail.com on 13 Feb 2012 at 12:13