OpenGL - 흑색 바탕에 백색 사각형 그리기
glBegin(), glVertex3f() 사용하여 그리는 예제 설명은 추후 예정 1234567891011121314151617181920#include "DrawRect.h" void drawRect(){ glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_POLYGON); glVertex3f(-0.5,-0.5,0.0); glVertex3f(0.5,-0.5,0.0); glVertex3f(0.5,0.5,0.0); glVertex3f(-0.5,0.5,0.0); glEnd(); glFlush();} void drawRect(int argc, char** argv) { glutCreateWindow("OpenGL Drawing Example"); glutDisplayFunc(drawRec..
개발 환경/Graphics
2018. 9. 4. 22:02