[PyOpenGL-Users] Converting C++ code to python code
Brought to you by:
mcfletch
|
From: Abhijeet R. <abh...@gm...> - 2011-04-17 17:03:21
|
I have a function in C++ which goes like this .
void selection(int x, int y, int win) {
// Space for selection buffer
static GLuint selectBuff[BUFFER_LENGTH];
GLint hits, viewport[4];
// Setup selection buffer and get the view port
glSelectBuffer(BUFFER_LENGTH, selectBuff);
glGetIntegerv(GL_VIEWPORT, viewport);
// Switch to projection and save the matrix
glMatrixMode(GL_PROJECTION);
glPushMatrix();
...
...
OK. So, now, first of all, in C++ code, it has defined the variables and
then called glGetIntegerv. How am I supposed to do the same in python
code.
Please help. I am just beginner trying to learn opengl.
For the full code, you can search for function selection in
http://sprunge.us/fAaf
--
Regards,
Abhijeet Rastogi (shadyabhi)
http://www.google.com/profiles/abhijeet.1989
|