I’m using OpenGL with Fortran and trying to use the “glDrawArrays” command, but I can’t get through it, it’s generating an runtime error. What I could do was to read manually and then draw the arrays. Here are the codes:
What is working is:
Would somebody help me out with it?
I forgot to say, the arrays were dimentioned as follow:
I doubt you’ll find anybody else who programs fortan, and in truth, I don’t either… But I am willing to venture a guess…
The first thing that popped into my mind while reading that was memory organization. Maybe you need to see if there’s any padding that you’re not expecting, that happens sometimes, especially with old compilers or programming languages which typically expect you (the programmer) not to really care exactly where particular numbers are. If it works without arrays, and bugs out with arrays, I can’t imagine it being anything else.
Thank you very much for your help! I discovered what the problem was! It was a bug between the computer and the chair! I just had to change GLfloat, witch is a kind declaration, for GL_FLOAT that’s the real parameter to a subroutine.