Open ghost opened 6 years ago
1
You must include the GL namespace or prefix the constants like: GL::GL_VERTEX_SHADER
.
Apart from this, I recommend to use the ruby-opengl library for new projects. There is a shader example: https://github.com/vaiorabbit/ruby-opengl/blob/master/sample/OrangeBook/brick.rb
Program -just creating a variable for the vertex shader: require 'opengl' require 'glu' require 'glut'
$vertexShader = glCreateShader(GL_VERTEX_SHADER)
Result from Jetbrains Rubymine: C:\Ruby24-x64\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/Users/Andrew/Desktop/task3.rb C:/Users/Andrew/Desktop/task3.rb:7:in <top (required)>': uninitialized constant GL_VERTEX_SHADER (NameError) from -e:1:inload' from -e:1:in `
'
Process finished with exit code 1