夏天/isummer

Sun of my life !Talk is cheap, Show me the code! 追风赶月莫停留,平芜尽处是春山~

博客园 首页 新随笔 联系 管理

开源库之LibQglViewer-源码剖析2/15 --Types.h

1. 定有应用的Window系统函数

2. 定义引用的gl.h头文件

3. 定义命名空间

4. 定义类型别名,定义类的前置声明,定义一些常量;

#ifndef _VRENDER_TYPES_H
#define _VRENDER_TYPES_H

#ifdef WIN32
# include <windows.h>
#endif

#ifdef __APPLE__
# include <OpenGL/gl.h>
#else
# include <GL/gl.h>
#endif

namespace vrender
{
    typedef double FLOAT ;
    typedef GLdouble GLFLOAT ;

#ifdef A_VOIR
    typedef T_Vect3<double> DVector3 ;
    typedef T_Vect2<double> Vector2 ;
#endif

    class Primitive ;
    typedef Primitive *PtrPrimitive ;

    const float FLAT_POLYGON_EPS = 1e-5f ;
}

#endif

 5. 文件引用关系

 

posted on 2020-08-22 02:04  夏天/isummer  阅读(308)  评论(0)    收藏  举报