#include #include #include #define PT 1#define STROKE 2#define END 3typedef struct charpoint { GLfloat x, y; int type;} CP;CP Adata[] = { { 0, 0, PT}, {0, 9, PT}, {1, 10, PT},
原创 2022-06-16 22:23:49
119阅读
最近对opengl输出文字比较感兴趣,把这几天疑惑的东西写下来,因为自己也是刚接触只是了解了皮毛。所以内容有些局限,不过希望对像我这种初学的人提供点信息。在windows下wglUseFontBitmaps与wglUseFontOutlines提供opengl输出文字的字符资源,二者均通过构建一系列显示列表,然后用glCallLists执行这些显示列表就可以输出我们想要的字符。wglUseFont