本文主要用於記錄本人搭建OpenGL環境的過程
#define GLUT_DISABLE_ATEXIT_HACK //just on the top of the gl/glut
{
glClear(GL_COLOR_BUFFER_BIT)
glColor
glRectf(
glFlush()
void ChangeSize(GLsizei w
{ if(h ==
glViewport(
glMatrixMode(GL_PROJECTION)
if (w <= h)
glOrtho (
glMatrixMode(GL_MODELVIEW)
void SetupRC(void)
{
glClearColor(
void main(void)
{
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB)
glutCreateWindow(
glutDisplayFunc(RenderScene)
glutMainLoop()
另外也可以使用WinApp和MFC類型的圖形加入
From:http://tw.wingwit.com/Article/program/net/201311/11481.html