![]() The other method is "SetStrText" which allows container to set the string of the 3D Font like the Property function "SetContent" Events GlLightfv(GL_LIGHT0, GL_POSITION, m_Lightposition) // set light position GlLightfv(GL_LIGHT0, GL_SPECULAR, m_Lightspecular) // set light specular GlLightfv(GL_LIGHT0, GL_DIFFUSE, m_Lightdiffuse) // set light specular ![]() GlLightfv(GL_LIGHT0, GL_AMBIENT, m_Lightambient) // set light ambient ![]() GlClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) TODO: Add your dispatch handler code here int cx, cy The rendering is similar as the rendering function in normal OpenGL program. Unlike normal MS-Windows application which can prceoss WM_SIZE message, the control size is maniplated by container, and the rendering viewport can be set easily in rendering action. In method of "GLRender", there are two important functionality, one is set rendering viewport based on the control size in container, the other is rendering. When the container response the paint/draw event, the container can call this method to repaint the control. The important method in this OpenGL control is "GLRender". In the SetContent function, after resetting the string in 3D Font class, call "Refresh" to repaint the control Methods M_Font.CreateFont(m_pDC, " Arial Black") Void CG元dOcxCtrl::SetContent(LPCTSTR lpszNewValue)
0 Comments
Leave a Reply. |