#include "stdafx.h"
#include <glut.h>
#define N 1000 //maximum line numbers
int ww, hh; // for display window width and height
int line[N][4], k = 0; //for line's endpoint coordinates and line number
void Myinit(void);
void Reshape(int w, int h);
void myMouse(int button, int state, int x, int y);
void myMotion(int x, int y);
void Display(void);
void drawlines();
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
char *argv[] = { "hello ", " " };
int argc = 2; // must/should match the number of strings in argv
glutInit(&argc, argv); //初始化GLUT库;
glutInitWindowSize(800, 600); //设置显示窗口大小
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB); //设置显示模式;(注意双缓冲)
glutCreateWindow("鼠标画线小程序演示"); // 创建显示窗口
Myinit();
glutDi
OpenGl(二)鼠标绘制图形
最新推荐文章于 2021-07-17 04:07:08 发布