-1

I am using OpenGL version 3.0, when I try:

vao = glGenVertexArrays(1)

I get:

NameError: global name 'glGenVertexArrays' is not defined

Somebody knows why?

Here is what I am importing:

import OpenGL
from OpenGL.GLU import *
from OpenGL.GL import *
from OpenGL.arrays import vbo
from OpenGLContext.arrays import *
self.vao = glGenVertexArrays(1)

Also when I run:

dir(OpenGL.GL)

In the output I cannot find the function: glGenVertexArrays

  • Have you defined `glGenVertexArrays()` some where in your code? Please provide complete code! – ρss Jun 13 '14 at 17:59

1 Answers1

1

Assuming you did this:

import pyopengl

then you'd want to do something like

vao = pyopengl.glGenVertexArrays(1)

to actually use the function.

However, it looks to me like glGenVertexArrays takes 2 arguments so you'll still need to resolve that I think ...

mgilson
  • 300,191
  • 65
  • 633
  • 696