Original Post
Hello I have function in my class: void CShader::sendToShader(char *varname,GLint v0) { int loc = glGetUniformLocationARB(my_program, varname); glUniform1iARB(loc, v0); } And i have fragment program: niform sampler2D basetex; uniform sampler2D bumptex; varying vec3 eyeVec; void main() { vec2 texUV, srcUV = gl_TexCoord[0].xy; float height = texture2D(bumptex, srcUV).r; float v = height * 0.04 - 0.02; vec3 eye = normalize(eyeVec); texUV = srcUV + (eye.xy * v); vec3 rgb = texture2D(basetex, texUV).rgb; gl_FragColor = vec4(vec3(rgb), 1.0); // gl_FragColor = vec4(vec3(rgb)*height, 1.0); } in my engin code: shader.start(); shader.sendToShader("bumptex",0); render_scene(); shader.stop(); And when i run this i have error "memory can't be read" What is wrong? merry christmas :)