iDevGames Forums
GL_SELECT mode in VBOs - Printable Version

+- iDevGames Forums (
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: GL_SELECT mode in VBOs (/thread-2748.html)

GL_SELECT mode in VBOs - myfeng - Feb 28, 2008 10:38 AM

Hi experts,

This is an old issue and I saw a couple thread regarding this posted a couple years ago, but I couldn't find the solution. Does anyone know this? Thanks a lot in advance. I have tried something like this:
Mesh::Render(GLenum mode)
    if (mode == GL_RENDER && !m_VBOLoaded)
        m_VBOLoaded = true;
    if (mode == GL_SELECT)
        m_VBOLoaded = false;
    renderMesh(); -->this is also a Mesh function and calls gldrawElements to render a mesh;

I did in this way, since Picking is so slow with VBOs. I tried to remove VBOs and use normal vetex array to render in picking mode. Is this supposed to work? I have been trying this and it looks like it works if I only load one or two meshes and it crashs if I load a lot meshes. not sure it's my code problem or it's just the wrong idea. Thanks,