; ShaderError Example ; ------------------- ; Requires Extended mode. Graphics3D 640,480,0,2 SetBuffer BackBuffer() ; Load a shader and query the diagnostic text stored on it shader=LoadShader("assets/help_surface.b3shader") diagnostic$=ShaderError(shader) If diagnostic="" Then diagnostic="(empty - the shader compiled cleanly)" While Not KeyDown(1) Cls Text 0,0,"ShaderError(shader) = "+diagnostic Text 0,30,"An empty string means no warning or error is stored." Text 0,50,"A failed LoadShader raises a runtime error instead, so" Text 0,70,"use ShaderError for diagnostics kept by a valid shader." Text 0,100,"Esc: exit" Flip Wend FreeShader shader End