转载自https://www.cnblogs.com/yxnchinahlj/archive/2010/11/19/1881632.html
位图
简介
位图是以元素值为0或1的矩阵形式存储的,通常用于对窗口中相应区域的绘图屏蔽。比如说,当前颜色设置为红色,则在矩阵元素值为1的地方象素用红色来取代,反之,在为0的地方,对应的象素不受影响。
当前光栅位置
void glRasterPos{234}{SIFD}[V](TYPE x,TYPE y,TYPE z,TYPE w);
位图显示
void glBitmap( GLsizei width,GLsizei height,GLfloat xbo,GLfloat ybo,GLfloat xbi,GLfloat ybi,const GLubyte *bitmap);
参数xbi和ybi之处在位图光栅化后光栅位置的增量
示例
#include <windows.h> // Standard Window header required for all programs
#include <stdio.h>
#include <GL\gl.h> // OpenGL functions
#include <GL\glaux.h> // AUX Library functions
#include <iostream>
GLubyte rasters[12] = { 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xfc, 0xc0, 0xc0, 0xc0, 0xff, 0xff };
// Keep track o