标签:blog http color os io ar for 2014 div
freeglut http://www.transmissionzero.co.uk/software/freeglut-devel/
glew http://glew.sourceforge.net/
setx -m FREEGLUT_HOME "D:\OpenGL\freeglut"
setx -m GLEW_HOME "D:\OpenGL\glew-1.11.0"
setx -m OPENGL_HOME "D:\OpenGL"
setx -m OPENGL_RUNTIME "D:\OpenGL\bin"
setx -m Path "%Path%;%OPENGL_RUNTIME%"
$(OPENGL_HOME)\bin
$(FREEGLUT_HOME)\include;$(GLEW_HOME)\include;%(AdditionalIncludeDirectories)
$(FREEGLUT_HOME)\lib;$(GLEW_HOME)\lib\Release\Win32;%(AdditionalLibraryDirectories)
freeglut.lib;glew32.lib;%(AdditionalDependencies)
#include <gl/glut.h> void init() { glClearColor(1.0, 1.0, 1.0, 1.0); glMatrixMode(GL_PROJECTION); gluOrtho2D(0.0, 200.0, 0.0, 150.0); } void lineSegment() { glClear(GL_COLOR_BUFFER_BIT); glColor3f(1.0, 0.0, 0.0); glBegin(GL_LINES); glVertex2i(180, 15); glVertex2i(10, 145); glEnd(); glFlush(); } void main(int argc, char **argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowPosition(50, 100); glutInitWindowSize(400, 300); glutCreateWindow("An example opengl program"); init(); glutDisplayFunc(lineSegment); glutMainLoop(); }
标签:blog http color os io ar for 2014 div
原文地址:http://www.cnblogs.com/mynamepfd/p/3944740.html