glutwindow, Phong Shading (Vertex Shader, Fragment Shader) 을 사용한 3D 주전자 프로그램
*응*
다운로드
장바구니
소개글
glutwindow, Phong Shading (Vertex Shader, Fragment Shader) 을 사용한 3D 주전자 프로그램 프로그램입니다.대표이미지에서 보시다시피 glut Teapot 을 GLSL 을 이용 (vertex shader, fragment shader) 하여
phong shading 효과를 주는 프로그램입니다. idle 함수에서 주전자가 회전되도록 기능 구현 되있기때문에 glut 및 shading 기초공부하시는 분께는 최적일 듯합니다. 주석도 한글 주석으로 최대한 작성해 놓았습니다.
기본 window size 는 640, 480 로 되있으며, glutIdleFunc 반복적으로 화면이 갱신 됩니다.
코드는 openGL 및 GLSL 을 배우기 시작하시거나, 정리하시기에는 군더더기 없는 소스코드입니다.
모든 소스에는 한글 주석이 달려있어서 보시기에도 도움이 되실겁니다.
Shader Code 는 fragmentshader.txt, vertexshader.txt 파일입니다. (이쪽도 주석처리 해놨습니다.)
개발환경 : Visual Studio 2017 32비트(x86) 빌드하셔야합니다.
OpenGL 관련 lib 가 32비트이기 때문입니다.
잘만들었으니 가져가셔서 많은 도움이 되셨음 좋겠습니다. 감사합니다.
컴파일 실행환경
Visual Studio 2017, 빌드(x86 or win32), C/C++압축파일 내 파일목록
GLSL_Lighting/Backup/TemplateProject.sln
GLSL_Lighting/copyight-string.txt
GLSL_Lighting/cwc/include/glApplication.h
GLSL_Lighting/cwc/include/glsl.h
GLSL_Lighting/cwc/include/glutwindow.h
GLSL_Lighting/cwc/include/glWindow.h
GLSL_Lighting/cwc/source/glApplication.cpp
GLSL_Lighting/cwc/source/glsl.cpp
GLSL_Lighting/cwc/source/glutwindow.cpp
GLSL_Lighting/cwc/source/glWindow.cpp
GLSL_Lighting/fragmentshader.txt
GLSL_Lighting/freeglut/include/GL/freeglut.h
GLSL_Lighting/freeglut/include/GL/freeglut_ext.h
GLSL_Lighting/freeglut/include/GL/freeglut_std.h
GLSL_Lighting/freeglut/include/GL/glut.h
GLSL_Lighting/freeglut/source/freeglutdll.def
GLSL_Lighting/freeglut/source/freeglut_callbacks.c
GLSL_Lighting/freeglut/source/freeglut_cursor.c
GLSL_Lighting/freeglut/source/freeglut_display.c
GLSL_Lighting/freeglut/source/freeglut_ext.c
GLSL_Lighting/freeglut/source/freeglut_font.c
GLSL_Lighting/freeglut/source/freeglut_font_data.c
GLSL_Lighting/freeglut/source/freeglut_gamemode.c
GLSL_Lighting/freeglut/source/freeglut_geometry.c
GLSL_Lighting/freeglut/source/freeglut_glutfont_definitions.c
GLSL_Lighting/freeglut/source/freeglut_init.c
GLSL_Lighting/freeglut/source/freeglut_internal.h
GLSL_Lighting/freeglut/source/freeglut_joystick.c
GLSL_Lighting/freeglut/source/freeglut_main.c
GLSL_Lighting/freeglut/source/freeglut_menu.c
GLSL_Lighting/freeglut/source/freeglut_misc.c
GLSL_Lighting/freeglut/source/freeglut_overlay.c
GLSL_Lighting/freeglut/source/freeglut_state.c
GLSL_Lighting/freeglut/source/freeglut_stroke_mono_roman.c
GLSL_Lighting/freeglut/source/freeglut_stroke_roman.c
GLSL_Lighting/freeglut/source/freeglut_structure.c
GLSL_Lighting/freeglut/source/freeglut_teapot.c
GLSL_Lighting/freeglut/source/freeglut_teapot_data.h
GLSL_Lighting/freeglut/source/freeglut_videoresize.c
GLSL_Lighting/freeglut/source/freeglut_window.c
GLSL_Lighting/glew/include/GL/glew.h
GLSL_Lighting/glew/include/GL/glxew.h
GLSL_Lighting/glew/include/GL/wglew.h
GLSL_Lighting/glew/source/glew.c
GLSL_Lighting/License.txt
GLSL_Lighting/main.cpp
GLSL_Lighting/TemplateProject.sln
GLSL_Lighting/TemplateProject.vcproj
GLSL_Lighting/TemplateProject.vcxproj
GLSL_Lighting/TemplateProject.vcxproj.filters
GLSL_Lighting/TemplateProject.vcxproj.user
GLSL_Lighting/UpgradeLog.htm
GLSL_Lighting/vertexshader.txt
이미지 28.png
GLSL_Lighting/copyight-string.txt
GLSL_Lighting/cwc/include/glApplication.h
GLSL_Lighting/cwc/include/glsl.h
GLSL_Lighting/cwc/include/glutwindow.h
GLSL_Lighting/cwc/include/glWindow.h
GLSL_Lighting/cwc/source/glApplication.cpp
GLSL_Lighting/cwc/source/glsl.cpp
GLSL_Lighting/cwc/source/glutwindow.cpp
GLSL_Lighting/cwc/source/glWindow.cpp
GLSL_Lighting/fragmentshader.txt
GLSL_Lighting/freeglut/include/GL/freeglut.h
GLSL_Lighting/freeglut/include/GL/freeglut_ext.h
GLSL_Lighting/freeglut/include/GL/freeglut_std.h
GLSL_Lighting/freeglut/include/GL/glut.h
GLSL_Lighting/freeglut/source/freeglutdll.def
GLSL_Lighting/freeglut/source/freeglut_callbacks.c
GLSL_Lighting/freeglut/source/freeglut_cursor.c
GLSL_Lighting/freeglut/source/freeglut_display.c
GLSL_Lighting/freeglut/source/freeglut_ext.c
GLSL_Lighting/freeglut/source/freeglut_font.c
GLSL_Lighting/freeglut/source/freeglut_font_data.c
GLSL_Lighting/freeglut/source/freeglut_gamemode.c
GLSL_Lighting/freeglut/source/freeglut_geometry.c
GLSL_Lighting/freeglut/source/freeglut_glutfont_definitions.c
GLSL_Lighting/freeglut/source/freeglut_init.c
GLSL_Lighting/freeglut/source/freeglut_internal.h
GLSL_Lighting/freeglut/source/freeglut_joystick.c
GLSL_Lighting/freeglut/source/freeglut_main.c
GLSL_Lighting/freeglut/source/freeglut_menu.c
GLSL_Lighting/freeglut/source/freeglut_misc.c
GLSL_Lighting/freeglut/source/freeglut_overlay.c
GLSL_Lighting/freeglut/source/freeglut_state.c
GLSL_Lighting/freeglut/source/freeglut_stroke_mono_roman.c
GLSL_Lighting/freeglut/source/freeglut_stroke_roman.c
GLSL_Lighting/freeglut/source/freeglut_structure.c
GLSL_Lighting/freeglut/source/freeglut_teapot.c
GLSL_Lighting/freeglut/source/freeglut_teapot_data.h
GLSL_Lighting/freeglut/source/freeglut_videoresize.c
GLSL_Lighting/freeglut/source/freeglut_window.c
GLSL_Lighting/glew/include/GL/glew.h
GLSL_Lighting/glew/include/GL/glxew.h
GLSL_Lighting/glew/include/GL/wglew.h
GLSL_Lighting/glew/source/glew.c
GLSL_Lighting/License.txt
GLSL_Lighting/main.cpp
GLSL_Lighting/TemplateProject.sln
GLSL_Lighting/TemplateProject.vcproj
GLSL_Lighting/TemplateProject.vcxproj
GLSL_Lighting/TemplateProject.vcxproj.filters
GLSL_Lighting/TemplateProject.vcxproj.user
GLSL_Lighting/UpgradeLog.htm
GLSL_Lighting/vertexshader.txt
이미지 28.png