Re: [PyOpenGL-Users] Converted C++ project to python project (some issues)
Brought to you by:
mcfletch
From: Abhijeet R. <abh...@gm...> - 2011-04-18 05:20:03
|
On Mon, Apr 18, 2011 at 4:41 AM, Mike C. Fletcher <mcf...@vr...>wrote: > > You are calling glGenTextures before you have a valid OpenGL context, > this results in getting 4 values of 0 for the textures. Instead, only > Instead of doing textures = glGenTextures(TEX_COUNT) in main, I did it in drawRAWs function global textures textures = glGenTextures(TEX_COUNT) Now, the textures are loaded perfectly but they are not selected and give some error. Googling ( http://pyopengl.sourceforge.net/documentation/opengl_diffs.html) told me that there are some differences the way selection buffers are handled. By the way, the error which I get is Traceback (most recent call last): File "_ctypes/callbacks.c", line 313, in 'calling callback function' File "main.py", line 651, in mouseWin2 selection(x, y, 2) File "main.py", line 299, in selection choiche = selectBuff[(hits*4)-1] TypeError: unsupported operand type(s) for -: 'list' and 'int' I know, I have used python datatype wrongly. I am figuring out how to do it. If I am not successful, I will ask the question on mailling list again. Thanks for your helo so far. -- Regards, Abhijeet Rastogi (shadyabhi) http://www.google.com/profiles/abhijeet.1989 |