CAD System Web Site - Computer Aided Design Software
i NET1000.COM
by Makoto Honda
Last Update: 2010-September-10                   Update Info     Site Index     Licensing     Copyright Notice     Privacy Policy     Contact Us  


 
System Architecture
 DLL Hierarchy
 Element Classes
 FM Programming
 Temp Elements
 Current Plane
 Rendering
 Undo/Redo
 OpenGL Display List


 
HOME  

                                   
OpenGL Display List Usage
Computer-Aided Design Software
(CAD System)


 

Description

H O W   T H E    D I S P L A Y    L I S T    I S    U S E D

//// --------------------------------------------------------------- AGlobal.h
//// enum DISPLAY_LIST // Display list id
//// {
//// DL_ZERO_ILLEGAL,
//// DL_AXIS,
//// DL_CAGE,
//// DL_POINT,
//// DL_CUR_PLANE,
//// DL_VISUAL1,
//// };
//// ------------------------------------------------------ CGDocFK_kernel.cpp
//// void CGDoc::FromOnNewDocument()
//// {
//// HGLRC hRC = wglGetCurrentContext(); // Check if any RC is "current"
//// HDC hDC = wglGetCurrentDC();
//// VERIFY (wglMakeCurrent (m_master_hDC, m_master_hRC));
//// CreateDisplayList ( DL_CAGE );
//// CreateDisplayList ( DL_AXIS );
//// CreateDisplayList ( DL_POINT );
//// CreateDisplayList ( DL_CUR_PLANE );
//// CreateDisplayList ( DL_VISUAL1 );
//// if (hRC && hDC) ::wglMakeCurrent (hDC, hRC);
//// }
//// ------------------------------------------------------ CGDocFK_kernel.cpp
//// void CGDoc::CreateDisplayList ( DISPLAY_LIST no )
//// {
//// glNewList ( no, GL_COMPILE);
//// switch ( no )
//// {
//// case DL_VISUAL1:
//// float s = 0.3f;
//// glPushAttrib ( GL_ALL_ATTRIB_BITS );
//// glDisable ( GL_LIGHTING );
//// GLfloat colorB[] = {0.0f, 0.5f, 0.8f, 1.0f};
//// glMaterialfv(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,colorB);
//// glBegin (GL_LINES);
//// glVertex3f (0.0f,-2.0f,0.0f);
//// glVertex3f (0.0f, 2.0f,0.0f);
//// glEnd();
//// glEnable ( GL_LIGHTING );
//// glPopAttrib ();
//// case DL_AXIS: // Axis
//// glBegin ( GL_LINES );
//// glColor3f (1.0f, 0.0f, 0.0f);
//// glVertex3f ( 0.0f, 0.0f, 0.0f );
//// glVertex3f ( size, 0.0f, 0.0f );
//// glEnd();
//// case DL_POINT: // Point element
//// glPushAttrib ( GL_ALL_ATTRIB_BITS );
//// glDisable ( GL_LIGHTING );
//// glColor3f (1.0f, 1.0f, 0.0f);
//// glBegin ( GL_LINES );
//// glVertex3f ( 0.0f , 0.0f , s );
//// glVertex3f ( 0.0f , 0.0f , -s );
//// glVertex3f ( s , 0.0f , 0.0f );
//// glEnd();
//// glEnable ( GL_LIGHTING );
//// glPopAttrib ();
//// case DL_CUR_PLANE: /// Current plane
//// glColor3f (0.4f, 0.4f, 0.4f);
//// glBegin ( GL_LINES );
//// for (int k = 0; k < total; k++)
//// {
//// glVertex3f ( xxx, yy, zzz );
//// glVertex3f (-xxx, yy, zzz );
//// xx += increment;
//// };
//// glEnd ();
//// glEndList();
//// }
//// -------------------------------------------------------------- CGView.cpp
//// void CGView::DrawMyScene()
//// { ........
//// ........
//// glPushAttrib ( GL_ALL_ATTRIB_BITS );
//// glDisable ( GL_LIGHTING ); // to draw flat lines 96-5-8
//// DrawVisCueFkFrame();
//// glCallList ( DL_CAGE );
//// glCallList ( DL_AXIS );
//// DrawCurPlane ();
//// glEnable ( GL_LIGHTING );
//// glPopAttrib ();
//// DrawAllElems();
//// }
//// ------------------------------------------------------------- CGView.cpp
//// void CGView::DrawCurPlane ()
//// {
//// CGDoc* pDoc = GetDocument();
//// CCurPlane* pCP = pDoc->m_pCurPlane;
//// GLfloat mmm[16] = {
//// pCP->m_mxAxisX.x, pCP->m_mxAxisX.y, pCP->m_mxAxisX.z, 0.0f ,
//// pCP->m_mxAxisY.x, pCP->m_mxAxisY.y, pCP->m_mxAxisY.z, 0.0f ,
//// pCP->m_mxAxisZ.x, pCP->m_mxAxisZ.y, pCP->m_mxAxisZ.z, 0.0f ,
//// pCP->m_mxOrigin.x, pCP->m_mxOrigin.y, pCP->m_mxOrigin.z, 1.0f };
//// glLoadIdentity(); /// 97-4-19 did not work
//// glMultMatrixf(mmm);
//// glColor3f (0.0f, 0.7f, 1.0f); // CP color
//// glCallList ( DL_CUR_PLANE ); // Display List
//// glLoadIdentity(); // needed for proper polygon display
//// }
//// --------------------------------------------------------------- Elem.cpp
//// void CElemPoint::DrawElemOneVpt ( int flagVisual, DISPLAY_MODE mode,
//// DISPLAY_MODE cull, GLenum renderMode )
//// {
//// GLfloat mmm[16] = { m_mxAxisX.x, m_mxAxisX.y, m_mxAxisX.z, 0.0f ,
//// m_mxAxisY.x, m_mxAxisY.y, m_mxAxisY.z, 0.0f ,
//// m_mxAxisZ.x, m_mxAxisZ.y, m_mxAxisZ.z, 0.0f ,
//// m_mxOrigin.x, m_mxOrigin.y, m_mxOrigin.z, 1.0f };
//// glLoadIdentity();
//// glMultMatrixf(mmm);
//// if (renderMode == GL_SELECT) glLoadName ((GLuint)this);
//// glCallList ( DL_POINT ); // Display List
//// glLoadName ( NULL ); // non-pickable
//// }
 

 

 

CAD System Web Site - Computer Aided Design Software:  Copyright 2010-2013 Makoto Honda. All Rights Reserved.  

Copyright 2010-2013 Makoto Honda. All Rights Reserved.                                       www.iNET1000.com