这是用MFC编写的使用openGL的视口代码。
CChildView::CChildView() 构造函数
CChildView::~CChildView() 析构函数
BEGIN_MESSAGE_MAP(CChildView,CWnd ) 消息映射
BOOL CChildView::PreCreateWindow(CREATESTRUCT& cs)创建窗口重新设置窗口参数
BOOL CChildView::PreTranslateMessage( MSG* pMsg ) 翻译消息
int CChildView::OnCreate( LPCREATESTRUCT lpCreateStruct ) 窗口创建好后进入此函数 完成openGL的初始化
void CChildView::OnSize( UINT nType, int cx, int cy ) 当窗口大小发生改变时重新设置OPenGL的视口参数。
void CChildView::OnDestroy() 销毁窗口 -It is written in MFC to use openGL viewport code. CChildView:: CChildView () constructor CChildView:: ~ CChildView () destructor BEGIN_MESSAGE_MAP (CChildView, CWnd) message map BOOL CChildView:: PreCreateWindow (CREATESTRUCT & cs) to create a window to reset the window parameters BOOL CChildView:: PreTranslateMessage (MSG* pMsg ) translation of the message int CChildView:: OnCreate (LPCREATESTRUCT lpCreateStruct) window is created and entered this function to complete openGL initialization void CChildView:: OnSize (UINT nType, int
OpenGL高级编程与可视化系统开发(高级编程篇)的随书源码-4,学习OpenGL的好东西-OpenGL Programming and Advanced Visualization System (Advanced Programming Part 1) the source-4 with books, learning the good stuff OpenGL -OpenGL high-level programming and visualization systems development (high-level programming chapter)-4 of the source with the book, learning OpenGL good things-OpenGL Programming and Advanced Visualization System (Advanced Programming Part 1) the source-4 with books, learning the good stuff OpenGL
基于碰撞物理学的偶人动画,展示了一个可怜的角色被抛到空中的碰撞过程。碰撞到物体后根据自身的质点弹簧系统计算运动状态。-on collision physics program is animation, displaying a poor role was thrown into the air collision course. After the collision of objects based on their mass spring system to calculate the movement.