/*This file manages all of the shader program stuff, including: o) Loading shaders o) Combining the ray-casting code with the volume shader code */ #include "trueeyes.h" #include "VolumeShaderStruct.h" #include "rtsFilename.h" rts_glShaderProgram gVertexShader; vector ShaderList; int SelectedShader = -1; void SetRenderSource() { ShaderList[SelectedShader].glProgram.AttachGlobalUniform("camera", SourceList[RenderSource].pos); } void AttachShaderVariables() { if(SelectedShader < 0) return; //ShaderList[id].glProgram.AttachGlobalUniform("camera", SourceList[SelectedSource].pos); ShaderList[SelectedShader].glProgram.AttachGlobalUniform("d", gpVolSize); ShaderList[SelectedShader].glProgram.AttachGlobalUniform("stepsize", &StepSize); ShaderList[SelectedShader].glProgram.AttachGlobalUniform("ray_min", gpCropMin); ShaderList[SelectedShader].glProgram.AttachGlobalUniform("ray_max", gpCropMax); //attach all available texture maps for(int v = 0; v