GL_SELECT mode in VBOs

Apprentice
Posts: 13
Joined: 2007.10
Post: #1
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:
Code:
Mesh::Render(GLenum mode)
{
    if (mode == GL_RENDER && !m_VBOLoaded)
    {
        BuildVBOs();
        m_VBOLoaded = true;
    }
    if (mode == GL_SELECT)
    {
        clearVBOS();
        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,
Ching
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  VBOs and Vertex Arrays in OpenGL not working Talyn 6 6,786 Jul 8, 2008 01:14 PM
Last Post: Fenris
  Text rendering problem with VBOs on myfeng 9 6,265 Feb 29, 2008 04:54 PM
Last Post: OneSadCookie
  Trouble with VBOs TomorrowPlusX 17 9,730 May 4, 2007 05:26 PM
Last Post: OneSadCookie
  glPointSize not working with glRenderMode( GL_SELECT ) Blake 3 3,782 Dec 12, 2005 10:19 AM
Last Post: Blake
  Proper teardown of VBOs TomorrowPlusX 5 4,233 Dec 2, 2004 05:29 AM
Last Post: TomorrowPlusX