多边形图案填充.cpp
#include<windows.h> #include<GL/gl.h> #include<GL/glu.h> #include<GL/glaux.h> #pragma comment(lib,"opengl32") #pragma comment(lib,"glu32") #pragma comment(lib,"glaux") void Init(void); void CALLBACK Display(void); void Init(void) { //clear background to black glClearColor(1.0,1.0,1.0,0.0); glShadeModel(GL_FLAT); } void CALLBACK Display(void) { //定义32*32的位图数据 GLubyte fly[]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x03,0x08,0x01,0xc0,0x06,0xc0,0x03,0x60 ,0x04,0x60,0x06,0x20,0x04,0x30,0x0c,0x20 ,0x04,0x18,0x18,0x20,0x04,0x0c,0x30,0x20 ,0x04,0x06,0x60,0x20,0x44,0x03,0xc0,0x22 ,0x44,0x01,0x80,0x22,0x44,0x01,0x80,0x22 ,0x44,0x01,0x80,0x22,0x44,0x01,0x80,0x22 ,0x44,0x01,0x80,0x22,0x44,0x01,0x80,0x22 ,0x66,0x01,0x80,0x66,0x33,0x01,0x80,0xcc ,0x19,0x81,0x81,0x98,0x0c,0xc1,0x83,0x30 ,0x07,0xe1,0x87,0xe0,0x03,0x3f,0xfc,0xc0 ,0x03,0x31,0x8c,0xc0,0x03,0x33,0xcc,0xc0 ,0x06,0x64,0x26,0x60,0x0c,0xcc,0x33,0x30 ,0x18,0xcc,0x33,0x18,0x10,0xc4,0x23,0x08 ,0x10,0x63,0xc6,0x08,0x10,0x30,0x0c,0x08 ,0x10,0x18,0x18,0x08,0x10,0x00,0x00,0x08 }; GLubyte half[]={0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55 ,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55 ,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55 ,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55 ,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55 ,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55 ,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55 ,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55 ,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55 ,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55 ,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55 ,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55 ,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55 ,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55 ,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55 ,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55 }; glClear(GL_COLOR_BUFFER_BIT); glColor3f(0.0,0.0,0.0); //绘制一个纯黑的矩形 glRectf(25.0,25.0,125.0,125.0);
- luke8906112013-06-04很简单的一个小程序
- chenkangck222020-12-21请问这个是控制台应用程序吗
- 粉丝: 3
- 资源: 4
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 将 yolov5 导出到 tflite 并在 Raspberry Pi 和 CPU 上运行推理.zip
- 将 pjreddie 的 DarkNet 带出阴影 #yolo.zip
- MPSK-AWGN性能仿真MATLAB源码
- 将 keras(tensorflow 后端)yolov3 h5 模型文件转换为 darknet yolov3 权重.zip
- 将 COCO 转换为 Pascal VOC 2012 格式的 Python 脚本.zip
- 将 COCO 注释(CVAT)转换为 YOLOv8-seg(实例分割)和 YOLOv8-obb(定向边界框检测)的注释.zip
- 章节2:编程基本概念之引用的本质-栈内存和堆内存-内存示意图.rar
- 章节2:编程基本概念之标识符-帮助系统简单使用-命名规则.rar
- fasfdsafaadfasfdasfs
- 如何使用 TensorRT 运行 yolov5 模型 .zip