Jump to content

Recommended Posts

Posted

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...

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...