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

📄 maxpixel.cpp

📁 a source code for banker s algorithm
💻 CPP
字号:
#include<windows.h>
#include<gl.h>
#include<glut.h>
void myInit()
{
 glClearColor(1.0,1.0,1.0,1.0);
 glColor3f(0.0f,0.0f,0.0f);
 glPointSize(3.0);
 gluOrtho2D(0.0,640.0,0.0,480.0);
}
void display()
{
 glClear(GL_COLOR_BUFFER_BIT);
 int read();
 glBegin(GL_POINTS);
    for(int i=0;i<=640;i=i+11) 
	{
		for(int j=0;j<=480;j=j+11)
		{glColor3f(j%10,j%5,j%6);
			
			glVertex2i(i,j);
		}

	}
 glEnd();
 glFlush();
}
void main(int argc,char **argv)
{
 glutInit(&argc,argv);
 glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
 glutInitWindowSize(500,500);
 glutInitWindowPosition(100,50);
 glutCreateWindow("random pixel program");
 glutDisplayFunc(display);
 myInit();
 glutMainLoop();
}
 

⌨️ 快捷键说明

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