Skip to content

How could I use glShaderSource in glad-fortran #2

Description

@lj-cug

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions