this script when ran from the ScriptEditor will load the shader, then crashes the program.
require("Scripts/constants/engine_const")
RegisterAbstractPath("")
Graphics(1024,768)
fw=CreateFramework()
shader = LoadShader("abstract::mesh_diffuse.vert","abstract::mesh_diffuse.frag")
while KeyHit(KEY_ESCAPE)==0 do
fw:Update()
fw:Render()
Flip()
end
can anyone else confirm before I start a bug report to make sure its not something on my end?
This what I see in the console:
Leadwerks Engine 2.32
Initializing Renderer...
OpenGL Version: 3.3.0
GLSL Version: 3.30 NVIDIA via Cg compiler
Render device: GeForce 9800 GX2/PCI/SSE2
Vendor: NVIDIA Corporation
DrawBuffers2 supported: 1
32 texture units supported.
GPU instancing supported: 1
Max batch size: 64
Shader model 4.0 supported: 1
Conditional render supported: 0
Loading shader "zip::c:/program files/leadwerks engine sdk/shaders.pak//query.vert", ""...
Invoking script "C:/Program Files/Leadwerks Engine SDK/Scripts/start/collisions.lua"...
Invoking script "C:/Program Files/Leadwerks Engine SDK/Scripts/start/fliphook.lua"...
Invoking script "C:/Program Files/Leadwerks Engine SDK/Scripts/start/globals.lua"...
Loading shader "zip::c:/program files/leadwerks engine sdk/shaders.pak//mesh/mesh_diffuse.vert", "zip::c:/program files/leadwerks engine sdk/shaders.pak//mesh/mesh_diffuse.frag"...
Error: Failed to compile fragment shader object.
0(335) : error C1115: unable to find compatible overloaded function "clamp(float, int, int)"
Source:
#define LW_MAX_PASS_SIZE 64
#define LW_INSTANCED
#define LW_SM4
#define etc...
etc...