My vertex shader is defined as:
character(len=:), allocatable, target :: vertexShaderSource vertexShaderSource = & "#version 330 core" // C_NEW_LINE // & "layout (location = 0) in vec3 aPos;" // C_NEW_LINE // & "void main()" // C_NEW_LINE // & "{" // C_NEW_LINE // & " gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);" // C_NEW_LINE // & "}" // C_NULL_CHAR
How can I use
" vertexShader = glCreateShader(GL_VERTEX_SHADER)
call glShaderSource(vertexShader, 1, shader_ptr)
"
I am not sure how to use glShaderSource, what's the arguments?
Actually I don't know how to use many APIs with several arguments, especially the commented API calls in the uploaded Fortran code. Could you please check it for me?
Thanks
Li
gl_glfw.txt
My vertex shader is defined as:
character(len=:), allocatable, target :: vertexShaderSource vertexShaderSource = & "#version 330 core" // C_NEW_LINE // & "layout (location = 0) in vec3 aPos;" // C_NEW_LINE // & "void main()" // C_NEW_LINE // & "{" // C_NEW_LINE // & " gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);" // C_NEW_LINE // & "}" // C_NULL_CHARHow can I use
" vertexShader = glCreateShader(GL_VERTEX_SHADER)
call glShaderSource(vertexShader, 1, shader_ptr)
"
I am not sure how to use glShaderSource, what's the arguments?
Actually I don't know how to use many APIs with several arguments, especially the commented API calls in the uploaded Fortran code. Could you please check it for me?
Thanks
Li
gl_glfw.txt