Im trying to implement a GL_Select picker in a map editor im making but it just returns 0 hits. I have used This tutorial as a basis. Before the code below, FInSelection is filled with every face which could have been picked by the user (Based on the Bounding Box of each face), its also sorted so that the first one will be the closest to the Camera. Any help would be appreciated.
Code:
// Store our Viewport
glGetIntegerv(GL_VIEWPORT,@viewport);
// Tell OpenGL the size of our select buffer
glSelectBuffer(512,@SelectBuffer);
// Change our render mode to GL_SELECT
glRenderMode(GL_SELECT);
// Init the namestack
glInitNames;
glPushName(0);
glMatrixMode(GL_PROJECTION);
glPushMatrix;
glLoadIdentity;
// Zoom the view to one pixel around the mouse position
Ran into another problem, this one shouldn't be as simple as the first. GL_Select seems to be failing somtimes, in most cases it works fine, but iv found a map with an area where it gives no hits, yet there is face's in that area which are being passed to it. The images below shows in red the faces which are being sent to the GL_Select for Picking, the Yellow area is where its generating no hits and the green dot is where i clicked.
- Download ~1.36MB (EXE + Sample Map)
Note: 3D View doesn't have any picking ability, only the Grid Modes have the ability.
Mitglieder in diesem Forum: 0 Mitglieder und 9 Gäste
Du darfst keine neuen Themen in diesem Forum erstellen. Du darfst keine Antworten zu Themen in diesem Forum erstellen. Du darfst deine Beiträge in diesem Forum nicht ändern. Du darfst deine Beiträge in diesem Forum nicht löschen. Du darfst keine Dateianhänge in diesem Forum erstellen.