Creating spotlight in OpenGL scene
- by Victor Oliveira
Im studying OpenGL and trying to create a spot light at my application. The code that Im using for my #vertex-shader is below:
#:vertex-shader #{
#version 150 core
in vec3 in_pos;
in vec2 in_tc;
out vec2 tc;
glLightf(GL_LIGHT0, GL_SPOT_CUTOFF, 20.0f);
GLfloat spot_direction[]…