GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: No Line Numbers


A Paste by godecho
1
 
    if(ipDisplay != NULL)
    {
        GLenum error = GL_NO_ERROR;
        
        glMatrixMode(GL_MODELVIEW); // Is this really necessary?

        m_displaylistID = glGenLists(1);
        if(glIsList(m_displaylistID) == GL_FALSE)
        {
            return E_FAIL;
        }

        // Determine scale
        //double globeRadiusMeters;
        //double scale = 1.0;
        //
        //IGlobeDisplayRenderingPtr ipGlobeDisplayRend(ipGlobeDisplay);
        //if(ipGlobeDisplayRend != NULL)
        //{
        //    ipGlobeDisplayRend->get_GlobeRadius(&globeRadiusMeters);
        //    scale = 1.0/globeRadiusMeters;
        //}

        //IMarkerSymbolPtr ipMarkerSymbol(ipSymbol);
        //if(ipMarkerSymbol != NULL)
        //{
        //    ipMarkerSymbol->get_Size(&m_dSymbolSize);
        //    m_dSymbolSize = scale * m_dSymbolSize / 2.0;
        //}

        error = glGetError();
        
        hr = ipDisplay->SetSymbol(m_piSymbol);

        error = glGetError();

        glNewList(m_displaylistID, GL_COMPILE);
            //glPushAttrib(GL_ENABLE_BIT);
            //glDisable(GL_COLOR_MATERIAL);
            //glPushMatrix();
                //glScaled(scale, scale, scale);
                //glRotated(-90, 1.0, 0.0, 0.0);
                //hr = ipDisplay->SetSymbol(m_piSymbol);
            //glPopMatrix();
            //glEnable(GL_COLOR_MATERIAL);
            //glPopAttrib();
        glEndList();

        error = glGetError();
    }