⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 drw.c

📁 a source code for banker s algorithm
💻 C
字号:
#include<windows.h>
#include<glut.h>
#include<gl.h>
#define screenH 480

void myInit(void)
{
	glClearColor(1.0,1.0,1.0,1.0);
	glColor3f(0.0f,0.0f,1.0f);
	glPointSize(4.0);
	gluOrtho2d(0.0,640.0,0.0,480.0)
}

void myDisplay(void)
{
	glClear(GL_COLOR_BUFFER_BIT);
}

void drawDot(int p,int q)
{
	glBegin(GL_POINTS);
	glVertex2i(p,q)
	glEnd();
	glFlush();
}

void myMouse(int x int y)
{
	drawDot(x,screenH - y);
}
void main(void)
{
	glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
	glutInitWindowSize(640,480);
	glutInitWindowPosition(100,100);
	glutCreateWindow("massive");
	glutDisplayfunc(myDisplay);
	glutPassiveMotionFunc(myMouse);
	myInit();
	glutMainLoop();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -