Frist OpenGl

王朝other·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

#include <windows.h>

#include <gl\gl.h> // Header File For The OpenGL32 Library

#include <gl\glu.h> // Header File For The GLu32 Library

#include <gl\glaux.h> // Header File For The GLaux Library

#pragma comment(lib, "OpenGL32.lib")

#pragma comment(lib, "GLu32.lib")

#pragma comment(lib, "GLaux.lib")

void main(void)

{

auxInitDisplayMode(AUX_SINGLE|AUX_RGBA);

auxInitPosition(0,0,500,500);

auxInitWindow("simple");

glClearColor(0.0,0.0,0.0,0.0);

glClear(GL_COLOR_BUFFER_BIT);

glColor3f(1.0,0.0,0.0);

glRectf(-0.5,-0.5,0.5,0.5);

glFlush();

_sleep(1000);

}

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航