Select function OpenGL


While using the select object function, there were some things that created problems. For one, the position of mouse in Xwindows is from top left and GL likes lower left origin, so {height-mousey} is used for an index.


char *colornames[4]={"nothing","red","green","blue"};
sprintf(astring," %s ",colornames[(GLubyte)names[i * 4 + 3]]);

Also I wanted to show the object numbers as text and thought I had wrongly created the char* array of names, but instead I had used an index for object numbers that had to be greater than 0 and thus had to add one to the array. The selection was consistent and very fast. This pdf link has a good long understandable explanation of the details of picking and some of the things to watch out for.

The next step is to set frame rate at an absolute number (25) Done. And then push video file write off to another set threads so that it doesn't stall the render. That would have to be rubber banded to some point and up to a gigabyte of frames could be kept in memory to achieve real time render to video for scenes up to 20 minutes or so.

0 comments:

Automated Intelligence

Automated Intelligence
Auftrag der unendlichen LOL katzen