├── .gitignore ├── 00_hello_triangle ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 └── main.c ├── 00_hello_triangle_gl2.1 ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 └── main.c ├── 01_extended_init ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 └── main.c ├── 02_shaders ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.c ├── gl_utils.h ├── main.c ├── test_fs.glsl └── test_vs.glsl ├── 03_vertex_buffer_objects ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── test_fs.glsl └── test_vs.glsl ├── 04_mats_and_vecs ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── test_fs.glsl └── test_vs.glsl ├── 05_virtual_camera ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── test_fs.glsl └── test_vs.glsl ├── 06_vcam_with_quaternion ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── obj_parser.cpp ├── obj_parser.h ├── sphere.obj ├── test_fs.glsl └── test_vs.glsl ├── 07_ray_picking ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── obj_parser.cpp ├── obj_parser.h ├── sphere.obj ├── test_fs.glsl └── test_vs.glsl ├── 08_phong ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── test_fs.glsl └── test_vs.glsl ├── 09_texture_mapping ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── skulluvmap.png ├── stb_image.c ├── stb_image.h ├── test_fs.glsl └── test_vs.glsl ├── 10_screen_capture ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── skulluvmap.png ├── stb_image.c ├── stb_image.h ├── stb_image_write.c ├── stb_image_write.h ├── test_fs.glsl └── test_vs.glsl ├── 11_video_capture ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── skulluvmap.png ├── stb_image.c ├── stb_image.h ├── stb_image_write.c ├── stb_image_write.h ├── test_fs.glsl └── test_vs.glsl ├── 12_debugging_shaders ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── ao.png ├── boulder_diff.png ├── boulder_spec.png ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── obj_parser.cpp ├── obj_parser.h ├── stb_image.c ├── stb_image.h ├── suzanne.obj ├── test_fs.glsl ├── test_vs.glsl └── tileable9b_emiss.png ├── 13_mesh_import ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── monkey2.obj ├── suzanne.obj ├── test_fs.glsl └── test_vs.glsl ├── 14_multi_tex ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── ship.png ├── skulluvmap.png ├── stb_image.c ├── stb_image.h ├── test_fs.glsl └── test_vs.glsl ├── 15_phongtextures ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── ao.png ├── boulder_diff.png ├── boulder_spec.png ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── monkey.blend ├── monkey.obj ├── stb_image.c ├── stb_image.h ├── test_fs.glsl ├── test_vs.glsl └── tileable9b_emiss.png ├── 16_frag_reject ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── skulluvmap.png ├── stb_image.c ├── stb_image.h ├── test_fs.glsl └── test_vs.glsl ├── 17_alpha_blending ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── blob.png ├── blob2.png ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── stb_image.c ├── stb_image.h ├── test_fs.glsl └── test_vs.glsl ├── 18_spotlights ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── test_fs.glsl └── test_vs.glsl ├── 19_fog ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── suzanne.obj ├── test_fs.glsl └── test_vs.glsl ├── 20_normal_mapping ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── brickwork_normal-map.png ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── stb_image.c ├── stb_image.h ├── suzanne.obj ├── test_fs.glsl └── test_vs.glsl ├── 21_cube_mapping ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── cube_fs.glsl ├── cube_vs.glsl ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── negx.jpg ├── negy.jpg ├── negz.jpg ├── obj_parser.cpp ├── obj_parser.h ├── posx.jpg ├── posy.jpg ├── posz.jpg ├── reflect_fs.glsl ├── reflect_vs.glsl ├── refract_fs.glsl ├── refract_vs.glsl ├── stb_image.c ├── stb_image.h └── suzanne.obj ├── 22_geom_shaders ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── test_fs.glsl ├── test_gs.glsl └── test_vs.glsl ├── 23_tessellation_shaders ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── test_fs.glsl ├── test_tcs.glsl ├── test_tes.glsl └── test_vs.glsl ├── 24_gui_panels ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── skulluvmap.png ├── stb_image.c ├── stb_image.h └── tile2-diamonds256x256.png ├── 25_sprite_sheets ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── shark_anim.png ├── stb_image.c └── stb_image.h ├── 26_bitmap_fonts ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── handmade2.png ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── stb_image.c └── stb_image.h ├── 27_font_atlas ├── FreeMono.ttf ├── Makefile.linux64 ├── Makefile.win32 ├── freemono.meta ├── freemono.png ├── generator_main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── stb_image.c ├── stb_image.h ├── stb_image_write.c ├── stb_image_write.h └── viewer_main.cpp ├── 28_uniform_buffer_object ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── cube_fs.glsl ├── cube_vs.glsl ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── negx.jpg ├── negy.jpg ├── negz.jpg ├── obj_parser.cpp ├── obj_parser.h ├── posx.jpg ├── posy.jpg ├── posz.jpg ├── reflect_fs.glsl ├── reflect_vs.glsl ├── refract_fs.glsl ├── refract_vs.glsl ├── stb_image.c ├── stb_image.h └── suzanne.obj ├── 29_particle_systems ├── Droplet.png ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── stb_image.c ├── stb_image.h ├── test_fs.glsl └── test_vs.glsl ├── 30_skinning_part_one ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── bones.frag ├── bones.vert ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── monkey_with_bones.dae ├── monkey_with_bones_y_up.dae ├── suzanne.obj ├── test_fs.glsl └── test_vs.glsl ├── 31_skinning_part_two ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── bones.frag ├── bones.vert ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── monkey2.obj ├── monkey_with_skeleton.dae ├── monkey_with_skeleton_y_up.dae ├── suzanne.obj ├── test_fs.glsl └── test_vs.glsl ├── 32_skinnng_part_three ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── bones.frag ├── bones.vert ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── monkey_with_anim.dae ├── monkey_with_anim_y_up.dae ├── test_fs.glsl └── test_vs.glsl ├── 33_extension_check ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 └── main.c ├── 34_framebuffer_switch ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── obj_parser.cpp ├── obj_parser.h ├── post.frag ├── post.vert ├── sphere.frag ├── sphere.obj └── sphere.vert ├── 35_image_kernel ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── obj_parser.cpp ├── obj_parser.h ├── post.frag ├── post.vert ├── sphere.frag ├── sphere.obj └── sphere.vert ├── 36_colour_picking ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── obj_parser.cpp ├── obj_parser.h ├── pick.frag ├── pick.vert ├── sphere.frag ├── sphere.obj └── sphere.vert ├── 37_deferred_shading ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── first_pass.frag ├── first_pass.vert ├── g_buffer_depths.png ├── g_buffer_normals.png ├── g_buffer_positions.png ├── gl_utils.cpp ├── gl_utils.h ├── light_colours.png ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── obj_parser.cpp ├── obj_parser.h ├── plane.obj ├── screenshot.png ├── second_pass.frag ├── second_pass.vert └── sphere.obj ├── 38_texture_shadows ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── depth.frag ├── depth.vert ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── obj_parser.cpp ├── obj_parser.h ├── plain.frag ├── plain.vert ├── sphere.obj ├── ss_quad.frag ├── ss_quad.vert └── suzanne.obj ├── 39_texture_mapping_srgb ├── Makefile.linux32 ├── Makefile.linux64 ├── Makefile.osx ├── Makefile.win32 ├── gl_utils.cpp ├── gl_utils.h ├── main.cpp ├── maths_funcs.cpp ├── maths_funcs.h ├── skulluvmap.png ├── stb_image.c ├── stb_image.h ├── test_fs.glsl └── test_vs.glsl ├── Assimp32.dll ├── CHANGELOG.txt ├── LICENCE.txt ├── README.md ├── TODO_FIXES ├── TODO_MATHS_FUNCS_H_ ├── blender ├── monkey_with_anim_y_up.blend ├── monkey_with_bones_y_up.blend └── monkey_with_skeleton_y_up.blend ├── common ├── include │ ├── GL │ │ ├── glew.h │ │ ├── glxew.h │ │ └── wglew.h │ ├── GLFW │ │ ├── glfw3.h │ │ └── glfw3native.h │ ├── assimp │ │ ├── Compiler │ │ │ ├── poppack1.h │ │ │ └── pushpack1.h │ │ ├── DefaultLogger.hpp │ │ ├── Exporter.hpp │ │ ├── IOStream.hpp │ │ ├── IOSystem.hpp │ │ ├── Importer.hpp │ │ ├── LogStream.hpp │ │ ├── Logger.hpp │ │ ├── NullLogger.hpp │ │ ├── ProgressHandler.hpp │ │ ├── ai_assert.h │ │ ├── anim.h │ │ ├── camera.h │ │ ├── cexport.h │ │ ├── cfileio.h │ │ ├── cimport.h │ │ ├── color4.h │ │ ├── color4.inl │ │ ├── config.h │ │ ├── defs.h │ │ ├── importerdesc.h │ │ ├── light.h │ │ ├── material.h │ │ ├── material.inl │ │ ├── matrix3x3.h │ │ ├── matrix3x3.inl │ │ ├── matrix4x4.h │ │ ├── matrix4x4.inl │ │ ├── mesh.h │ │ ├── postprocess.h │ │ ├── quaternion.h │ │ ├── quaternion.inl │ │ ├── scene.h │ │ ├── texture.h │ │ ├── types.h │ │ ├── vector2.h │ │ ├── vector2.inl │ │ ├── vector3.h │ │ ├── vector3.inl │ │ └── version.h │ └── freetype │ │ ├── config │ │ ├── ftconfig.h │ │ ├── ftheader.h │ │ ├── ftmodule.h │ │ ├── ftoption.h │ │ └── ftstdlib.h │ │ ├── freetype.h │ │ ├── ft2build.h │ │ ├── ftadvanc.h │ │ ├── ftautoh.h │ │ ├── ftbbox.h │ │ ├── ftbdf.h │ │ ├── ftbitmap.h │ │ ├── ftbzip2.h │ │ ├── ftcache.h │ │ ├── ftcffdrv.h │ │ ├── ftchapters.h │ │ ├── ftcid.h │ │ ├── fterrdef.h │ │ ├── fterrors.h │ │ ├── ftgasp.h │ │ ├── ftglyph.h │ │ ├── ftgxval.h │ │ ├── ftgzip.h │ │ ├── ftimage.h │ │ ├── ftincrem.h │ │ ├── ftlcdfil.h │ │ ├── ftlist.h │ │ ├── ftlzw.h │ │ ├── ftmac.h │ │ ├── ftmm.h │ │ ├── ftmodapi.h │ │ ├── ftmoderr.h │ │ ├── ftotval.h │ │ ├── ftoutln.h │ │ ├── ftpfr.h │ │ ├── ftrender.h │ │ ├── ftsizes.h │ │ ├── ftsnames.h │ │ ├── ftstroke.h │ │ ├── ftsynth.h │ │ ├── ftsystem.h │ │ ├── fttrigon.h │ │ ├── ftttdrv.h │ │ ├── fttypes.h │ │ ├── ftwinfnt.h │ │ ├── ftxf86.h │ │ ├── internal │ │ ├── autohint.h │ │ ├── ftcalc.h │ │ ├── ftdebug.h │ │ ├── ftdriver.h │ │ ├── ftgloadr.h │ │ ├── ftmemory.h │ │ ├── ftobjs.h │ │ ├── ftpic.h │ │ ├── ftrfork.h │ │ ├── ftserv.h │ │ ├── ftstream.h │ │ ├── fttrace.h │ │ ├── ftvalid.h │ │ ├── internal.h │ │ ├── psaux.h │ │ ├── pshints.h │ │ ├── services │ │ │ ├── svbdf.h │ │ │ ├── svcid.h │ │ │ ├── svgldict.h │ │ │ ├── svgxval.h │ │ │ ├── svkern.h │ │ │ ├── svmm.h │ │ │ ├── svotval.h │ │ │ ├── svpfr.h │ │ │ ├── svpostnm.h │ │ │ ├── svprop.h │ │ │ ├── svpscmap.h │ │ │ ├── svpsinfo.h │ │ │ ├── svsfnt.h │ │ │ ├── svttcmap.h │ │ │ ├── svtteng.h │ │ │ ├── svttglyf.h │ │ │ ├── svwinfnt.h │ │ │ └── svxf86nm.h │ │ ├── sfnt.h │ │ ├── t1types.h │ │ └── tttypes.h │ │ ├── t1tables.h │ │ ├── ttnameid.h │ │ ├── tttables.h │ │ ├── tttags.h │ │ └── ttunpat.h ├── linux_i386 │ ├── libGLEW.a │ ├── libassimp.a │ └── libglfw3.a ├── linux_x86_64 │ ├── libGLEW.a │ ├── libassimp.a │ ├── libfreetype.a │ └── libglfw3.a ├── maths_funcs.cpp ├── maths_funcs.h ├── msvc110 │ ├── assimp.lib │ ├── freetype.lib │ ├── glew32.lib │ ├── glew32s.lib │ ├── glfw3.lib │ └── glfw3dll.lib ├── osx_64 │ ├── libGLEW.a │ ├── libassimp.a │ └── libglfw3.a └── win32 │ ├── assimp.lib │ ├── freetype.lib │ ├── glfw3dll.a │ └── libglew32.dll.a ├── first_test ├── demo └── main.cpp ├── glew32.dll ├── glfw3.dll └── visual_studio ├── 00_hello_triangle.sdf ├── 00_hello_triangle ├── 00_hello_triangle.vcxproj ├── 00_hello_triangle.vcxproj.filters ├── 00_hello_triangle.vcxproj.user └── Debug │ └── 00_hello_triangle.log ├── 00_hello_triangle_gl2.1 ├── 00_hello_triangle_gl2.1.vcxproj ├── 00_hello_triangle_gl2.1.vcxproj.filters └── Debug │ └── 00_hello_triangle_gl2.1.log ├── 01_extended_init ├── 01_extended_init.vcxproj ├── 01_extended_init.vcxproj.filters ├── 01_extended_init.vcxproj.user ├── Debug │ └── 01_extended_init.log └── gl.log ├── 02_shaders ├── 02_shaders.vcxproj ├── 02_shaders.vcxproj.filters ├── Debug │ └── 02_shaders.log ├── gl.log ├── test_fs.glsl └── test_vs.glsl ├── 03_vertex_buffer_obects ├── 03_vertex_buffer_obects.vcxproj ├── 03_vertex_buffer_obects.vcxproj.filters ├── Debug │ └── 03_vertex_buffer_obects.log ├── gl.log ├── test_fs.glsl └── test_vs.glsl ├── 04_mats_and_vec3 ├── 04_mats_and_vec3.vcxproj ├── 04_mats_and_vec3.vcxproj.filters ├── Debug │ └── 04_mats_and_vec3.log ├── gl.log ├── test_fs.glsl └── test_vs.glsl ├── 05_virtual_camera ├── 05_virtual_camera.vcxproj ├── 05_virtual_camera.vcxproj.filters ├── Debug │ └── 05_virtual_camera.log ├── gl.log ├── test_fs.glsl └── test_vs.glsl ├── 06_vcam_with_quaternion ├── 06_vcam_with_quaternion.vcxproj ├── 06_vcam_with_quaternion.vcxproj.filters ├── Debug │ └── 06_vcam_with_quaternion.log ├── gl.log ├── sphere.obj ├── test_fs.glsl └── test_vs.glsl ├── 07_ray_picking ├── 07_ray_picking.vcxproj ├── 07_ray_picking.vcxproj.filters ├── Debug │ └── 07_ray_picking.log ├── gl.log ├── sphere.obj ├── test_fs.glsl └── test_vs.glsl ├── 08_phong ├── 08_phong.vcxproj ├── 08_phong.vcxproj.filters ├── Debug │ └── 08_phong.log ├── gl.log ├── test_fs.glsl └── test_vs.glsl ├── 09_texture_mapping ├── 09_texture_mapping.vcxproj ├── 09_texture_mapping.vcxproj.filters ├── Debug │ └── 09_texture_mapping.log ├── gl.log ├── skulluvmap.png ├── test_fs.glsl └── test_vs.glsl ├── 10_screen_capture ├── 10_screen_capture.vcxproj ├── 10_screen_capture.vcxproj.filters ├── Debug │ └── 10_screen_capture.log ├── gl.log ├── skulluvmap.png ├── test_fs.glsl └── test_vs.glsl ├── 11_video_capture ├── 11_video_capture.vcxproj ├── 11_video_capture.vcxproj.filters ├── Debug │ └── 11_video_capture.log ├── gl.log ├── skulluvmap.png ├── test_fs.glsl └── test_vs.glsl ├── 12_debugging_shaders ├── 12_debugging_shaders.vcxproj ├── 12_debugging_shaders.vcxproj.filters ├── Debug │ └── 12_debugging_shaders.log ├── ao.png ├── boulder_diff.png ├── boulder_spec.png ├── gl.log ├── suzanne.obj ├── test_fs.glsl ├── test_vs.glsl └── tileable9b_emiss.png ├── 13_load_mesh ├── 13_load_mesh.vcxproj ├── 13_load_mesh.vcxproj.filters ├── Debug │ └── 13_load_mesh.log ├── gl.log ├── monkey2.obj ├── suzanne.obj ├── test_fs.glsl └── test_vs.glsl ├── 14_multi_tex ├── 14_multi_tex.vcxproj ├── 14_multi_tex.vcxproj.filters ├── Debug │ └── 14_multi_tex.log ├── gl.log ├── ship.png ├── skulluvmap.png ├── test_fs.glsl └── test_vs.glsl ├── 15_phongtextures ├── 15_phongtextures.vcxproj ├── 15_phongtextures.vcxproj.filters ├── Debug │ └── 15_phongtextures.log ├── ao.png ├── boulder_diff.png ├── boulder_spec.png ├── gl.log ├── monkey.obj ├── test_fs.glsl ├── test_vs.glsl └── tileable9b_emiss.png ├── 16_frag_reject ├── 16_frag_reject.vcxproj ├── 16_frag_reject.vcxproj.filters ├── Debug │ └── 16_frag_reject.log ├── gl.log ├── skulluvmap.png ├── test_fs.glsl └── test_vs.glsl ├── 17_alpha_blending ├── 17_alpha_blending.vcxproj ├── 17_alpha_blending.vcxproj.filters ├── Debug │ └── 17_alpha_blending.log ├── blob.png ├── blob2.png ├── gl.log ├── test_fs.glsl └── test_vs.glsl ├── 18_spotlights ├── 18_spotlights.vcxproj ├── 18_spotlights.vcxproj.filters ├── Debug │ └── 18_spotlights.log ├── gl.log ├── test_fs.glsl └── test_vs.glsl ├── 19_fog ├── 19_fog.vcxproj ├── 19_fog.vcxproj.filters ├── Debug │ └── 19_fog.log ├── gl.log ├── suzanne.obj ├── test_fs.glsl └── test_vs.glsl ├── 20_normal_mapping ├── 20_normal_mapping.vcxproj ├── 20_normal_mapping.vcxproj.filters ├── Debug │ └── 20_normal_mapping.log ├── brickwork_normal-map.png ├── gl.log ├── light_dir_tan.png ├── normals_pre_ranged.png ├── normals_ranged.png ├── suzanne.obj ├── tangents_test.png ├── test_fs.glsl ├── test_vs.glsl └── view_dir_tan.png ├── 21_cube_mapping ├── 21_cube_mapping.vcxproj ├── 21_cube_mapping.vcxproj.filters ├── Debug │ └── 21_cube_mapping.log ├── cube_fs.glsl ├── cube_vs.glsl ├── gl.log ├── negx.jpg ├── negy.jpg ├── negz.jpg ├── posx.jpg ├── posy.jpg ├── posz.jpg ├── reflect_fs.glsl ├── reflect_vs.glsl ├── refract_fs.glsl ├── refract_vs.glsl └── suzanne.obj ├── 22_geom_shaders ├── 22_geom_shaders.vcxproj ├── 22_geom_shaders.vcxproj.filters ├── Debug │ └── 22_geom_shaders.log ├── geom_shaders_screenshot.png ├── gl.log ├── test_fs.glsl ├── test_gs.glsl └── test_vs.glsl ├── 23_tessellation_shaders ├── 23_tessellation_shaders.vcxproj ├── 23_tessellation_shaders.vcxproj.filters ├── Debug │ └── 23_tessellation_shaders.log ├── gl.log ├── test_fs.glsl ├── test_tcs.glsl ├── test_tes.glsl └── test_vs.glsl ├── 24_gui_panels ├── 24_gui_panels.vcxproj ├── 24_gui_panels.vcxproj.filters ├── Debug │ └── 24_gui_panels.log ├── gui_panels_shot.png ├── skulluvmap.png └── tile2-diamonds256x256.png ├── 25_sprite_sheets ├── 25_sprite_sheets.vcxproj ├── 25_sprite_sheets.vcxproj.filters ├── Debug │ └── 25_sprite_sheets.log └── shark_anim.png ├── 26_bitmap_fonts ├── 26_bitmap_fonts.vcxproj ├── 26_bitmap_fonts.vcxproj.filters ├── Debug │ └── 26_bitmap_fonts.log └── handmade2.png ├── 27_font_atlas ├── 27_font_atlas.vcxproj ├── 27_font_atlas.vcxproj.filters ├── Debug │ ├── 27_font_atlas.lastbuildstate │ └── 27_font_atlas.log ├── FreeMono.ttf ├── atlas.meta ├── atlas.png ├── freemono.meta └── freemono.png ├── 27_font_atlas_viewer.sdf ├── 27_font_atlas_viewer.sln ├── 27_font_atlas_viewer.v11.suo ├── 27_font_atlas_viewer ├── 27_font_atlas_viewer.vcxproj ├── 27_font_atlas_viewer.vcxproj.filters ├── Debug │ └── 27_font_atlas_viewer.log ├── atlas.meta ├── atlas.png ├── freemono.meta └── freemono.png ├── 28_ubo ├── 28_ubo.vcxproj ├── 28_ubo.vcxproj.filters ├── Debug │ └── 28_ubo.log ├── cube_fs.glsl ├── cube_vs.glsl ├── gl.log ├── negx.jpg ├── negy.jpg ├── negz.jpg ├── posx.jpg ├── posy.jpg ├── posz.jpg ├── reflect_fs.glsl ├── reflect_vs.glsl ├── refract_fs.glsl ├── refract_vs.glsl └── suzanne.obj ├── 29_particle_systems ├── 29_particle_systems.vcxproj ├── 29_particle_systems.vcxproj.filters ├── Debug │ └── 29_particle_systems.log ├── Droplet.png ├── gl.log ├── test_fs.glsl └── test_vs.glsl ├── 30_skinning_part_one ├── 30_skinning_part_one.vcxproj ├── 30_skinning_part_one.vcxproj.filters ├── Debug │ └── 30_skinning_part_one.log ├── bones.frag ├── bones.vert ├── gl.log ├── monkey_with_bones.dae ├── monkey_with_bones_y_up.dae ├── test_fs.glsl └── test_vs.glsl ├── 31_skinning_part_two ├── 31_skinning_part_two.vcxproj ├── 31_skinning_part_two.vcxproj.filters ├── Debug │ ├── 31_skinning_part_two.Build.CppClean.log │ └── 31_skinning_part_two.log ├── bones.frag ├── bones.vert ├── gl.log ├── monkey2.obj ├── monkey_with_skeleton.dae ├── monkey_with_skeleton_y_up.dae ├── suzanne.obj ├── test_fs.glsl └── test_vs.glsl ├── 32_skinning_part_three ├── 32_skinning_part_three.vcxproj ├── 32_skinning_part_three.vcxproj.filters ├── Debug │ ├── 32_skinning_part_three.Build.CppClean.log │ └── 32_skinning_part_three.log ├── bones.frag ├── bones.vert ├── gl.log ├── monkey_with_anim.dae ├── monkey_with_anim_y_up.dae ├── test_fs.glsl └── test_vs.glsl ├── 33_extension_check ├── 33_extension_check.vcxproj ├── 33_extension_check.vcxproj.filters └── Debug │ ├── 33_extension_check.Build.CppClean.log │ └── 33_extension_check.log ├── 34_framebuffer ├── 34_framebuffer.vcxproj ├── 34_framebuffer.vcxproj.filters ├── Debug │ ├── 34_framebuffer.Build.CppClean.log │ └── 34_framebuffer.log ├── gl.log ├── post.frag ├── post.vert ├── sphere.frag ├── sphere.obj └── sphere.vert ├── 35_kernel ├── 35_kernel.vcxproj ├── 35_kernel.vcxproj.filters ├── Debug │ ├── 35_kernel.Build.CppClean.log │ └── 35_kernel.log ├── gl.log ├── post.frag ├── post.vert ├── sphere.frag ├── sphere.obj └── sphere.vert ├── 36_colour_picking ├── 36_colour_picking.vcxproj ├── 36_colour_picking.vcxproj.filters ├── Debug │ ├── 36_colour_picking.Build.CppClean.log │ └── 36_colour_picking.log ├── gl.log ├── pick.frag ├── pick.vert ├── sphere.frag ├── sphere.obj └── sphere.vert ├── 37_deferred_lighting ├── 37_deferred_lighting.vcxproj ├── 37_deferred_lighting.vcxproj.filters ├── Debug │ ├── 37_deferred_lighting.Build.CppClean.log │ └── 37_deferred_lighting.log ├── first_pass.frag ├── first_pass.vert ├── g_buffer_depths.png ├── g_buffer_normals.png ├── g_buffer_positions.png ├── gl.log ├── light_colours.png ├── plane.obj ├── screenshot.png ├── second_pass.frag ├── second_pass.vert └── sphere.obj ├── 38_texture_shadows ├── 38_texture_shadows.vcxproj ├── 38_texture_shadows.vcxproj.filters ├── Debug │ ├── 38_texture_shadows.Build.CppClean.log │ └── 38_texture_shadows.log ├── depth.frag ├── depth.vert ├── gl.log ├── plain.frag ├── plain.vert ├── sphere.obj ├── ss_quad.frag ├── ss_quad.vert └── suzanne.obj ├── 39_srgb_texture ├── 39_srgb_texture.vcxproj ├── 39_srgb_texture.vcxproj.filters ├── Debug │ ├── 39_srgb_texture.Build.CppClean.log │ └── 39_srgb_texture.log ├── gl.log ├── skulluvmap.png ├── test_fs.glsl └── test_vs.glsl ├── BasicPropertySheet.props ├── Debug ├── 03_vertex_buffer_objects.exe ├── 03_vertex_buffer_objects.ilk ├── 03_vertex_buffer_objects.pdb ├── 13_mesh_import.exe ├── 13_mesh_import.ilk ├── 13_mesh_import.pdb ├── Assimp32.dll ├── freetype6.dll ├── glew32.dll └── glfw3.dll ├── README.txt ├── maths_funcs.cpp ├── maths_funcs.h ├── tutorials.sdf ├── tutorials.sln ├── tutorials.suo └── tutorials.v11.suo /.gitignore: -------------------------------------------------------------------------------- 1 | /28_uniform_buffer_object/gl.log 2 | /28_uniform_buffer_object/cubemap 3 | -------------------------------------------------------------------------------- /00_hello_triangle/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = hellot 2 | CC = gcc 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.c 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /00_hello_triangle/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = hellot.exe 2 | CC = gcc 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /00_hello_triangle_gl2.1/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = hellot 2 | CC = gcc 3 | #FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lm 7 | SRC = main.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /00_hello_triangle_gl2.1/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = hellot 2 | CC = gcc 3 | #FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lm 7 | SRC = main.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /00_hello_triangle_gl2.1/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = hellot 2 | CC = gcc 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.c 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /00_hello_triangle_gl2.1/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = hellot.exe 2 | CC = gcc 3 | #FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /01_extended_init/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = extinit 2 | CC = gcc 3 | #FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lm 7 | SRC = main.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | -------------------------------------------------------------------------------- /01_extended_init/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = extinit 2 | CC = gcc 3 | #FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lm 7 | SRC = main.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | -------------------------------------------------------------------------------- /01_extended_init/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = extinit 2 | CC = gcc 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.c 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /01_extended_init/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = extinit.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /02_shaders/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = shaders 2 | CC = gcc 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lm 7 | SRC = main.c gl_utils.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | 13 | -------------------------------------------------------------------------------- /02_shaders/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = shaders 2 | CC = gcc 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.c gl_utils.c 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /02_shaders/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = shaders.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.c gl_utils.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /02_shaders/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | uniform vec4 inputColour; 4 | out vec4 fragColour; 5 | 6 | void main() { 7 | fragColour = inputColour; 8 | } 9 | -------------------------------------------------------------------------------- /02_shaders/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vertex_position; 4 | 5 | void main() { 6 | gl_Position = vec4(vertex_position, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /03_vertex_buffer_objects/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = vbuffs 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | -------------------------------------------------------------------------------- /03_vertex_buffer_objects/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = vbuffs 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | -------------------------------------------------------------------------------- /03_vertex_buffer_objects/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = vbuffs 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp gl_utils.cpp 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /03_vertex_buffer_objects/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = vbuffs.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /03_vertex_buffer_objects/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 colour; 4 | out vec4 frag_colour; 5 | 6 | void main() { 7 | frag_colour = vec4 (colour, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /03_vertex_buffer_objects/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | layout(location = 1) in vec3 vertex_colour; 5 | 6 | out vec3 colour; 7 | 8 | void main() { 9 | colour = vertex_colour; 10 | gl_Position = vec4(vertex_position, 1.0); 11 | } 12 | -------------------------------------------------------------------------------- /04_mats_and_vecs/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = matsvecs 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | -------------------------------------------------------------------------------- /04_mats_and_vecs/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = matsvecs 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | -------------------------------------------------------------------------------- /04_mats_and_vecs/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = matsvecs 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp gl_utils.cpp 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /04_mats_and_vecs/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = matsvecs.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /04_mats_and_vecs/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 colour; 4 | out vec4 frag_colour; 5 | 6 | void main() { 7 | frag_colour = vec4 (colour, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /04_mats_and_vecs/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | layout(location = 1) in vec3 vertex_colour; 5 | 6 | uniform mat4 matrix; // our matrix 7 | 8 | out vec3 colour; 9 | 10 | void main() { 11 | colour = vertex_colour; 12 | gl_Position = matrix * vec4(vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /05_virtual_camera/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = vcam 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | -------------------------------------------------------------------------------- /05_virtual_camera/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = vcam 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | -------------------------------------------------------------------------------- /05_virtual_camera/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = vcam 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /05_virtual_camera/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = vcam.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /05_virtual_camera/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 colour; 4 | out vec4 frag_colour; 5 | 6 | void main() { 7 | frag_colour = vec4 (colour, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /05_virtual_camera/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | layout(location = 1) in vec3 vertex_colour; 5 | 6 | uniform mat4 view, proj; 7 | 8 | out vec3 colour; 9 | 10 | void main() { 11 | colour = vertex_colour; 12 | gl_Position = proj * view * vec4 (vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /06_vcam_with_quaternion/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = quats 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | -------------------------------------------------------------------------------- /06_vcam_with_quaternion/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = quats 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | -------------------------------------------------------------------------------- /06_vcam_with_quaternion/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = quats 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp obj_parser.cpp 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /06_vcam_with_quaternion/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = quats.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /06_vcam_with_quaternion/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in float dist; 4 | out vec4 frag_colour; 5 | 6 | void main() { 7 | frag_colour = vec4 (1.0, 0.0, 0.0, 1.0); 8 | // use z position to shader darker to help perception of distance 9 | frag_colour.xyz *= dist; 10 | } 11 | -------------------------------------------------------------------------------- /06_vcam_with_quaternion/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | uniform mat4 model, view, proj; 5 | // use z position to shader darker to help perception of distance 6 | out float dist; 7 | 8 | void main() { 9 | gl_Position = proj * view * model * vec4 (vertex_position, 1.0); 10 | dist = vertex_position.z;//1.0 - (-pos_eye.z / 10.0); 11 | } 12 | -------------------------------------------------------------------------------- /07_ray_picking/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = raypick 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | -------------------------------------------------------------------------------- /07_ray_picking/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = raypick 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | -------------------------------------------------------------------------------- /07_ray_picking/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = raypick 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp obj_parser.cpp 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /07_ray_picking/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = raypick.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /07_ray_picking/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in float dist; 4 | uniform float blue = 0.0; 5 | out vec4 frag_colour; 6 | 7 | void main() { 8 | frag_colour = vec4 (1.0, 0.0, blue, 1.0); 9 | // use z position to shader darker to help perception of distance 10 | frag_colour.xyz *= dist; 11 | } 12 | -------------------------------------------------------------------------------- /07_ray_picking/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | uniform mat4 model, view, proj; 5 | // use z position to shader darker to help perception of distance 6 | out float dist; 7 | 8 | void main() { 9 | gl_Position = proj * view * model * vec4 (vertex_position, 1.0); 10 | dist = vertex_position.z;//1.0 - (-pos_eye.z / 10.0); 11 | } 12 | -------------------------------------------------------------------------------- /08_phong/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = phong 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /08_phong/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = phong 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /08_phong/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = phong 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /08_phong/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = phong.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /08_phong/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout (location = 0) in vec3 vertex_position; 4 | layout (location = 1) in vec3 vertex_normal; 5 | uniform mat4 projection_mat, view_mat, model_mat; 6 | out vec3 position_eye, normal_eye; 7 | 8 | void main () { 9 | position_eye = vec3 (view_mat * model_mat * vec4 (vertex_position, 1.0)); 10 | normal_eye = vec3 (view_mat * model_mat * vec4 (vertex_normal, 0.0)); 11 | gl_Position = projection_mat * vec4 (position_eye, 1.0); 12 | } 13 | -------------------------------------------------------------------------------- /09_texture_mapping/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = texmap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /09_texture_mapping/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = texmap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /09_texture_mapping/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = texmap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /09_texture_mapping/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = texmap.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /09_texture_mapping/skulluvmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/09_texture_mapping/skulluvmap.png -------------------------------------------------------------------------------- /09_texture_mapping/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 texture_coordinates; 4 | uniform sampler2D basic_texture; 5 | out vec4 frag_colour; 6 | 7 | void main() { 8 | vec4 texel = texture (basic_texture, texture_coordinates); 9 | frag_colour = texel; 10 | } 11 | -------------------------------------------------------------------------------- /09_texture_mapping/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout (location = 0) in vec3 vertex_position; 4 | layout (location = 1) in vec2 vt; // per-vertex texture co-ords 5 | 6 | uniform mat4 view, proj; 7 | 8 | out vec2 texture_coordinates; 9 | 10 | void main() { 11 | texture_coordinates = vt; 12 | gl_Position = proj * view * vec4 (vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /10_screen_capture/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = scrcap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c stb_image_write.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /10_screen_capture/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = scrcap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c stb_image_write.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /10_screen_capture/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = scrcap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c stb_image_write.c 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /10_screen_capture/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = scrcap.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp stb_image.c stb_image_write.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /10_screen_capture/skulluvmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/10_screen_capture/skulluvmap.png -------------------------------------------------------------------------------- /10_screen_capture/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 texture_coordinates; 4 | uniform sampler2D basic_texture; 5 | out vec4 frag_colour; 6 | 7 | void main() { 8 | vec4 texel = texture (basic_texture, texture_coordinates); 9 | frag_colour = texel; 10 | } 11 | -------------------------------------------------------------------------------- /10_screen_capture/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout (location = 0) in vec3 vertex_position; 4 | layout (location = 1) in vec2 vt; // per-vertex texture co-ords 5 | 6 | uniform mat4 view, proj; 7 | 8 | out vec2 texture_coordinates; 9 | 10 | void main() { 11 | texture_coordinates = vt; 12 | gl_Position = proj * view * vec4 (vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /11_video_capture/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = vidcap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c stb_image_write.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /11_video_capture/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = vidcap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c stb_image_write.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /11_video_capture/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = vidcap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c stb_image_write.c 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /11_video_capture/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = vidcap.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp stb_image.c stb_image_write.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /11_video_capture/skulluvmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/11_video_capture/skulluvmap.png -------------------------------------------------------------------------------- /11_video_capture/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 texture_coordinates; 4 | uniform sampler2D basic_texture; 5 | out vec4 frag_colour; 6 | 7 | void main() { 8 | vec4 texel = texture (basic_texture, texture_coordinates); 9 | frag_colour = texel; 10 | } 11 | -------------------------------------------------------------------------------- /11_video_capture/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout (location = 0) in vec3 vertex_position; 4 | layout (location = 1) in vec2 vt; // per-vertex texture co-ords 5 | 6 | uniform mat4 view, proj; 7 | 8 | out vec2 texture_coordinates; 9 | 10 | void main() { 11 | texture_coordinates = vt; 12 | gl_Position = proj * view * vec4 (vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /12_debugging_shaders/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = debugshdrs 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /12_debugging_shaders/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = debugshdrs 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /12_debugging_shaders/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = debugshdrs 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c obj_parser.cpp 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /12_debugging_shaders/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = debugshdrs.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp stb_image.c obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /12_debugging_shaders/ao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/12_debugging_shaders/ao.png -------------------------------------------------------------------------------- /12_debugging_shaders/boulder_diff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/12_debugging_shaders/boulder_diff.png -------------------------------------------------------------------------------- /12_debugging_shaders/boulder_spec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/12_debugging_shaders/boulder_spec.png -------------------------------------------------------------------------------- /12_debugging_shaders/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 420 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | layout(location = 1) in vec3 vertex_normal; 5 | layout(location = 2) in vec2 texture_coord; 6 | 7 | uniform mat4 view, proj; 8 | 9 | out vec3 pos_eye; 10 | out vec3 norm_eye; // positions and normals in eye space 11 | out vec2 st; // texture coordinates passed through from from vertex shader 12 | 13 | void main() { 14 | st = texture_coord; 15 | norm_eye = (view * vec4 (vertex_normal, 0.0)).xyz;; 16 | pos_eye = (view * vec4 (vertex_position, 1.0)).xyz; 17 | gl_Position = proj * vec4 (pos_eye, 1.0); 18 | } 19 | -------------------------------------------------------------------------------- /12_debugging_shaders/tileable9b_emiss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/12_debugging_shaders/tileable9b_emiss.png -------------------------------------------------------------------------------- /13_mesh_import/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = meshimp 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -g 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a ../common/linux_i386/libassimp.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /13_mesh_import/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = meshimp 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -g 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a ../common/linux_x86_64/libassimp.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /13_mesh_import/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = meshimp 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a $(LIB_PATH)libassimp.a 7 | SYS_LIB = -lz 8 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 9 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 10 | 11 | all: 12 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 13 | 14 | -------------------------------------------------------------------------------- /13_mesh_import/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = meshimp.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a ../common/win32/assimp.lib 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /13_mesh_import/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 normal; 4 | in vec2 st; 5 | out vec4 frag_colour; 6 | 7 | void main() { 8 | frag_colour = vec4 (normal, 1.0); 9 | } 10 | -------------------------------------------------------------------------------- /13_mesh_import/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | layout(location = 1) in vec3 vertex_normal; 5 | layout(location = 2) in vec2 texture_coord; 6 | 7 | uniform mat4 view, proj; 8 | 9 | out vec3 normal; 10 | out vec2 st; 11 | 12 | void main() { 13 | st = texture_coord; 14 | normal = vertex_normal; 15 | gl_Position = proj * view * vec4 (vertex_position, 1.0); 16 | } 17 | -------------------------------------------------------------------------------- /14_multi_tex/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = multitex 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /14_multi_tex/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = multitex 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /14_multi_tex/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = multitex 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /14_multi_tex/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = multitex.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /14_multi_tex/ship.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/14_multi_tex/ship.png -------------------------------------------------------------------------------- /14_multi_tex/skulluvmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/14_multi_tex/skulluvmap.png -------------------------------------------------------------------------------- /14_multi_tex/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 texture_coordinates; 4 | uniform sampler2D basic_texture; 5 | uniform sampler2D second_texture; 6 | out vec4 frag_colour; 7 | 8 | void main() { 9 | vec4 texel_a = texture (basic_texture, texture_coordinates); 10 | vec4 texel_b = texture (second_texture, texture_coordinates); 11 | frag_colour = mix (texel_a, texel_b, texture_coordinates.s); 12 | } 13 | -------------------------------------------------------------------------------- /14_multi_tex/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout (location = 0) in vec3 vertex_position; 4 | layout (location = 1) in vec2 vt; // per-vertex texture co-ords 5 | 6 | uniform mat4 view, proj; 7 | 8 | out vec2 texture_coordinates; 9 | 10 | void main() { 11 | texture_coordinates = vt; 12 | gl_Position = proj * view * vec4 (vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /15_phongtextures/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = phongtex 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a ../common/linux_i386/libassimp.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /15_phongtextures/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = phongtex 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a ../common/linux_x86_64/libassimp.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /15_phongtextures/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = phongtex 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a $(LIB_PATH)libassimp.a 7 | SYS_LIB = -lz 8 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 9 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 10 | 11 | all: 12 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 13 | 14 | -------------------------------------------------------------------------------- /15_phongtextures/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = phongtex.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a ../common/win32/assimp.lib 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /15_phongtextures/ao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/15_phongtextures/ao.png -------------------------------------------------------------------------------- /15_phongtextures/boulder_diff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/15_phongtextures/boulder_diff.png -------------------------------------------------------------------------------- /15_phongtextures/boulder_spec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/15_phongtextures/boulder_spec.png -------------------------------------------------------------------------------- /15_phongtextures/monkey.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/15_phongtextures/monkey.blend -------------------------------------------------------------------------------- /15_phongtextures/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 420 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | layout(location = 1) in vec3 vertex_normal; 5 | layout(location = 2) in vec2 texture_coord; 6 | 7 | uniform mat4 view, proj; 8 | 9 | out vec3 pos_eye; 10 | out vec3 norm_eye; // positions and normals in eye space 11 | out vec2 st; // texture coordinates passed through from from vertex shader 12 | 13 | void main() { 14 | st = texture_coord; 15 | norm_eye = (view * vec4 (vertex_normal, 0.0)).xyz;; 16 | pos_eye = (view * vec4 (vertex_position, 1.0)).xyz; 17 | gl_Position = proj * vec4 (pos_eye, 1.0); 18 | } 19 | -------------------------------------------------------------------------------- /15_phongtextures/tileable9b_emiss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/15_phongtextures/tileable9b_emiss.png -------------------------------------------------------------------------------- /16_frag_reject/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = fragrej 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /16_frag_reject/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = fragrej 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /16_frag_reject/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = fragrej 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /16_frag_reject/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = fragrej.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /16_frag_reject/skulluvmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/16_frag_reject/skulluvmap.png -------------------------------------------------------------------------------- /16_frag_reject/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 texture_coordinates; 4 | uniform sampler2D basic_texture; 5 | out vec4 frag_colour; 6 | 7 | void main() { 8 | vec4 texel = texture (basic_texture, texture_coordinates); 9 | frag_colour = texel; 10 | if (texel.r > 0.2 && texel.g + texel.b < 1.0) { 11 | discard; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /16_frag_reject/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout (location = 0) in vec3 vertex_position; 4 | layout (location = 1) in vec2 vt; // per-vertex texture co-ords 5 | 6 | uniform mat4 view, proj; 7 | 8 | out vec2 texture_coordinates; 9 | 10 | void main() { 11 | texture_coordinates = vt; 12 | gl_Position = proj * view * vec4 (vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /17_alpha_blending/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = alphablend 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /17_alpha_blending/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = alphablend 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /17_alpha_blending/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = alphablend 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /17_alpha_blending/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = alphablend.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /17_alpha_blending/blob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/17_alpha_blending/blob.png -------------------------------------------------------------------------------- /17_alpha_blending/blob2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/17_alpha_blending/blob2.png -------------------------------------------------------------------------------- /17_alpha_blending/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 texture_coordinates; 4 | uniform sampler2D basic_texture; 5 | out vec4 frag_colour; 6 | 7 | void main() { 8 | vec4 texel = texture (basic_texture, texture_coordinates); 9 | frag_colour = texel; 10 | } 11 | -------------------------------------------------------------------------------- /17_alpha_blending/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout (location = 0) in vec3 vertex_position; 4 | layout (location = 1) in vec2 vt; // per-vertex texture co-ords 5 | 6 | uniform mat4 model, view, proj; 7 | 8 | out vec2 texture_coordinates; 9 | 10 | void main() { 11 | texture_coordinates = vt; 12 | gl_Position = proj * view * model * vec4 (vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /18_spotlights/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = spotlights 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /18_spotlights/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = spotlights 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /18_spotlights/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = spotlights 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /18_spotlights/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = spotlights.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /18_spotlights/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in layout (location = 0) vec3 vertex_position; 4 | in layout (location = 1) vec3 vertex_normal; 5 | uniform mat4 projection_mat, view_mat, model_mat; 6 | out vec3 position_eye, normal_eye; 7 | 8 | void main () { 9 | position_eye = vec3 (view_mat * model_mat * vec4 (vertex_position, 1.0)); 10 | normal_eye = vec3 (view_mat * model_mat * vec4 (vertex_normal, 0.0)); 11 | gl_Position = projection_mat * vec4 (position_eye, 1.0); 12 | } 13 | -------------------------------------------------------------------------------- /19_fog/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = fog 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a ../common/linux_i386/libassimp.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /19_fog/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = fog 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a ../common/linux_x86_64/libassimp.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /19_fog/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = fog 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a $(LIB_PATH)libassimp.a 7 | SYS_LIB = -lz 8 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 9 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 10 | 11 | all: 12 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 13 | 14 | -------------------------------------------------------------------------------- /19_fog/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = fog.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a ../common/win32/assimp.lib 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /19_fog/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | layout(location = 1) in vec3 vertex_normal; 5 | layout(location = 2) in vec2 texture_coord; 6 | 7 | uniform mat4 view, proj; 8 | uniform float time; 9 | 10 | out vec3 normal; 11 | out vec3 pos_eye; 12 | 13 | void main() { 14 | pos_eye = (view * vec4 (vertex_position, 1.0)).xyz; 15 | pos_eye.z += sin (time); 16 | normal = vertex_normal; 17 | gl_Position = proj * vec4 (pos_eye, 1.0); 18 | } 19 | -------------------------------------------------------------------------------- /20_normal_mapping/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = nmap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a ../common/linux_i386/libassimp.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /20_normal_mapping/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = nmap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a ../common/linux_x86_64/libassimp.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /20_normal_mapping/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = nmap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a $(LIB_PATH)libassimp.a 7 | SYS_LIB = -lz 8 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 9 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 10 | 11 | all: 12 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 13 | 14 | -------------------------------------------------------------------------------- /20_normal_mapping/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = nmap.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a ../common/win32/assimp.lib 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /20_normal_mapping/brickwork_normal-map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/20_normal_mapping/brickwork_normal-map.png -------------------------------------------------------------------------------- /21_cube_mapping/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = cubemap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LIB_DIR = ../common/linux_i386/ 6 | LOC_LIB = $(LIB_DIR)libGLEW.a $(LIB_DIR)libglfw3.a $(LIB_DIR)libassimp.a 7 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 8 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c obj_parser.cpp 9 | 10 | all: 11 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 12 | 13 | -------------------------------------------------------------------------------- /21_cube_mapping/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = cubemap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a ../common/linux_x86_64/libassimp.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /21_cube_mapping/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = cubemap.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp stb_image.c obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /21_cube_mapping/cube_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 texcoords; 4 | uniform samplerCube cube_texture; 5 | out vec4 frag_colour; 6 | 7 | void main () { 8 | frag_colour = texture (cube_texture, texcoords); 9 | } 10 | -------------------------------------------------------------------------------- /21_cube_mapping/cube_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 P, V; 5 | out vec3 texcoords; 6 | 7 | void main () { 8 | texcoords = vp; 9 | gl_Position = P * V * vec4 (vp, 1.0); 10 | } 11 | -------------------------------------------------------------------------------- /21_cube_mapping/negx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/21_cube_mapping/negx.jpg -------------------------------------------------------------------------------- /21_cube_mapping/negy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/21_cube_mapping/negy.jpg -------------------------------------------------------------------------------- /21_cube_mapping/negz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/21_cube_mapping/negz.jpg -------------------------------------------------------------------------------- /21_cube_mapping/posx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/21_cube_mapping/posx.jpg -------------------------------------------------------------------------------- /21_cube_mapping/posy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/21_cube_mapping/posy.jpg -------------------------------------------------------------------------------- /21_cube_mapping/posz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/21_cube_mapping/posz.jpg -------------------------------------------------------------------------------- /21_cube_mapping/reflect_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 pos_eye; 4 | in vec3 n_eye; 5 | uniform samplerCube cube_texture; 6 | uniform mat4 V; // view matrix 7 | out vec4 frag_colour; 8 | 9 | void main () { 10 | /* reflect ray around normal from eye to surface */ 11 | vec3 incident_eye = normalize (pos_eye); 12 | vec3 normal = normalize (n_eye); 13 | 14 | vec3 reflected = reflect (incident_eye, normal); 15 | // convert from eye to world space 16 | reflected = vec3 (inverse (V) * vec4 (reflected, 0.0)); 17 | 18 | frag_colour = texture (cube_texture, reflected); 19 | } 20 | -------------------------------------------------------------------------------- /21_cube_mapping/reflect_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vp; // positions from mesh 4 | layout(location = 1) in vec3 vn; // normals from mesh 5 | uniform mat4 P, V, M; // proj, view, model matrices 6 | out vec3 pos_eye; 7 | out vec3 n_eye; 8 | 9 | void main () { 10 | pos_eye = vec3 (V * M * vec4 (vp, 1.0)); 11 | n_eye = vec3 (V * M * vec4 (vn, 0.0)); 12 | gl_Position = P * V * M * vec4 (vp, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /21_cube_mapping/refract_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 pos_eye; 4 | in vec3 n_eye; 5 | uniform samplerCube cube_texture; 6 | uniform mat4 V; // view matrix 7 | out vec4 frag_colour; 8 | 9 | void main () { 10 | /* reflect ray around normal from eye to surface */ 11 | vec3 incident_eye = normalize (pos_eye); 12 | vec3 normal = normalize (n_eye); 13 | 14 | float ratio = 1.0 /1.3333; 15 | vec3 refracted = refract (incident_eye, normal, ratio); 16 | refracted = vec3 (inverse (V) * vec4 (refracted, 0.0)); 17 | 18 | frag_colour = texture (cube_texture, refracted); 19 | } 20 | -------------------------------------------------------------------------------- /21_cube_mapping/refract_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vp; // positions from mesh 4 | layout(location = 1) in vec3 vn; // normals from mesh 5 | uniform mat4 P, V, M; // proj, view, model matrices 6 | out vec3 pos_eye; 7 | out vec3 n_eye; 8 | 9 | void main () { 10 | pos_eye = vec3 (V * M * vec4 (vp, 1.0)); 11 | n_eye = vec3 (V * M * vec4 (vn, 0.0)); 12 | gl_Position = P * V * M * vec4 (vp, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /22_geom_shaders/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = geomsh32 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /22_geom_shaders/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = geomsh 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /22_geom_shaders/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = geomsh 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp gl_utils.cpp 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /22_geom_shaders/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = geomsh.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /22_geom_shaders/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 f_colour; 4 | out vec4 frag_colour; 5 | 6 | void main() { 7 | frag_colour = vec4 (f_colour, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /22_geom_shaders/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | layout(location = 1) in vec3 vertex_colour; 5 | out vec3 colour; 6 | 7 | void main() { 8 | colour = vertex_colour; 9 | gl_Position = vec4(vertex_position, 1.0); 10 | } 11 | -------------------------------------------------------------------------------- /23_tessellation_shaders/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = tess32 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /23_tessellation_shaders/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = tess 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /23_tessellation_shaders/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = tess 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp gl_utils.cpp 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /23_tessellation_shaders/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = tess.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /23_tessellation_shaders/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 colour; // i made this up in the tess. evaluation shader 4 | out vec4 fragcolour; 5 | 6 | void main () { 7 | fragcolour = vec4 (colour, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /23_tessellation_shaders/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp_loc; 4 | out vec3 controlpoint_wor; 5 | 6 | void main() { 7 | controlpoint_wor = vp_loc; // control points out == vertex points in 8 | } 9 | 10 | -------------------------------------------------------------------------------- /24_gui_panels/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = overlays32 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /24_gui_panels/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = overlays 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /24_gui_panels/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = overlays 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp maths_funcs.cpp stb_image.c 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /24_gui_panels/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = overlays.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp maths_funcs.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /24_gui_panels/skulluvmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/24_gui_panels/skulluvmap.png -------------------------------------------------------------------------------- /24_gui_panels/tile2-diamonds256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/24_gui_panels/tile2-diamonds256x256.png -------------------------------------------------------------------------------- /25_sprite_sheets/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = sprites32 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /25_sprite_sheets/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = sprites 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /25_sprite_sheets/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = sprites 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp maths_funcs.cpp stb_image.c 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /25_sprite_sheets/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = sprites.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp maths_funcs.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /25_sprite_sheets/shark_anim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/25_sprite_sheets/shark_anim.png -------------------------------------------------------------------------------- /26_bitmap_fonts/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = fonts 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /26_bitmap_fonts/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = fonts 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp maths_funcs.cpp stb_image.c 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /26_bitmap_fonts/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = fonts.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp maths_funcs.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /26_bitmap_fonts/handmade2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/26_bitmap_fonts/handmade2.png -------------------------------------------------------------------------------- /27_font_atlas/FreeMono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/27_font_atlas/FreeMono.ttf -------------------------------------------------------------------------------- /27_font_atlas/Makefile.linux64: -------------------------------------------------------------------------------- 1 | CC = g++ 2 | FLAGS = -Wall -pedantic 3 | INC = -I ../common/include -I ../common/include/freetype 4 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 5 | 6 | all: generator viewer 7 | 8 | generator: 9 | ${CC} ${FLAGS} -o generate generator_main.cpp stb_image_write.c ${INC} ../common/linux_x86_64/libfreetype.a ${SYS_LIB} 10 | 11 | viewer: 12 | ${CC} ${FLAGS} -o view viewer_main.cpp maths_funcs.cpp stb_image.c ${INC} ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a ${SYS_LIB} 13 | -------------------------------------------------------------------------------- /27_font_atlas/Makefile.win32: -------------------------------------------------------------------------------- 1 | CC = g++ 2 | FLAGS = -Wall -pedantic 3 | INC = -I ../common/include -I ../common/include/freetype 4 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 5 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 6 | 7 | all: generator viewer 8 | 9 | generator: 10 | ${CC} ${FLAGS} -o generate.exe generator_main.cpp stb_image_write.c ${INC} ../common/win32/freetype.lib ${SYS_LIB} 11 | 12 | viewer: 13 | ${CC} ${FLAGS} -o view.exe viewer_main.cpp maths_funcs.cpp stb_image.c ${INC} ${LOC_LIB} ${SYS_LIB} 14 | 15 | -------------------------------------------------------------------------------- /27_font_atlas/freemono.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/27_font_atlas/freemono.png -------------------------------------------------------------------------------- /28_uniform_buffer_object/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = cubemap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a ../common/linux_x86_64/libassimp.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /28_uniform_buffer_object/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = ubo.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp obj_parser.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /28_uniform_buffer_object/cube_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 texcoords; 4 | uniform samplerCube cube_texture; 5 | out vec4 frag_colour; 6 | 7 | void main () { 8 | frag_colour = texture (cube_texture, texcoords); 9 | } 10 | -------------------------------------------------------------------------------- /28_uniform_buffer_object/cube_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | //uniform mat4 P, V; 5 | uniform mat4 cam_R; 6 | out vec3 texcoords; 7 | 8 | /* virtual camera uniforms */ 9 | layout (std140) uniform cam_block { 10 | mat4 P; 11 | mat4 V; // not used by cube - it has it's own view matrix cam_R 12 | }; 13 | 14 | void main () { 15 | texcoords = vp; 16 | gl_Position = P * cam_R * vec4 (vp, 1.0); 17 | } 18 | -------------------------------------------------------------------------------- /28_uniform_buffer_object/negx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/28_uniform_buffer_object/negx.jpg -------------------------------------------------------------------------------- /28_uniform_buffer_object/negy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/28_uniform_buffer_object/negy.jpg -------------------------------------------------------------------------------- /28_uniform_buffer_object/negz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/28_uniform_buffer_object/negz.jpg -------------------------------------------------------------------------------- /28_uniform_buffer_object/posx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/28_uniform_buffer_object/posx.jpg -------------------------------------------------------------------------------- /28_uniform_buffer_object/posy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/28_uniform_buffer_object/posy.jpg -------------------------------------------------------------------------------- /28_uniform_buffer_object/posz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/28_uniform_buffer_object/posz.jpg -------------------------------------------------------------------------------- /28_uniform_buffer_object/reflect_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vp; // positions from mesh 4 | layout(location = 1) in vec3 vn; // normals from mesh 5 | 6 | /* virtual camera uniforms */ 7 | layout (std140) uniform cam_block { 8 | mat4 P; 9 | mat4 V; 10 | }; 11 | 12 | uniform mat4 M; // model matrix 13 | out vec3 pos_eye; 14 | out vec3 n_eye; 15 | 16 | void main () { 17 | pos_eye = vec3 (V * M * vec4 (vp, 1.0)); 18 | n_eye = vec3 (V * M * vec4 (vn, 0.0)); 19 | gl_Position = P * V * M * vec4 (vp, 1.0); 20 | } 21 | -------------------------------------------------------------------------------- /28_uniform_buffer_object/refract_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vp; // positions from mesh 4 | layout(location = 1) in vec3 vn; // normals from mesh 5 | uniform mat4 M; // model matrix 6 | 7 | /* virtual camera uniforms */ 8 | layout (std140) uniform cam_block { 9 | mat4 P; 10 | mat4 V; 11 | }; 12 | 13 | out vec3 pos_eye; 14 | out vec3 n_eye; 15 | 16 | void main () { 17 | pos_eye = vec3 (V * M * vec4 (vp, 1.0)); 18 | n_eye = vec3 (V * M * vec4 (vn, 0.0)); 19 | gl_Position = P * V * M * vec4 (vp, 1.0); 20 | } 21 | -------------------------------------------------------------------------------- /29_particle_systems/Droplet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/29_particle_systems/Droplet.png -------------------------------------------------------------------------------- /29_particle_systems/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = particles 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /29_particle_systems/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = particles 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /29_particle_systems/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = particles 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /29_particle_systems/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = particles.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /29_particle_systems/test_fs.glsl: -------------------------------------------------------------------------------- 1 | /* shader to render simple particle system points */ 2 | #version 410 core 3 | 4 | in float opacity; 5 | uniform sampler2D tex; // optional. enable point-sprite coords to use 6 | out vec4 frag_colour; 7 | 8 | const vec4 particle_colour = vec4 (0.4, 0.4, 0.8, 0.8); 9 | 10 | void main () { 11 | // using point texture coordinates which are pre-defined over the point 12 | vec4 texel = texture (tex, gl_PointCoord); 13 | frag_colour.a = opacity * texel.a; 14 | frag_colour.rgb = particle_colour.rgb * texel.rgb; 15 | } 16 | -------------------------------------------------------------------------------- /30_skinning_part_one/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = skin 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -g 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a ../common/linux_x86_64/libassimp.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /30_skinning_part_one/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = skin 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a $(LIB_PATH)libassimp.a 7 | SYS_LIB = -lz 8 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 9 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 10 | 11 | all: 12 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 13 | 14 | -------------------------------------------------------------------------------- /30_skinning_part_one/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = skin.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a ../common/win32/assimp.lib 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /30_skinning_part_one/bones.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | out vec4 frag_colour; 4 | 5 | void main () { 6 | frag_colour = vec4 (1.0, 1.0, 0.0, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /30_skinning_part_one/bones.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 proj, view; 5 | 6 | void main () { 7 | gl_PointSize = 10.0; 8 | gl_Position = proj * view * vec4 (vp, 1.0); 9 | } 10 | -------------------------------------------------------------------------------- /30_skinning_part_one/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 normal; 4 | in vec2 st; 5 | in vec3 colour; 6 | out vec4 frag_colour; 7 | 8 | void main() { 9 | frag_colour = vec4 (colour, 1.0); 10 | } 11 | -------------------------------------------------------------------------------- /31_skinning_part_two/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = skin 2 | CC = g++ -g 3 | FLAGS = -Wall -pedantic -g 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a ../common/linux_x86_64/libassimp.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /31_skinning_part_two/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = skin 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a $(LIB_PATH)libassimp.a 7 | SYS_LIB = -lz 8 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 9 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 10 | 11 | all: 12 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 13 | 14 | -------------------------------------------------------------------------------- /31_skinning_part_two/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = skin.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a ../common/win32/assimp.lib 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /31_skinning_part_two/bones.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | out vec4 frag_colour; 4 | 5 | void main () { 6 | frag_colour = vec4 (1.0, 1.0, 0.0, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /31_skinning_part_two/bones.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 proj, view; 5 | 6 | void main () { 7 | gl_PointSize = 10.0; 8 | gl_Position = proj * view * vec4 (vp, 1.0); 9 | } 10 | -------------------------------------------------------------------------------- /31_skinning_part_two/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 normal; 4 | in vec2 st; 5 | in vec3 colour; 6 | out vec4 frag_colour; 7 | 8 | void main() { 9 | frag_colour = vec4 (colour, 1.0); 10 | } 11 | -------------------------------------------------------------------------------- /32_skinnng_part_three/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = skin 2 | CC = g++ -g 3 | FLAGS = -Wall -pedantic -g 4 | INC = -I ../common/include 5 | LP = ../common/linux_i386/ 6 | LOC_LIB = ${LP}libGLEW.a ${LP}libglfw3.a ${LP}libassimp.a 7 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 8 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 9 | 10 | all: 11 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 12 | 13 | -------------------------------------------------------------------------------- /32_skinnng_part_three/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = skin 2 | CC = g++ -g 3 | FLAGS = -Wall -pedantic -g 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a ../common/linux_x86_64/libassimp.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /32_skinnng_part_three/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = skin 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a $(LIB_PATH)libassimp.a 7 | SYS_LIB = -lz 8 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 9 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp 10 | 11 | all: 12 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 13 | 14 | -------------------------------------------------------------------------------- /32_skinnng_part_three/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = skin.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a ../common/win32/assimp.lib 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp gl_utils.cpp maths_funcs.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /32_skinnng_part_three/bones.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | out vec4 frag_colour; 4 | 5 | void main () { 6 | frag_colour = vec4 (1.0, 1.0, 0.0, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /32_skinnng_part_three/bones.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 proj, view; 5 | 6 | void main () { 7 | gl_PointSize = 10.0; 8 | gl_Position = proj * view * vec4 (vp, 1.0); 9 | } 10 | -------------------------------------------------------------------------------- /32_skinnng_part_three/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 normal; 4 | in vec2 st; 5 | in vec3 colour; 6 | out vec4 frag_colour; 7 | 8 | void main() { 9 | frag_colour = vec4 (colour, 1.0); 10 | } 11 | -------------------------------------------------------------------------------- /33_extension_check/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = hellot 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.c 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /33_extension_check/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = hellot.exe 2 | CC = gcc 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /34_framebuffer_switch/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = fbuffer32 2 | CC = g++ -g 3 | FLAGS = -Wall -pedantic -g 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /34_framebuffer_switch/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = fbuffer64 2 | CC = g++ -g 3 | FLAGS = -Wall -pedantic -g 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /34_framebuffer_switch/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = fbuffer 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | SYS_LIB = -lz 8 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 9 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp obj_parser.cpp 10 | 11 | all: 12 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 13 | 14 | -------------------------------------------------------------------------------- /34_framebuffer_switch/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = fbuffer.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp obj_parser.cpp maths_funcs.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /34_framebuffer_switch/post.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | // texture coordinates from vertex shaders 4 | in vec2 st; 5 | 6 | // texture sampler 7 | uniform sampler2D tex; 8 | 9 | // output fragment colour RGBA 10 | out vec4 frag_colour; 11 | 12 | void main () { 13 | // invert colour of right-hand side 14 | vec3 colour; 15 | if (st.s >= 0.5) { 16 | colour = 1.0 - texture (tex, st).rgb; 17 | } else { 18 | colour = texture (tex, st).rgb; 19 | } 20 | frag_colour = vec4 (colour, 1.0); 21 | //frag_colour = texture (tex, st); 22 | } 23 | -------------------------------------------------------------------------------- /34_framebuffer_switch/post.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | // vertex positions input attribute 4 | in vec2 vp; 5 | 6 | // texture coordinates to be interpolated to fragment shaders 7 | out vec2 st; 8 | 9 | void main () { 10 | // interpolate texture coordinates 11 | st = (vp + 1.0) * 0.5; 12 | // transform vertex position to clip space (camera view and perspective) 13 | gl_Position = vec4 (vp, 0.0, 1.0); 14 | } 15 | -------------------------------------------------------------------------------- /34_framebuffer_switch/sphere.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | out vec4 frag_colour; 4 | 5 | void main () { 6 | frag_colour = vec4 (1.0, 0.0, 0.0, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /34_framebuffer_switch/sphere.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 P, V; 5 | 6 | void main () { 7 | gl_Position = P * V * vec4 (vp, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /35_image_kernel/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = kernel 2 | CC = g++ -g 3 | FLAGS = -Wall -pedantic -g 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /35_image_kernel/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = kernel 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | SYS_LIB = -lz 8 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 9 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp obj_parser.cpp 10 | 11 | all: 12 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 13 | 14 | -------------------------------------------------------------------------------- /35_image_kernel/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = kernel.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp obj_parser.cpp maths_funcs.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /35_image_kernel/post.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | // vertex positions input attribute 4 | in vec2 vp; 5 | 6 | // texture coordinates to be interpolated to fragment shaders 7 | out vec2 st; 8 | 9 | void main () { 10 | // interpolate texture coordinates 11 | st = (vp + 1.0) * 0.5; 12 | // transform vertex position to clip space (camera view and perspective) 13 | gl_Position = vec4 (vp, 0.0, 1.0); 14 | } 15 | -------------------------------------------------------------------------------- /35_image_kernel/sphere.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | out vec4 frag_colour; 4 | 5 | void main () { 6 | frag_colour = vec4 (1.0, 0.0, 0.0, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /35_image_kernel/sphere.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 P, V; 5 | 6 | void main () { 7 | gl_Position = P * V * vec4 (vp, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /36_colour_picking/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = pick 2 | CC = g++ -g 3 | FLAGS = -Wall -pedantic -g 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a ../common/linux_i386/libassimp.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /36_colour_picking/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = pick 2 | CC = g++ -g 3 | FLAGS = -Wall -pedantic -g 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /36_colour_picking/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = pick 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp obj_parser.cpp 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /36_colour_picking/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = pick.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp obj_parser.cpp maths_funcs.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /36_colour_picking/pick.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | uniform vec3 unique_id; 3 | out vec4 frag_colour; 4 | 5 | void main () { 6 | frag_colour = vec4 (unique_id, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /36_colour_picking/pick.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | in vec3 vp; 3 | 4 | uniform mat4 P, V, M; 5 | 6 | void main () { 7 | gl_Position = P * V * M * vec4 (vp, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /36_colour_picking/sphere.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | out vec4 frag_colour; 4 | 5 | void main () { 6 | frag_colour = vec4 (1.0, 0.0, 0.0, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /36_colour_picking/sphere.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 P, V, M; 5 | 6 | void main () { 7 | gl_Position = P * V * M * vec4 (vp, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /37_deferred_shading/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = deferred 2 | CC = g++ -g 3 | FLAGS = -Wall -pedantic -g 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a ../common/linux_i386/libassimp.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /37_deferred_shading/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = deferred 2 | CC = g++ -g 3 | FLAGS = -Wall -pedantic -g 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lz 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp obj_parser.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /37_deferred_shading/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = deferred 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | SYS_LIB = -lz 8 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 9 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp obj_parser.cpp 10 | 11 | all: 12 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 13 | 14 | -------------------------------------------------------------------------------- /37_deferred_shading/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = deferred.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp obj_parser.cpp maths_funcs.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /37_deferred_shading/first_pass.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 p_eye; 4 | in vec3 n_eye; 5 | 6 | /* note that we should force the location number here by adding layout location 7 | keywords */ 8 | layout (location = 0) out vec3 def_p; 9 | layout (location = 1) out vec3 def_n; 10 | 11 | out vec4 f; 12 | 13 | void main () { 14 | //f = vec4 (depth,depth,depth, 1.0); 15 | def_p = p_eye; 16 | def_n = n_eye; 17 | } 18 | -------------------------------------------------------------------------------- /37_deferred_shading/first_pass.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout (location = 0) in vec3 vp; 4 | layout (location = 1) in vec3 vn; 5 | 6 | uniform mat4 P, V, M; 7 | 8 | out vec3 p_eye; 9 | out vec3 n_eye; 10 | 11 | void main () { 12 | p_eye = (V * M * vec4 (vp, 1.0)).xyz; 13 | n_eye = (V * M * vec4 (vn, 0.0)).xyz; 14 | gl_Position = P * vec4 (p_eye, 1.0); 15 | } 16 | -------------------------------------------------------------------------------- /37_deferred_shading/g_buffer_depths.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/37_deferred_shading/g_buffer_depths.png -------------------------------------------------------------------------------- /37_deferred_shading/g_buffer_normals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/37_deferred_shading/g_buffer_normals.png -------------------------------------------------------------------------------- /37_deferred_shading/g_buffer_positions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/37_deferred_shading/g_buffer_positions.png -------------------------------------------------------------------------------- /37_deferred_shading/light_colours.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/37_deferred_shading/light_colours.png -------------------------------------------------------------------------------- /37_deferred_shading/plane.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.69 (sub 0) OBJ File: '' 2 | # www.blender.org 3 | g Plane 4 | v 1.000000 0.000000 1.000000 5 | v -1.000000 0.000000 1.000000 6 | v 1.000000 0.000000 -1.000000 7 | v -1.000000 0.000000 -1.000000 8 | vt 0.000000 0.000000 9 | vt 1.000000 0.000000 10 | vt 0.000000 1.000000 11 | vt 1.000000 1.000000 12 | vn 0.000000 1.000000 0.000000 13 | s off 14 | f 2/1/1 1/2/1 4/3/1 15 | f 1/2/1 3/4/1 4/3/1 16 | -------------------------------------------------------------------------------- /37_deferred_shading/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/37_deferred_shading/screenshot.png -------------------------------------------------------------------------------- /37_deferred_shading/second_pass.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 P, V, M; 5 | 6 | void main () { 7 | gl_Position = P * V * M * vec4 (vp, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /38_texture_shadows/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = shads 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp gl_utils.cpp obj_parser.cpp maths_funcs.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | -------------------------------------------------------------------------------- /38_texture_shadows/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = shads 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp gl_utils.cpp obj_parser.cpp maths_funcs.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | -------------------------------------------------------------------------------- /38_texture_shadows/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = shads 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp gl_utils.cpp obj_parser.cpp maths_funcs.cpp 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /38_texture_shadows/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = shads.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp obj_parser.cpp maths_funcs.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /38_texture_shadows/depth.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | void main () { 4 | } 5 | -------------------------------------------------------------------------------- /38_texture_shadows/depth.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 P, V, M; 5 | 6 | void main () { 7 | gl_Position = P * V * M * vec4 (vp, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /38_texture_shadows/ss_quad.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 st; 4 | uniform sampler2D depth_tex; 5 | out vec4 frag_colour; 6 | 7 | void main () { 8 | float d = texture (depth_tex, st).r; 9 | frag_colour = vec4 (d, d, d, 1.0); 10 | } 11 | -------------------------------------------------------------------------------- /38_texture_shadows/ss_quad.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 vp; 4 | out vec2 st; 5 | 6 | void main () { 7 | gl_Position = vec4 (vp * 0.333 + 0.667, 0.0, 1.0); 8 | st = (vp + 1.0) * 0.5; 9 | } 10 | -------------------------------------------------------------------------------- /39_texture_mapping_srgb/Makefile.linux32: -------------------------------------------------------------------------------- 1 | BIN = texmap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_i386/libGLEW.a ../common/linux_i386/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /39_texture_mapping_srgb/Makefile.linux64: -------------------------------------------------------------------------------- 1 | BIN = texmap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/linux_x86_64/libGLEW.a ../common/linux_x86_64/libglfw3.a 6 | SYS_LIB = -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi 7 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /39_texture_mapping_srgb/Makefile.osx: -------------------------------------------------------------------------------- 1 | BIN = texmap 2 | CC = g++ 3 | FLAGS = -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage 4 | INC = -I ../common/include -I/sw/include -I/usr/local/include 5 | LIB_PATH = ../common/osx_64/ 6 | LOC_LIB = $(LIB_PATH)libGLEW.a $(LIB_PATH)libglfw3.a 7 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit 8 | SRC = main.cpp maths_funcs.cpp gl_utils.cpp stb_image.c 9 | 10 | all: 11 | ${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} 12 | 13 | -------------------------------------------------------------------------------- /39_texture_mapping_srgb/Makefile.win32: -------------------------------------------------------------------------------- 1 | BIN = texmap.exe 2 | CC = g++ 3 | FLAGS = -Wall -pedantic 4 | INC = -I ../common/include 5 | LOC_LIB = ../common/win32/libglew32.dll.a ../common/win32/glfw3dll.a 6 | SYS_LIB = -lOpenGL32 -L ./ -lglew32 -lglfw3 -lm 7 | SRC = main.cpp stb_image.c maths_funcs.cpp gl_utils.cpp 8 | 9 | all: 10 | ${CC} ${FLAGS} -o ${BIN} ${SRC} ${INC} ${LOC_LIB} ${SYS_LIB} 11 | 12 | -------------------------------------------------------------------------------- /39_texture_mapping_srgb/skulluvmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/39_texture_mapping_srgb/skulluvmap.png -------------------------------------------------------------------------------- /39_texture_mapping_srgb/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 texture_coordinates; 4 | uniform sampler2D basic_texture; 5 | out vec4 frag_colour; 6 | 7 | void main() { 8 | vec4 texel = texture (basic_texture, texture_coordinates); 9 | frag_colour = texel; 10 | frag_colour.rgb = pow (frag_colour.rgb, vec3 (0.45, 0.45, 0.45)); 11 | } 12 | -------------------------------------------------------------------------------- /39_texture_mapping_srgb/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout (location = 0) in vec3 vertex_position; 4 | layout (location = 1) in vec2 vt; // per-vertex texture co-ords 5 | 6 | uniform mat4 view, proj; 7 | 8 | out vec2 texture_coordinates; 9 | 10 | void main() { 11 | texture_coordinates = vt; 12 | gl_Position = proj * view * vec4 (vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /Assimp32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/Assimp32.dll -------------------------------------------------------------------------------- /TODO_FIXES: -------------------------------------------------------------------------------- 1 | * header file in maths_funcs.h is in row order and order 01234 thing is wrong 2 | -------------------------------------------------------------------------------- /TODO_MATHS_FUNCS_H_: -------------------------------------------------------------------------------- 1 | * 03_/maths_funcs.h removed the constructors 2 | * and i put it in main folder 3 | * need to copy to all sub-folders 4 | * need to do same for .cpp (remove constructors for mat3 and mat4) 5 | * test to make sure it isnt used anywhere 6 | -------------------------------------------------------------------------------- /blender/monkey_with_anim_y_up.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/blender/monkey_with_anim_y_up.blend -------------------------------------------------------------------------------- /blender/monkey_with_bones_y_up.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/blender/monkey_with_bones_y_up.blend -------------------------------------------------------------------------------- /blender/monkey_with_skeleton_y_up.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/blender/monkey_with_skeleton_y_up.blend -------------------------------------------------------------------------------- /common/include/assimp/ai_assert.h: -------------------------------------------------------------------------------- 1 | /** @file assert.h 2 | */ 3 | #ifndef AI_DEBUG_H_INC 4 | #define AI_DEBUG_H_INC 5 | 6 | #ifdef _DEBUG 7 | # include 8 | # define ai_assert(expression) assert(expression) 9 | #else 10 | # define ai_assert(expression) 11 | #endif 12 | 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /common/include/assimp/defs.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/include/assimp/defs.h -------------------------------------------------------------------------------- /common/include/assimp/matrix3x3.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/include/assimp/matrix3x3.h -------------------------------------------------------------------------------- /common/include/assimp/matrix3x3.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/include/assimp/matrix3x3.inl -------------------------------------------------------------------------------- /common/include/assimp/matrix4x4.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/include/assimp/matrix4x4.h -------------------------------------------------------------------------------- /common/include/assimp/matrix4x4.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/include/assimp/matrix4x4.inl -------------------------------------------------------------------------------- /common/linux_i386/libGLEW.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/linux_i386/libGLEW.a -------------------------------------------------------------------------------- /common/linux_i386/libassimp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/linux_i386/libassimp.a -------------------------------------------------------------------------------- /common/linux_i386/libglfw3.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/linux_i386/libglfw3.a -------------------------------------------------------------------------------- /common/linux_x86_64/libGLEW.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/linux_x86_64/libGLEW.a -------------------------------------------------------------------------------- /common/linux_x86_64/libassimp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/linux_x86_64/libassimp.a -------------------------------------------------------------------------------- /common/linux_x86_64/libfreetype.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/linux_x86_64/libfreetype.a -------------------------------------------------------------------------------- /common/linux_x86_64/libglfw3.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/linux_x86_64/libglfw3.a -------------------------------------------------------------------------------- /common/msvc110/assimp.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/msvc110/assimp.lib -------------------------------------------------------------------------------- /common/msvc110/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/msvc110/freetype.lib -------------------------------------------------------------------------------- /common/msvc110/glew32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/msvc110/glew32.lib -------------------------------------------------------------------------------- /common/msvc110/glew32s.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/msvc110/glew32s.lib -------------------------------------------------------------------------------- /common/msvc110/glfw3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/msvc110/glfw3.lib -------------------------------------------------------------------------------- /common/msvc110/glfw3dll.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/msvc110/glfw3dll.lib -------------------------------------------------------------------------------- /common/osx_64/libGLEW.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/osx_64/libGLEW.a -------------------------------------------------------------------------------- /common/osx_64/libassimp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/osx_64/libassimp.a -------------------------------------------------------------------------------- /common/osx_64/libglfw3.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/osx_64/libglfw3.a -------------------------------------------------------------------------------- /common/win32/assimp.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/win32/assimp.lib -------------------------------------------------------------------------------- /common/win32/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/win32/freetype.lib -------------------------------------------------------------------------------- /common/win32/glfw3dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/win32/glfw3dll.a -------------------------------------------------------------------------------- /common/win32/libglew32.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/common/win32/libglew32.dll.a -------------------------------------------------------------------------------- /first_test/demo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/first_test/demo -------------------------------------------------------------------------------- /glew32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/glew32.dll -------------------------------------------------------------------------------- /glfw3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/glfw3.dll -------------------------------------------------------------------------------- /visual_studio/00_hello_triangle.sdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/00_hello_triangle.sdf -------------------------------------------------------------------------------- /visual_studio/00_hello_triangle/00_hello_triangle.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /visual_studio/00_hello_triangle/Debug/00_hello_triangle.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/00_hello_triangle_gl2.1/Debug/00_hello_triangle_gl2.1.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/01_extended_init/01_extended_init.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /visual_studio/01_extended_init/Debug/01_extended_init.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/02_shaders/Debug/02_shaders.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/02_shaders/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 18:03:11 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | -------------------------------------------------------------------------------- /visual_studio/02_shaders/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | uniform vec4 inputColour; 4 | out vec4 fragColour; 5 | 6 | void main() { 7 | fragColour = inputColour; 8 | } 9 | -------------------------------------------------------------------------------- /visual_studio/02_shaders/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vertex_position; 4 | 5 | void main() { 6 | gl_Position = vec4(vertex_position, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /visual_studio/03_vertex_buffer_obects/Debug/03_vertex_buffer_obects.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.01 6 | -------------------------------------------------------------------------------- /visual_studio/03_vertex_buffer_obects/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:35:13 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | -------------------------------------------------------------------------------- /visual_studio/03_vertex_buffer_obects/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 colour; 4 | out vec4 frag_colour; 5 | 6 | void main() { 7 | frag_colour = vec4 (colour, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /visual_studio/03_vertex_buffer_obects/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | layout(location = 1) in vec3 vertex_colour; 5 | 6 | out vec3 colour; 7 | 8 | void main() { 9 | colour = vertex_colour; 10 | gl_Position = vec4(vertex_position, 1.0); 11 | } 12 | -------------------------------------------------------------------------------- /visual_studio/04_mats_and_vec3/Debug/04_mats_and_vec3.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/04_mats_and_vec3/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:35:23 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | -------------------------------------------------------------------------------- /visual_studio/04_mats_and_vec3/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 colour; 4 | out vec4 frag_colour; 5 | 6 | void main() { 7 | frag_colour = vec4 (colour, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /visual_studio/04_mats_and_vec3/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | layout(location = 1) in vec3 vertex_colour; 5 | 6 | uniform mat4 matrix; // our matrix 7 | 8 | out vec3 colour; 9 | 10 | void main() { 11 | colour = vertex_colour; 12 | gl_Position = matrix * vec4(vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /visual_studio/05_virtual_camera/Debug/05_virtual_camera.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/05_virtual_camera/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:35:47 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | -------------------------------------------------------------------------------- /visual_studio/05_virtual_camera/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 colour; 4 | out vec4 frag_colour; 5 | 6 | void main() { 7 | frag_colour = vec4 (colour, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /visual_studio/05_virtual_camera/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | layout(location = 1) in vec3 vertex_colour; 5 | 6 | uniform mat4 view, proj; 7 | 8 | out vec3 colour; 9 | 10 | void main() { 11 | colour = vertex_colour; 12 | gl_Position = proj * view * vec4 (vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /visual_studio/06_vcam_with_quaternion/Debug/06_vcam_with_quaternion.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/06_vcam_with_quaternion/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:35:58 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | creating shader from test_vs.glsl... 6 | shader compiled. index 1 7 | creating shader from test_fs.glsl... 8 | shader compiled. index 2 9 | created programme 3. attaching shaders 1 and 2... 10 | program 3 GL_VALIDATE_STATUS = GL_TRUE 11 | -------------------------------------------------------------------------------- /visual_studio/06_vcam_with_quaternion/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in float dist; 4 | out vec4 frag_colour; 5 | 6 | void main() { 7 | frag_colour = vec4 (1.0, 0.0, 0.0, 1.0); 8 | // use z position to shader darker to help perception of distance 9 | frag_colour.xyz *= dist; 10 | } 11 | -------------------------------------------------------------------------------- /visual_studio/06_vcam_with_quaternion/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | uniform mat4 model, view, proj; 5 | // use z position to shader darker to help perception of distance 6 | out float dist; 7 | 8 | void main() { 9 | gl_Position = proj * view * model * vec4 (vertex_position, 1.0); 10 | dist = vertex_position.z;//1.0 - (-pos_eye.z / 10.0); 11 | } 12 | -------------------------------------------------------------------------------- /visual_studio/07_ray_picking/Debug/07_ray_picking.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/07_ray_picking/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:36:10 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | creating shader from test_vs.glsl... 6 | shader compiled. index 1 7 | creating shader from test_fs.glsl... 8 | shader compiled. index 2 9 | created programme 3. attaching shaders 1 and 2... 10 | program 3 GL_VALIDATE_STATUS = GL_TRUE 11 | -------------------------------------------------------------------------------- /visual_studio/07_ray_picking/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in float dist; 4 | uniform float blue = 0.0; 5 | out vec4 frag_colour; 6 | 7 | void main() { 8 | frag_colour = vec4 (1.0, 0.0, blue, 1.0); 9 | // use z position to shader darker to help perception of distance 10 | frag_colour.xyz *= dist; 11 | } 12 | -------------------------------------------------------------------------------- /visual_studio/07_ray_picking/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | uniform mat4 model, view, proj; 5 | // use z position to shader darker to help perception of distance 6 | out float dist; 7 | 8 | void main() { 9 | gl_Position = proj * view * model * vec4 (vertex_position, 1.0); 10 | dist = vertex_position.z;//1.0 - (-pos_eye.z / 10.0); 11 | } 12 | -------------------------------------------------------------------------------- /visual_studio/08_phong/Debug/08_phong.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/08_phong/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:36:21 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | creating shader from test_vs.glsl... 6 | shader compiled. index 1 7 | creating shader from test_fs.glsl... 8 | shader compiled. index 2 9 | created programme 3. attaching shaders 1 and 2... 10 | program 3 GL_VALIDATE_STATUS = GL_TRUE 11 | -------------------------------------------------------------------------------- /visual_studio/08_phong/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in layout (location = 0) vec3 vertex_position; 4 | in layout (location = 1) vec3 vertex_normal; 5 | uniform mat4 projection_mat, view_mat, model_mat; 6 | out vec3 position_eye, normal_eye; 7 | 8 | void main () { 9 | position_eye = vec3 (view_mat * model_mat * vec4 (vertex_position, 1.0)); 10 | normal_eye = vec3 (view_mat * model_mat * vec4 (vertex_normal, 0.0)); 11 | gl_Position = projection_mat * vec4 (position_eye, 1.0); 12 | } 13 | -------------------------------------------------------------------------------- /visual_studio/09_texture_mapping/Debug/09_texture_mapping.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/09_texture_mapping/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:36:33 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | creating shader from test_vs.glsl... 6 | shader compiled. index 1 7 | creating shader from test_fs.glsl... 8 | shader compiled. index 2 9 | created programme 3. attaching shaders 1 and 2... 10 | program 3 GL_VALIDATE_STATUS = GL_TRUE 11 | -------------------------------------------------------------------------------- /visual_studio/09_texture_mapping/skulluvmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/09_texture_mapping/skulluvmap.png -------------------------------------------------------------------------------- /visual_studio/09_texture_mapping/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 texture_coordinates; 4 | uniform sampler2D basic_texture; 5 | out vec4 frag_colour; 6 | 7 | void main() { 8 | vec4 texel = texture (basic_texture, texture_coordinates); 9 | frag_colour = texel; 10 | } 11 | -------------------------------------------------------------------------------- /visual_studio/09_texture_mapping/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout (location = 0) in vec3 vertex_position; 4 | layout (location = 1) in vec2 vt; // per-vertex texture co-ords 5 | 6 | uniform mat4 view, proj; 7 | 8 | out vec2 texture_coordinates; 9 | 10 | void main() { 11 | texture_coordinates = vt; 12 | gl_Position = proj * view * vec4 (vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /visual_studio/10_screen_capture/Debug/10_screen_capture.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/10_screen_capture/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:36:48 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | creating shader from test_vs.glsl... 6 | shader compiled. index 1 7 | creating shader from test_fs.glsl... 8 | shader compiled. index 2 9 | created programme 3. attaching shaders 1 and 2... 10 | program 3 GL_VALIDATE_STATUS = GL_TRUE 11 | -------------------------------------------------------------------------------- /visual_studio/10_screen_capture/skulluvmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/10_screen_capture/skulluvmap.png -------------------------------------------------------------------------------- /visual_studio/10_screen_capture/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 texture_coordinates; 4 | uniform sampler2D basic_texture; 5 | out vec4 frag_colour; 6 | 7 | void main() { 8 | vec4 texel = texture (basic_texture, texture_coordinates); 9 | frag_colour = texel; 10 | } 11 | -------------------------------------------------------------------------------- /visual_studio/10_screen_capture/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout (location = 0) in vec3 vertex_position; 4 | layout (location = 1) in vec2 vt; // per-vertex texture co-ords 5 | 6 | uniform mat4 view, proj; 7 | 8 | out vec2 texture_coordinates; 9 | 10 | void main() { 11 | texture_coordinates = vt; 12 | gl_Position = proj * view * vec4 (vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /visual_studio/11_video_capture/Debug/11_video_capture.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.01 6 | -------------------------------------------------------------------------------- /visual_studio/11_video_capture/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:36:56 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | creating shader from test_vs.glsl... 6 | shader compiled. index 1 7 | creating shader from test_fs.glsl... 8 | shader compiled. index 2 9 | created programme 3. attaching shaders 1 and 2... 10 | program 3 GL_VALIDATE_STATUS = GL_TRUE 11 | -------------------------------------------------------------------------------- /visual_studio/11_video_capture/skulluvmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/11_video_capture/skulluvmap.png -------------------------------------------------------------------------------- /visual_studio/11_video_capture/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 texture_coordinates; 4 | uniform sampler2D basic_texture; 5 | out vec4 frag_colour; 6 | 7 | void main() { 8 | vec4 texel = texture (basic_texture, texture_coordinates); 9 | frag_colour = texel; 10 | } 11 | -------------------------------------------------------------------------------- /visual_studio/11_video_capture/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout (location = 0) in vec3 vertex_position; 4 | layout (location = 1) in vec2 vt; // per-vertex texture co-ords 5 | 6 | uniform mat4 view, proj; 7 | 8 | out vec2 texture_coordinates; 9 | 10 | void main() { 11 | texture_coordinates = vt; 12 | gl_Position = proj * view * vec4 (vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /visual_studio/12_debugging_shaders/Debug/12_debugging_shaders.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/12_debugging_shaders/ao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/12_debugging_shaders/ao.png -------------------------------------------------------------------------------- /visual_studio/12_debugging_shaders/boulder_diff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/12_debugging_shaders/boulder_diff.png -------------------------------------------------------------------------------- /visual_studio/12_debugging_shaders/boulder_spec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/12_debugging_shaders/boulder_spec.png -------------------------------------------------------------------------------- /visual_studio/12_debugging_shaders/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:38:48 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | creating shader from test_vs.glsl... 6 | shader compiled. index 1 7 | creating shader from test_fs.glsl... 8 | shader compiled. index 2 9 | created programme 3. attaching shaders 1 and 2... 10 | program 3 GL_VALIDATE_STATUS = GL_TRUE 11 | -------------------------------------------------------------------------------- /visual_studio/12_debugging_shaders/tileable9b_emiss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/12_debugging_shaders/tileable9b_emiss.png -------------------------------------------------------------------------------- /visual_studio/13_load_mesh/Debug/13_load_mesh.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:36. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/13_load_mesh/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:39:03 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | creating shader from test_vs.glsl... 6 | shader compiled. index 1 7 | creating shader from test_fs.glsl... 8 | shader compiled. index 2 9 | created programme 3. attaching shaders 1 and 2... 10 | program 3 GL_VALIDATE_STATUS = GL_TRUE 11 | -------------------------------------------------------------------------------- /visual_studio/13_load_mesh/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 normal; 4 | in vec2 st; 5 | out vec4 frag_colour; 6 | 7 | void main() { 8 | frag_colour = vec4 (normal, 1.0); 9 | } 10 | -------------------------------------------------------------------------------- /visual_studio/13_load_mesh/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | layout(location = 1) in vec3 vertex_normal; 5 | layout(location = 2) in vec2 texture_coord; 6 | 7 | uniform mat4 view, proj; 8 | 9 | out vec3 normal; 10 | out vec2 st; 11 | 12 | void main() { 13 | st = texture_coord; 14 | normal = vertex_normal; 15 | gl_Position = proj * view * vec4 (vertex_position, 1.0); 16 | } 17 | -------------------------------------------------------------------------------- /visual_studio/14_multi_tex/Debug/14_multi_tex.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/14_multi_tex/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:40:08 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | creating shader from test_vs.glsl... 6 | shader compiled. index 1 7 | creating shader from test_fs.glsl... 8 | shader compiled. index 2 9 | created programme 3. attaching shaders 1 and 2... 10 | program 3 GL_VALIDATE_STATUS = GL_TRUE 11 | -------------------------------------------------------------------------------- /visual_studio/14_multi_tex/ship.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/14_multi_tex/ship.png -------------------------------------------------------------------------------- /visual_studio/14_multi_tex/skulluvmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/14_multi_tex/skulluvmap.png -------------------------------------------------------------------------------- /visual_studio/14_multi_tex/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 texture_coordinates; 4 | uniform sampler2D basic_texture; 5 | uniform sampler2D second_texture; 6 | out vec4 frag_colour; 7 | 8 | void main() { 9 | vec4 texel_a = texture (basic_texture, texture_coordinates); 10 | vec4 texel_b = texture (second_texture, texture_coordinates); 11 | frag_colour = mix (texel_a, texel_b, texture_coordinates.s); 12 | } 13 | -------------------------------------------------------------------------------- /visual_studio/14_multi_tex/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout (location = 0) in vec3 vertex_position; 4 | layout (location = 1) in vec2 vt; // per-vertex texture co-ords 5 | 6 | uniform mat4 view, proj; 7 | 8 | out vec2 texture_coordinates; 9 | 10 | void main() { 11 | texture_coordinates = vt; 12 | gl_Position = proj * view * vec4 (vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /visual_studio/15_phongtextures/Debug/15_phongtextures.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/15_phongtextures/ao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/15_phongtextures/ao.png -------------------------------------------------------------------------------- /visual_studio/15_phongtextures/boulder_diff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/15_phongtextures/boulder_diff.png -------------------------------------------------------------------------------- /visual_studio/15_phongtextures/boulder_spec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/15_phongtextures/boulder_spec.png -------------------------------------------------------------------------------- /visual_studio/15_phongtextures/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:41:48 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | creating shader from test_vs.glsl... 6 | shader compiled. index 1 7 | creating shader from test_fs.glsl... 8 | shader compiled. index 2 9 | created programme 3. attaching shaders 1 and 2... 10 | program 3 GL_VALIDATE_STATUS = GL_TRUE 11 | -------------------------------------------------------------------------------- /visual_studio/15_phongtextures/tileable9b_emiss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/15_phongtextures/tileable9b_emiss.png -------------------------------------------------------------------------------- /visual_studio/16_frag_reject/Debug/16_frag_reject.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/16_frag_reject/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:41:58 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | creating shader from test_vs.glsl... 6 | shader compiled. index 1 7 | creating shader from test_fs.glsl... 8 | shader compiled. index 2 9 | created programme 3. attaching shaders 1 and 2... 10 | program 3 GL_VALIDATE_STATUS = GL_TRUE 11 | -------------------------------------------------------------------------------- /visual_studio/16_frag_reject/skulluvmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/16_frag_reject/skulluvmap.png -------------------------------------------------------------------------------- /visual_studio/16_frag_reject/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 texture_coordinates; 4 | uniform sampler2D basic_texture; 5 | out vec4 frag_colour; 6 | 7 | void main() { 8 | vec4 texel = texture2D (basic_texture, texture_coordinates); 9 | frag_colour = texel; 10 | if (texel.r > 0.2 && texel.g + texel.b < 1.0) { 11 | discard; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /visual_studio/16_frag_reject/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout (location = 0) in vec3 vertex_position; 4 | layout (location = 1) in vec2 vt; // per-vertex texture co-ords 5 | 6 | uniform mat4 view, proj; 7 | 8 | out vec2 texture_coordinates; 9 | 10 | void main() { 11 | texture_coordinates = vt; 12 | gl_Position = proj * view * vec4 (vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /visual_studio/17_alpha_blending/Debug/17_alpha_blending.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/17_alpha_blending/blob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/17_alpha_blending/blob.png -------------------------------------------------------------------------------- /visual_studio/17_alpha_blending/blob2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/17_alpha_blending/blob2.png -------------------------------------------------------------------------------- /visual_studio/17_alpha_blending/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:42:05 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | creating shader from test_vs.glsl... 6 | shader compiled. index 1 7 | creating shader from test_fs.glsl... 8 | shader compiled. index 2 9 | created programme 3. attaching shaders 1 and 2... 10 | program 3 GL_VALIDATE_STATUS = GL_TRUE 11 | -------------------------------------------------------------------------------- /visual_studio/17_alpha_blending/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 texture_coordinates; 4 | uniform sampler2D basic_texture; 5 | out vec4 frag_colour; 6 | 7 | void main() { 8 | vec4 texel = texture2D (basic_texture, texture_coordinates); 9 | frag_colour = texel; 10 | } 11 | -------------------------------------------------------------------------------- /visual_studio/17_alpha_blending/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout (location = 0) in vec3 vertex_position; 4 | layout (location = 1) in vec2 vt; // per-vertex texture co-ords 5 | 6 | uniform mat4 model, view, proj; 7 | 8 | out vec2 texture_coordinates; 9 | 10 | void main() { 11 | texture_coordinates = vt; 12 | gl_Position = proj * view * model * vec4 (vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /visual_studio/18_spotlights/Debug/18_spotlights.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/18_spotlights/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:42:12 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | creating shader from test_vs.glsl... 6 | shader compiled. index 1 7 | creating shader from test_fs.glsl... 8 | shader compiled. index 2 9 | created programme 3. attaching shaders 1 and 2... 10 | program 3 GL_VALIDATE_STATUS = GL_TRUE 11 | -------------------------------------------------------------------------------- /visual_studio/18_spotlights/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in layout (location = 0) vec3 vertex_position; 4 | in layout (location = 1) vec3 vertex_normal; 5 | uniform mat4 projection_mat, view_mat, model_mat; 6 | out vec3 position_eye, normal_eye; 7 | 8 | void main () { 9 | position_eye = vec3 (view_mat * model_mat * vec4 (vertex_position, 1.0)); 10 | normal_eye = vec3 (view_mat * model_mat * vec4 (vertex_normal, 0.0)); 11 | gl_Position = projection_mat * vec4 (position_eye, 1.0); 12 | } 13 | -------------------------------------------------------------------------------- /visual_studio/19_fog/Debug/19_fog.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/19_fog/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:42:21 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | creating shader from test_vs.glsl... 6 | shader compiled. index 1 7 | creating shader from test_fs.glsl... 8 | shader compiled. index 2 9 | created programme 3. attaching shaders 1 and 2... 10 | program 3 GL_VALIDATE_STATUS = GL_TRUE 11 | -------------------------------------------------------------------------------- /visual_studio/19_fog/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | layout(location = 1) in vec3 vertex_normal; 5 | layout(location = 2) in vec2 texture_coord; 6 | 7 | uniform mat4 view, proj; 8 | uniform float time; 9 | 10 | out vec3 normal; 11 | out vec3 pos_eye; 12 | 13 | void main() { 14 | pos_eye = (view * vec4 (vertex_position, 1.0)).xyz; 15 | pos_eye.z += sin (time); 16 | normal = vertex_normal; 17 | gl_Position = proj * vec4 (pos_eye, 1.0); 18 | } 19 | -------------------------------------------------------------------------------- /visual_studio/20_normal_mapping/Debug/20_normal_mapping.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/20_normal_mapping/brickwork_normal-map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/20_normal_mapping/brickwork_normal-map.png -------------------------------------------------------------------------------- /visual_studio/20_normal_mapping/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:43:12 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm) 4 | renderer: AMD Radeon HD 7570 5 | version: 4.1.11251 Compatibility Profile Context 6 | creating shader from test_vs.glsl... 7 | shader compiled. index 1 8 | creating shader from test_fs.glsl... 9 | shader compiled. index 2 10 | created programme 3. attaching shaders 1 and 2... 11 | program 3 GL_VALIDATE_STATUS = GL_TRUE 12 | -------------------------------------------------------------------------------- /visual_studio/20_normal_mapping/light_dir_tan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/20_normal_mapping/light_dir_tan.png -------------------------------------------------------------------------------- /visual_studio/20_normal_mapping/normals_pre_ranged.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/20_normal_mapping/normals_pre_ranged.png -------------------------------------------------------------------------------- /visual_studio/20_normal_mapping/normals_ranged.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/20_normal_mapping/normals_ranged.png -------------------------------------------------------------------------------- /visual_studio/20_normal_mapping/tangents_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/20_normal_mapping/tangents_test.png -------------------------------------------------------------------------------- /visual_studio/20_normal_mapping/view_dir_tan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/20_normal_mapping/view_dir_tan.png -------------------------------------------------------------------------------- /visual_studio/21_cube_mapping/Debug/21_cube_mapping.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/21_cube_mapping/cube_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 texcoords; 4 | uniform samplerCube cube_texture; 5 | out vec4 frag_colour; 6 | 7 | void main () { 8 | frag_colour = texture (cube_texture, texcoords); 9 | } 10 | -------------------------------------------------------------------------------- /visual_studio/21_cube_mapping/cube_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 P, V; 5 | out vec3 texcoords; 6 | 7 | void main () { 8 | texcoords = vp; 9 | gl_Position = P * V * vec4 (vp, 1.0); 10 | } 11 | -------------------------------------------------------------------------------- /visual_studio/21_cube_mapping/negx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/21_cube_mapping/negx.jpg -------------------------------------------------------------------------------- /visual_studio/21_cube_mapping/negy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/21_cube_mapping/negy.jpg -------------------------------------------------------------------------------- /visual_studio/21_cube_mapping/negz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/21_cube_mapping/negz.jpg -------------------------------------------------------------------------------- /visual_studio/21_cube_mapping/posx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/21_cube_mapping/posx.jpg -------------------------------------------------------------------------------- /visual_studio/21_cube_mapping/posy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/21_cube_mapping/posy.jpg -------------------------------------------------------------------------------- /visual_studio/21_cube_mapping/posz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/21_cube_mapping/posz.jpg -------------------------------------------------------------------------------- /visual_studio/21_cube_mapping/reflect_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 pos_eye; 4 | in vec3 n_eye; 5 | uniform samplerCube cube_texture; 6 | uniform mat4 V; // view matrix 7 | out vec4 frag_colour; 8 | 9 | void main () { 10 | /* reflect ray around normal from eye to surface */ 11 | vec3 incident_eye = normalize (pos_eye); 12 | vec3 normal = normalize (n_eye); 13 | 14 | vec3 reflected = reflect (incident_eye, normal); 15 | // convert from eye to world space 16 | reflected = vec3 (inverse (V) * vec4 (reflected, 0.0)); 17 | 18 | frag_colour = texture (cube_texture, reflected); 19 | } 20 | -------------------------------------------------------------------------------- /visual_studio/21_cube_mapping/reflect_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vp; // positions from mesh 4 | layout(location = 1) in vec3 vn; // normals from mesh 5 | uniform mat4 P, V, M; // proj, view, model matrices 6 | out vec3 pos_eye; 7 | out vec3 n_eye; 8 | 9 | void main () { 10 | pos_eye = vec3 (V * M * vec4 (vp, 1.0)); 11 | n_eye = vec3 (V * M * vec4 (vn, 0.0)); 12 | gl_Position = P * V * M * vec4 (vp, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /visual_studio/21_cube_mapping/refract_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 pos_eye; 4 | in vec3 n_eye; 5 | uniform samplerCube cube_texture; 6 | uniform mat4 V; // view matrix 7 | out vec4 frag_colour; 8 | 9 | void main () { 10 | /* reflect ray around normal from eye to surface */ 11 | vec3 incident_eye = normalize (pos_eye); 12 | vec3 normal = normalize (n_eye); 13 | 14 | float ratio = 1.0 /1.3333; 15 | vec3 refracted = refract (incident_eye, normal, ratio); 16 | refracted = vec3 (inverse (V) * vec4 (refracted, 0.0)); 17 | 18 | frag_colour = texture (cube_texture, refracted); 19 | } 20 | -------------------------------------------------------------------------------- /visual_studio/21_cube_mapping/refract_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vp; // positions from mesh 4 | layout(location = 1) in vec3 vn; // normals from mesh 5 | uniform mat4 P, V, M; // proj, view, model matrices 6 | out vec3 pos_eye; 7 | out vec3 n_eye; 8 | 9 | void main () { 10 | pos_eye = vec3 (V * M * vec4 (vp, 1.0)); 11 | n_eye = vec3 (V * M * vec4 (vn, 0.0)); 12 | gl_Position = P * V * M * vec4 (vp, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /visual_studio/22_geom_shaders/Debug/22_geom_shaders.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/22_geom_shaders/geom_shaders_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/22_geom_shaders/geom_shaders_screenshot.png -------------------------------------------------------------------------------- /visual_studio/22_geom_shaders/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:43:32 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm)renderer: AMD Radeon HD 7570 4 | version: 4.1.11251 Compatibility Profile Context 5 | program 4 GL_VALIDATE_STATUS = GL_TRUE 6 | -------------------------------------------------------------------------------- /visual_studio/22_geom_shaders/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 f_colour; 4 | out vec4 frag_colour; 5 | 6 | void main() { 7 | frag_colour = vec4 (f_colour, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /visual_studio/22_geom_shaders/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vertex_position; 4 | layout(location = 1) in vec3 vertex_colour; 5 | out vec3 colour; 6 | 7 | void main() { 8 | colour = vertex_colour; 9 | gl_Position = vec4(vertex_position, 1.0); 10 | } 11 | -------------------------------------------------------------------------------- /visual_studio/23_tessellation_shaders/Debug/23_tessellation_shaders.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/23_tessellation_shaders/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 colour; // i made this up in the tess. evaluation shader 4 | out vec4 fragcolour; 5 | 6 | void main () { 7 | fragcolour = vec4 (colour, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /visual_studio/23_tessellation_shaders/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp_loc; 4 | out vec3 controlpoint_wor; 5 | 6 | void main() { 7 | controlpoint_wor = vp_loc; // control points out == vertex points in 8 | } 9 | 10 | -------------------------------------------------------------------------------- /visual_studio/24_gui_panels/Debug/24_gui_panels.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:37. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/24_gui_panels/gui_panels_shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/24_gui_panels/gui_panels_shot.png -------------------------------------------------------------------------------- /visual_studio/24_gui_panels/skulluvmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/24_gui_panels/skulluvmap.png -------------------------------------------------------------------------------- /visual_studio/24_gui_panels/tile2-diamonds256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/24_gui_panels/tile2-diamonds256x256.png -------------------------------------------------------------------------------- /visual_studio/25_sprite_sheets/Debug/25_sprite_sheets.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:36. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/25_sprite_sheets/shark_anim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/25_sprite_sheets/shark_anim.png -------------------------------------------------------------------------------- /visual_studio/26_bitmap_fonts/Debug/26_bitmap_fonts.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:36. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/26_bitmap_fonts/handmade2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/26_bitmap_fonts/handmade2.png -------------------------------------------------------------------------------- /visual_studio/27_font_atlas/Debug/27_font_atlas.lastbuildstate: -------------------------------------------------------------------------------- 1 | #v4.0:v110:false 2 | Debug|Win32|C:\Users\anton\Dropbox\tutorials_code\visual_studio\| 3 | -------------------------------------------------------------------------------- /visual_studio/27_font_atlas/Debug/27_font_atlas.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:36. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/27_font_atlas/FreeMono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/27_font_atlas/FreeMono.ttf -------------------------------------------------------------------------------- /visual_studio/27_font_atlas/atlas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/27_font_atlas/atlas.png -------------------------------------------------------------------------------- /visual_studio/27_font_atlas/freemono.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/27_font_atlas/freemono.png -------------------------------------------------------------------------------- /visual_studio/27_font_atlas_viewer.sdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/27_font_atlas_viewer.sdf -------------------------------------------------------------------------------- /visual_studio/27_font_atlas_viewer.v11.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/27_font_atlas_viewer.v11.suo -------------------------------------------------------------------------------- /visual_studio/27_font_atlas_viewer/Debug/27_font_atlas_viewer.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:36. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/27_font_atlas_viewer/atlas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/27_font_atlas_viewer/atlas.png -------------------------------------------------------------------------------- /visual_studio/27_font_atlas_viewer/freemono.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/27_font_atlas_viewer/freemono.png -------------------------------------------------------------------------------- /visual_studio/28_ubo/Debug/28_ubo.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:36. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/28_ubo/cube_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 texcoords; 4 | uniform samplerCube cube_texture; 5 | out vec4 frag_colour; 6 | 7 | void main () { 8 | frag_colour = texture (cube_texture, texcoords); 9 | } 10 | -------------------------------------------------------------------------------- /visual_studio/28_ubo/cube_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | //uniform mat4 P, V; 5 | uniform mat4 cam_R; 6 | out vec3 texcoords; 7 | 8 | /* virtual camera uniforms */ 9 | layout (std140) uniform cam_block { 10 | mat4 P; 11 | mat4 V; 12 | }; 13 | 14 | void main () { 15 | texcoords = vp; 16 | gl_Position = P * cam_R * vec4 (vp, 1.0); 17 | } 18 | -------------------------------------------------------------------------------- /visual_studio/28_ubo/negx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/28_ubo/negx.jpg -------------------------------------------------------------------------------- /visual_studio/28_ubo/negy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/28_ubo/negy.jpg -------------------------------------------------------------------------------- /visual_studio/28_ubo/negz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/28_ubo/negz.jpg -------------------------------------------------------------------------------- /visual_studio/28_ubo/posx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/28_ubo/posx.jpg -------------------------------------------------------------------------------- /visual_studio/28_ubo/posy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/28_ubo/posy.jpg -------------------------------------------------------------------------------- /visual_studio/28_ubo/posz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/28_ubo/posz.jpg -------------------------------------------------------------------------------- /visual_studio/28_ubo/reflect_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vp; // positions from mesh 4 | layout(location = 1) in vec3 vn; // normals from mesh 5 | 6 | /* virtual camera uniforms */ 7 | layout (std140) uniform cam_block { 8 | mat4 P; 9 | mat4 V; 10 | }; 11 | 12 | uniform mat4 M; // proj, view, model matrices 13 | out vec3 pos_eye; 14 | out vec3 n_eye; 15 | 16 | void main () { 17 | pos_eye = vec3 (V * M * vec4 (vp, 1.0)); 18 | n_eye = vec3 (V * M * vec4 (vn, 0.0)); 19 | gl_Position = P * V * M * vec4 (vp, 1.0); 20 | } 21 | -------------------------------------------------------------------------------- /visual_studio/28_ubo/refract_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout(location = 0) in vec3 vp; // positions from mesh 4 | layout(location = 1) in vec3 vn; // normals from mesh 5 | uniform mat4 M; // proj, view, model matrices 6 | 7 | /* virtual camera uniforms */ 8 | layout (std140) uniform cam_block { 9 | mat4 P; 10 | mat4 V; 11 | }; 12 | 13 | out vec3 pos_eye; 14 | out vec3 n_eye; 15 | 16 | void main () { 17 | pos_eye = vec3 (V * M * vec4 (vp, 1.0)); 18 | n_eye = vec3 (V * M * vec4 (vn, 0.0)); 19 | gl_Position = P * V * M * vec4 (vp, 1.0); 20 | } 21 | -------------------------------------------------------------------------------- /visual_studio/29_particle_systems/Debug/29_particle_systems.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:36. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/29_particle_systems/Droplet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/29_particle_systems/Droplet.png -------------------------------------------------------------------------------- /visual_studio/29_particle_systems/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 17:44:25 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm) 4 | renderer: AMD Radeon HD 7570 5 | version: 3.2.11251 Core Profile Forward-Compatible Context 6 | creating shader from test_vs.glsl... 7 | shader compiled. index 1 8 | creating shader from test_fs.glsl... 9 | shader compiled. index 2 10 | created programme 3. attaching shaders 1 and 2... 11 | program 3 GL_VALIDATE_STATUS = GL_TRUE 12 | -------------------------------------------------------------------------------- /visual_studio/30_skinning_part_one/Debug/30_skinning_part_one.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:36. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.00 6 | -------------------------------------------------------------------------------- /visual_studio/30_skinning_part_one/bones.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | out vec4 frag_colour; 4 | 5 | void main () { 6 | frag_colour = vec4 (1.0, 1.0, 0.0, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /visual_studio/30_skinning_part_one/bones.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 proj, view; 5 | 6 | void main () { 7 | gl_PointSize = 10.0; 8 | gl_Position = proj * view * vec4 (vp, 1.0); 9 | } 10 | -------------------------------------------------------------------------------- /visual_studio/30_skinning_part_one/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 normal; 4 | in vec2 st; 5 | in vec3 colour; 6 | out vec4 frag_colour; 7 | 8 | void main() { 9 | frag_colour = vec4 (colour, 1.0); 10 | } 11 | -------------------------------------------------------------------------------- /visual_studio/31_skinning_part_two/Debug/31_skinning_part_two.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:36. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.01 6 | -------------------------------------------------------------------------------- /visual_studio/31_skinning_part_two/bones.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | out vec4 frag_colour; 4 | 5 | void main () { 6 | frag_colour = vec4 (1.0, 1.0, 0.0, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /visual_studio/31_skinning_part_two/bones.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 proj, view; 5 | 6 | void main () { 7 | gl_PointSize = 10.0; 8 | gl_Position = proj * view * vec4 (vp, 1.0); 9 | } 10 | -------------------------------------------------------------------------------- /visual_studio/31_skinning_part_two/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 normal; 4 | in vec2 st; 5 | in vec3 colour; 6 | out vec4 frag_colour; 7 | 8 | void main() { 9 | frag_colour = vec4 (colour, 1.0); 10 | } 11 | -------------------------------------------------------------------------------- /visual_studio/32_skinning_part_three/Debug/32_skinning_part_three.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:36. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.01 6 | -------------------------------------------------------------------------------- /visual_studio/32_skinning_part_three/bones.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | out vec4 frag_colour; 4 | 5 | void main () { 6 | frag_colour = vec4 (1.0, 1.0, 0.0, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /visual_studio/32_skinning_part_three/bones.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 proj, view; 5 | 6 | void main () { 7 | gl_PointSize = 10.0; 8 | gl_Position = proj * view * vec4 (vp, 1.0); 9 | } 10 | -------------------------------------------------------------------------------- /visual_studio/32_skinning_part_three/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 normal; 4 | in vec2 st; 5 | in vec3 colour; 6 | out vec4 frag_colour; 7 | 8 | void main() { 9 | frag_colour = vec4 (colour, 1.0); 10 | } 11 | -------------------------------------------------------------------------------- /visual_studio/33_extension_check/Debug/33_extension_check.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:36. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.01 6 | -------------------------------------------------------------------------------- /visual_studio/34_framebuffer/Debug/34_framebuffer.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:36. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.01 6 | -------------------------------------------------------------------------------- /visual_studio/34_framebuffer/post.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | // texture coordinates from vertex shaders 4 | in vec2 st; 5 | 6 | // texture sampler 7 | uniform sampler2D tex; 8 | 9 | // output fragment colour RGBA 10 | out vec4 frag_colour; 11 | 12 | void main () { 13 | // invert colour of right-hand side 14 | vec3 colour; 15 | if (st.s >= 0.5) { 16 | colour = 1.0 - texture (tex, st).rgb; 17 | } else { 18 | colour = texture (tex, st).rgb; 19 | } 20 | frag_colour = vec4 (colour, 1.0); 21 | //frag_colour = texture (tex, st); 22 | } 23 | -------------------------------------------------------------------------------- /visual_studio/34_framebuffer/post.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | // vertex positions input attribute 4 | in vec2 vp; 5 | 6 | // texture coordinates to be interpolated to fragment shaders 7 | out vec2 st; 8 | 9 | void main () { 10 | // interpolate texture coordinates 11 | st = (vp + 1.0) * 0.5; 12 | // transform vertex position to clip space (camera view and perspective) 13 | gl_Position = vec4 (vp, 0.0, 1.0); 14 | } 15 | -------------------------------------------------------------------------------- /visual_studio/34_framebuffer/sphere.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | out vec4 frag_colour; 4 | 5 | void main () { 6 | frag_colour = vec4 (1.0, 0.0, 0.0, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /visual_studio/34_framebuffer/sphere.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 P, V; 5 | 6 | void main () { 7 | gl_Position = P * V * vec4 (vp, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /visual_studio/35_kernel/Debug/35_kernel.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:36. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.01 6 | -------------------------------------------------------------------------------- /visual_studio/35_kernel/post.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | // vertex positions input attribute 4 | in vec2 vp; 5 | 6 | // texture coordinates to be interpolated to fragment shaders 7 | out vec2 st; 8 | 9 | void main () { 10 | // interpolate texture coordinates 11 | st = (vp + 1.0) * 0.5; 12 | // transform vertex position to clip space (camera view and perspective) 13 | gl_Position = vec4 (vp, 0.0, 1.0); 14 | } 15 | -------------------------------------------------------------------------------- /visual_studio/35_kernel/sphere.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | out vec4 frag_colour; 4 | 5 | void main () { 6 | frag_colour = vec4 (1.0, 0.0, 0.0, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /visual_studio/35_kernel/sphere.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 P, V; 5 | 6 | void main () { 7 | gl_Position = P * V * vec4 (vp, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /visual_studio/36_colour_picking/Debug/36_colour_picking.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:36. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.02 6 | -------------------------------------------------------------------------------- /visual_studio/36_colour_picking/pick.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | uniform vec3 unique_id; 3 | out vec4 frag_colour; 4 | 5 | void main () { 6 | frag_colour = vec4 (unique_id, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /visual_studio/36_colour_picking/pick.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | in vec3 vp; 3 | 4 | uniform mat4 P, V, M; 5 | 6 | void main () { 7 | gl_Position = P * V * M * vec4 (vp, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /visual_studio/36_colour_picking/sphere.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | out vec4 frag_colour; 4 | 5 | void main () { 6 | frag_colour = vec4 (1.0, 0.0, 0.0, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /visual_studio/36_colour_picking/sphere.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 P, V, M; 5 | 6 | void main () { 7 | gl_Position = P * V * M * vec4 (vp, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /visual_studio/37_deferred_lighting/Debug/37_deferred_lighting.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:36. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.01 6 | -------------------------------------------------------------------------------- /visual_studio/37_deferred_lighting/first_pass.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 p_eye; 4 | in vec3 n_eye; 5 | 6 | /* note that we should force the location number here by adding layout location 7 | keywords */ 8 | layout (location = 0) out vec3 def_p; 9 | layout (location = 1) out vec3 def_n; 10 | 11 | out vec4 f; 12 | 13 | void main () { 14 | //f = vec4 (depth,depth,depth, 1.0); 15 | def_p = p_eye; 16 | def_n = n_eye; 17 | } 18 | -------------------------------------------------------------------------------- /visual_studio/37_deferred_lighting/first_pass.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout (location = 0) in vec3 vp; 4 | layout (location = 1) in vec3 vn; 5 | 6 | uniform mat4 P, V, M; 7 | 8 | out vec3 p_eye; 9 | out vec3 n_eye; 10 | 11 | void main () { 12 | p_eye = (V * M * vec4 (vp, 1.0)).xyz; 13 | n_eye = (V * M * vec4 (vn, 0.0)).xyz; 14 | gl_Position = P * vec4 (p_eye, 1.0); 15 | } 16 | -------------------------------------------------------------------------------- /visual_studio/37_deferred_lighting/g_buffer_depths.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/37_deferred_lighting/g_buffer_depths.png -------------------------------------------------------------------------------- /visual_studio/37_deferred_lighting/g_buffer_normals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/37_deferred_lighting/g_buffer_normals.png -------------------------------------------------------------------------------- /visual_studio/37_deferred_lighting/g_buffer_positions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/37_deferred_lighting/g_buffer_positions.png -------------------------------------------------------------------------------- /visual_studio/37_deferred_lighting/light_colours.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/37_deferred_lighting/light_colours.png -------------------------------------------------------------------------------- /visual_studio/37_deferred_lighting/plane.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.69 (sub 0) OBJ File: '' 2 | # www.blender.org 3 | g Plane 4 | v 1.000000 0.000000 1.000000 5 | v -1.000000 0.000000 1.000000 6 | v 1.000000 0.000000 -1.000000 7 | v -1.000000 0.000000 -1.000000 8 | vt 0.000000 0.000000 9 | vt 1.000000 0.000000 10 | vt 0.000000 1.000000 11 | vt 1.000000 1.000000 12 | vn 0.000000 1.000000 0.000000 13 | s off 14 | f 2/1/1 1/2/1 4/3/1 15 | f 1/2/1 3/4/1 4/3/1 16 | -------------------------------------------------------------------------------- /visual_studio/37_deferred_lighting/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/37_deferred_lighting/screenshot.png -------------------------------------------------------------------------------- /visual_studio/37_deferred_lighting/second_pass.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 P, V, M; 5 | 6 | void main () { 7 | gl_Position = P * V * M * vec4 (vp, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /visual_studio/38_texture_shadows/Debug/38_texture_shadows.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:36. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.01 6 | -------------------------------------------------------------------------------- /visual_studio/38_texture_shadows/depth.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | void main () { 4 | } 5 | -------------------------------------------------------------------------------- /visual_studio/38_texture_shadows/depth.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec3 vp; 4 | uniform mat4 P, V, M; 5 | 6 | void main () { 7 | gl_Position = P * V * M * vec4 (vp, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /visual_studio/38_texture_shadows/ss_quad.frag: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 st; 4 | uniform sampler2D depth_tex; 5 | out vec4 frag_colour; 6 | 7 | void main () { 8 | float d = texture2D (depth_tex, st).r; 9 | frag_colour = vec4 (d, d, d, 1.0); 10 | } 11 | -------------------------------------------------------------------------------- /visual_studio/38_texture_shadows/ss_quad.vert: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 vp; 4 | out vec2 st; 5 | 6 | void main () { 7 | gl_Position = vec4 (vp * 0.333 + 0.667, 0.0, 1.0); 8 | st = (vp + 1.0) * 0.5; 9 | } 10 | -------------------------------------------------------------------------------- /visual_studio/39_srgb_texture/Debug/39_srgb_texture.log: -------------------------------------------------------------------------------- 1 | Build started 30/06/2014 18:25:36. 2 | 3 | Build succeeded. 4 | 5 | Time Elapsed 00:00:00.01 6 | -------------------------------------------------------------------------------- /visual_studio/39_srgb_texture/gl.log: -------------------------------------------------------------------------------- 1 | GL_LOG_FILE log. local time Mon Jun 30 18:25:11 2014 2 | 3 | starting GLFW 3.0.4 Win32 WGL VisualC LoadLibrary(winmm) 4 | renderer: AMD Radeon HD 7570 5 | version: 4.1.11251 Compatibility Profile Context 6 | creating shader from test_vs.glsl... 7 | shader compiled. index 1 8 | creating shader from test_fs.glsl... 9 | shader compiled. index 2 10 | created programme 3. attaching shaders 1 and 2... 11 | program 3 GL_VALIDATE_STATUS = GL_TRUE 12 | -------------------------------------------------------------------------------- /visual_studio/39_srgb_texture/skulluvmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/39_srgb_texture/skulluvmap.png -------------------------------------------------------------------------------- /visual_studio/39_srgb_texture/test_fs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | in vec2 texture_coordinates; 4 | uniform sampler2D basic_texture; 5 | out vec4 frag_colour; 6 | 7 | void main() { 8 | vec4 texel = texture2D (basic_texture, texture_coordinates); 9 | frag_colour = texel; 10 | frag_colour.rgb = pow (frag_colour.rgb, vec3 (0.45, 0.45, 0.45)); 11 | } 12 | -------------------------------------------------------------------------------- /visual_studio/39_srgb_texture/test_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 410 2 | 3 | layout (location = 0) in vec3 vertex_position; 4 | layout (location = 1) in vec2 vt; // per-vertex texture co-ords 5 | 6 | uniform mat4 view, proj; 7 | 8 | out vec2 texture_coordinates; 9 | 10 | void main() { 11 | texture_coordinates = vt; 12 | gl_Position = proj * view * vec4 (vertex_position, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /visual_studio/Debug/03_vertex_buffer_objects.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/Debug/03_vertex_buffer_objects.exe -------------------------------------------------------------------------------- /visual_studio/Debug/03_vertex_buffer_objects.ilk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/Debug/03_vertex_buffer_objects.ilk -------------------------------------------------------------------------------- /visual_studio/Debug/03_vertex_buffer_objects.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/Debug/03_vertex_buffer_objects.pdb -------------------------------------------------------------------------------- /visual_studio/Debug/13_mesh_import.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/Debug/13_mesh_import.exe -------------------------------------------------------------------------------- /visual_studio/Debug/13_mesh_import.ilk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/Debug/13_mesh_import.ilk -------------------------------------------------------------------------------- /visual_studio/Debug/13_mesh_import.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/Debug/13_mesh_import.pdb -------------------------------------------------------------------------------- /visual_studio/Debug/Assimp32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/Debug/Assimp32.dll -------------------------------------------------------------------------------- /visual_studio/Debug/freetype6.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/Debug/freetype6.dll -------------------------------------------------------------------------------- /visual_studio/Debug/glew32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/Debug/glew32.dll -------------------------------------------------------------------------------- /visual_studio/Debug/glfw3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/Debug/glfw3.dll -------------------------------------------------------------------------------- /visual_studio/README.txt: -------------------------------------------------------------------------------- 1 | copy this folder into the main demo folder so: book_code\visual_studio\ 2 | -------------------------------------------------------------------------------- /visual_studio/tutorials.sdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/tutorials.sdf -------------------------------------------------------------------------------- /visual_studio/tutorials.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/tutorials.suo -------------------------------------------------------------------------------- /visual_studio/tutorials.v11.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AidanDelaney/antons_opengl_tutorials_book/f884ed655afb0e70d5757477d5f7453823b173c1/visual_studio/tutorials.v11.suo --------------------------------------------------------------------------------