Ever since using OpenGL with Python, I have had the problem of not being able to use more than one texture at a time. Obviously, this is very limiting and I can't seem to find any solution. The problem lies in the call glGenTextures(1)
. Every time I call it, it gives me the following error: "No array-type handler for type <class 'ctypes.c_ulong'> (value: c_ulong(0L)) registered", <OpenGL.converters.CallFuncPyConverter object at 0x2af6f90>)
. I am positive that I'm using it correctly. I am using a Macbook Air, version 10.8.5, if that has any relevance.
Asked
Active
Viewed 785 times
0

Fitzy
- 1,871
- 6
- 23
- 40
-
1Of course it gives you this error, `glGenTextures (...)` returns void. It stores `n`-many unused texture names in the array you pass as the second parameter. Fun bit of trivia: it does not actually generate anything, despite the name ;) The names it stores in your array do not become textures until you bind them to something like `GL_TEXTURE_2D`. – Andon M. Coleman Nov 16 '13 at 03:40
-
@AndonM.Coleman I suppose I should have looked into it a bit more. Even so, passing an array into the function gives the same error. I realized that you can just pass integers into the function call and it will still generate textures just fine, which is what I have been doing for now. Whether that is a professional way to do it is another matter. – Fitzy Nov 16 '13 at 04:21