TheCherno / Sparky

Cross-Platform High Performance 2D/3D game engine for people like me who like to write code.
Apache License 2.0
1.1k stars 223 forks source link

Assertion failed using OpenGL Render API #66

Closed ghost closed 8 years ago

ghost commented 8 years ago

Assertion failed in glshader.cpp, line 56 Condition: m_Handle in function GLShader::Init

This happens during the creation of pbrShader (in sandbox.cpp)

Gogsi commented 8 years ago

As I get this error as well, let me provide some more information:

Fragment shader failed to compile with the following errors:
ERROR: 0:151: error(#143) Undeclared identifier: A
ERROR: 0:152: error(#132) Syntax error: "return" parse error
ERROR: error(#273) 2 compilation errors.  No code generated

The VS debugging shows it's talking about the AdvancedLightning.shader which has this line of code on line 150/151

return vec3(pow(samp.rgb, vec3(GAMMA))); 

I really have no idea what "A" the error is talking about, maybe I'm missing something.

EDIT: Check my next reply I found the source of the error.

Screenshot: http://i.imgur.com/HA1Fz58.png

Gogsi commented 8 years ago

I just remembered it's the error from the last dev log that you find at https://youtu.be/bTAiINeDyUA?t=5m52s The ACTUAL line is 232 and there's an extra A after the semicolon. I have no idea why the error lies about the line but it seems to do it everywhere as I tried placing random symbols at some places and it was always the wrong line.

ghost commented 8 years ago

Yes, the error is definitively in the shader. Now it works, thanks. For some reason Cherno did forgot to committed this.