glBegin(), glVertex3f() 사용하여 그리는 예제 설명은 추후 예정
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #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(drawRect); glutMainLoop(); } | cs |
OpenGL - GLUT 윈도우의 기능 (0) | 2018.09.06 |
---|---|
OpenGL - 클릭 시 원 그리기 (0) | 2018.09.04 |
SKIA #1 - introduce (0) | 2018.09.04 |
OpenGL - 용어 대역표 (0) | 2017.12.18 |
OpenGL - glClearColor() 배경 색상 변경 (0) | 2017.12.18 |
댓글 영역