├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── config.yml │ └── new-issue-template.md └── workflows │ ├── android.yml │ ├── cmake.yml │ ├── codeql.yml │ ├── linux.yml │ ├── linux_examples.yml │ ├── macos.yml │ ├── parse.yml │ ├── webassembly.yml │ ├── windows.yml │ └── windows_examples.yml ├── .gitignore ├── BINDINGS.md ├── CHANGELOG ├── CMakeLists.txt ├── CMakeOptions.txt ├── CONTRIBUTING.md ├── CONVENTIONS.md ├── FAQ.md ├── HISTORY.md ├── LICENSE ├── README.md ├── ROADMAP.md ├── build.zig ├── build.zig.zon ├── cmake ├── AddIfFlagCompiles.cmake ├── CompileDefinitions.cmake ├── CompilerFlags.cmake ├── EnumOption.cmake ├── GlfwImport.cmake ├── InstallConfigurations.cmake ├── JoinPaths.cmake ├── LibraryConfigurations.cmake ├── LibraryPathToLinkerFlags.cmake ├── PackConfigurations.cmake ├── ParseConfigHeader.cmake ├── PopulateConfigVariablesLocally.cmake ├── Uninstall.cmake ├── raylib-config-version.cmake └── raylib-config.cmake ├── examples ├── CMakeLists.txt ├── Makefile ├── Makefile.Android ├── Makefile.Web ├── README.md ├── audio │ ├── audio_mixed_processor.c │ ├── audio_mixed_processor.png │ ├── audio_module_playing.c │ ├── audio_module_playing.png │ ├── audio_music_stream.c │ ├── audio_music_stream.png │ ├── audio_raw_stream.c │ ├── audio_raw_stream.png │ ├── audio_sound_loading.c │ ├── audio_sound_loading.png │ ├── audio_sound_multi.c │ ├── audio_sound_multi.png │ ├── audio_sound_positioning.c │ ├── audio_sound_positioning.png │ ├── audio_stream_effects.c │ ├── audio_stream_effects.png │ └── resources │ │ ├── LICENSE.md │ │ ├── coin.wav │ │ ├── country.mp3 │ │ ├── mini1111.xm │ │ ├── sound.wav │ │ ├── spring.wav │ │ ├── target.flac │ │ ├── target.ogg │ │ ├── target.qoa │ │ └── weird.wav ├── core │ ├── core_2d_camera.c │ ├── core_2d_camera.png │ ├── core_2d_camera_mouse_zoom.c │ ├── core_2d_camera_mouse_zoom.png │ ├── core_2d_camera_platformer.c │ ├── core_2d_camera_platformer.png │ ├── core_2d_camera_split_screen.c │ ├── core_2d_camera_split_screen.png │ ├── core_3d_camera_first_person.c │ ├── core_3d_camera_first_person.png │ ├── core_3d_camera_free.c │ ├── core_3d_camera_free.png │ ├── core_3d_camera_mode.c │ ├── core_3d_camera_mode.png │ ├── core_3d_camera_split_screen.c │ ├── core_3d_camera_split_screen.png │ ├── core_3d_picking.c │ ├── core_3d_picking.png │ ├── core_automation_events.c │ ├── core_automation_events.png │ ├── core_basic_screen_manager.c │ ├── core_basic_screen_manager.png │ ├── core_basic_window.c │ ├── core_basic_window.png │ ├── core_basic_window_web.c │ ├── core_custom_frame_control.c │ ├── core_custom_frame_control.png │ ├── core_custom_logging.c │ ├── core_custom_logging.png │ ├── core_drop_files.c │ ├── core_drop_files.png │ ├── core_high_dpi.c │ ├── core_high_dpi.png │ ├── core_input_gamepad.c │ ├── core_input_gamepad.png │ ├── core_input_gestures.c │ ├── core_input_gestures.png │ ├── core_input_gestures_web.c │ ├── core_input_gestures_web.png │ ├── core_input_keys.c │ ├── core_input_keys.png │ ├── core_input_mouse.c │ ├── core_input_mouse.png │ ├── core_input_mouse_wheel.c │ ├── core_input_mouse_wheel.png │ ├── core_input_multitouch.c │ ├── core_input_multitouch.png │ ├── core_input_virtual_controls.c │ ├── core_input_virtual_controls.png │ ├── core_loading_thread.c │ ├── core_loading_thread.png │ ├── core_random_sequence.c │ ├── core_random_sequence.png │ ├── core_random_values.c │ ├── core_random_values.png │ ├── core_scissor_test.c │ ├── core_scissor_test.png │ ├── core_smooth_pixelperfect.c │ ├── core_smooth_pixelperfect.png │ ├── core_storage_values.c │ ├── core_storage_values.png │ ├── core_vr_simulator.c │ ├── core_vr_simulator.png │ ├── core_window_flags.c │ ├── core_window_flags.png │ ├── core_window_letterbox.c │ ├── core_window_letterbox.png │ ├── core_window_should_close.c │ ├── core_window_should_close.png │ ├── core_world_screen.c │ ├── core_world_screen.png │ └── resources │ │ ├── LICENSE.md │ │ ├── distortion100.fs │ │ ├── distortion330.fs │ │ ├── ps3.png │ │ └── xbox.png ├── examples.rc ├── examples_template.c ├── models │ ├── models_animation.c │ ├── models_animation.png │ ├── models_billboard.c │ ├── models_billboard.png │ ├── models_bone_socket.c │ ├── models_bone_socket.png │ ├── models_box_collisions.c │ ├── models_box_collisions.png │ ├── models_cubicmap.c │ ├── models_cubicmap.png │ ├── models_draw_cube_texture.c │ ├── models_draw_cube_texture.png │ ├── models_first_person_maze.c │ ├── models_first_person_maze.png │ ├── models_geometric_shapes.c │ ├── models_geometric_shapes.png │ ├── models_gpu_skinning.c │ ├── models_gpu_skinning.png │ ├── models_heightmap.c │ ├── models_heightmap.png │ ├── models_loading.c │ ├── models_loading.png │ ├── models_loading_gltf.c │ ├── models_loading_gltf.png │ ├── models_loading_m3d.c │ ├── models_loading_m3d.png │ ├── models_loading_vox.c │ ├── models_loading_vox.png │ ├── models_mesh_generation.c │ ├── models_mesh_generation.png │ ├── models_mesh_picking.c │ ├── models_mesh_picking.png │ ├── models_orthographic_projection.c │ ├── models_orthographic_projection.png │ ├── models_point_rendering.c │ ├── models_point_rendering.png │ ├── models_rlgl_solar_system.c │ ├── models_rlgl_solar_system.png │ ├── models_skybox.c │ ├── models_skybox.png │ ├── models_tesseract_view.c │ ├── models_tesseract_view.png │ ├── models_waving_cubes.c │ ├── models_waving_cubes.png │ ├── models_yaw_pitch_roll.c │ ├── models_yaw_pitch_roll.png │ ├── resources │ │ ├── LICENSE.md │ │ ├── billboard.png │ │ ├── cubicmap.png │ │ ├── cubicmap_atlas.png │ │ ├── dresden_square_1k.hdr │ │ ├── dresden_square_2k.hdr │ │ ├── heightmap.png │ │ ├── models │ │ │ ├── gltf │ │ │ │ ├── LICENSE │ │ │ │ ├── greenman.glb │ │ │ │ ├── greenman_hat.glb │ │ │ │ ├── greenman_shield.glb │ │ │ │ ├── greenman_sword.glb │ │ │ │ ├── raylib_logo_3d.glb │ │ │ │ ├── robot.blend │ │ │ │ └── robot.glb │ │ │ ├── iqm │ │ │ │ ├── guy.blend │ │ │ │ ├── guy.iqm │ │ │ │ ├── guyanim.iqm │ │ │ │ └── guytex.png │ │ │ ├── m3d │ │ │ │ ├── cesium_man.m3d │ │ │ │ ├── seagull.m3d │ │ │ │ └── suzanne.m3d │ │ │ ├── obj │ │ │ │ ├── bridge.obj │ │ │ │ ├── bridge_diffuse.png │ │ │ │ ├── castle.obj │ │ │ │ ├── castle_diffuse.png │ │ │ │ ├── cube.obj │ │ │ │ ├── cube_diffuse.png │ │ │ │ ├── house.obj │ │ │ │ ├── house_diffuse.png │ │ │ │ ├── market.obj │ │ │ │ ├── market_diffuse.png │ │ │ │ ├── plane.obj │ │ │ │ ├── plane_diffuse.png │ │ │ │ ├── turret.obj │ │ │ │ ├── turret_diffuse.png │ │ │ │ ├── well.obj │ │ │ │ └── well_diffuse.png │ │ │ └── vox │ │ │ │ ├── LICENSE │ │ │ │ ├── chr_knight.vox │ │ │ │ ├── chr_sword.vox │ │ │ │ ├── fez.vox │ │ │ │ └── monu9.vox │ │ ├── shaders │ │ │ ├── glsl100 │ │ │ │ ├── cubemap.fs │ │ │ │ ├── cubemap.vs │ │ │ │ ├── skinning.fs │ │ │ │ ├── skinning.vs │ │ │ │ ├── skybox.fs │ │ │ │ └── skybox.vs │ │ │ └── glsl330 │ │ │ │ ├── cubemap.fs │ │ │ │ ├── cubemap.vs │ │ │ │ ├── skinning.fs │ │ │ │ ├── skinning.vs │ │ │ │ ├── skybox.fs │ │ │ │ ├── skybox.vs │ │ │ │ ├── voxel_lighting.fs │ │ │ │ └── voxel_lighting.vs │ │ └── skybox.png │ └── rlights.h ├── others │ ├── easings_testbed.c │ ├── easings_testbed.png │ ├── embedded_files_loading.c │ ├── embedded_files_loading.png │ ├── external │ │ ├── include │ │ │ ├── GLFW │ │ │ │ ├── glfw3.h │ │ │ │ └── glfw3native.h │ │ │ ├── glad.h │ │ │ └── glad_gles2.h │ │ └── lib │ │ │ └── libglfw3.a │ ├── raylib_opengl_interop.c │ ├── raylib_opengl_interop.png │ ├── raymath_vector_angle.c │ ├── raymath_vector_angle.png │ ├── reasings.h │ ├── resources │ │ ├── audio_data.h │ │ ├── image_data.h │ │ └── shaders │ │ │ ├── glsl100 │ │ │ ├── point_particle.fs │ │ │ └── point_particle.vs │ │ │ ├── glsl330 │ │ │ ├── point_particle.fs │ │ │ └── point_particle.vs │ │ │ └── glsl430 │ │ │ ├── gol.glsl │ │ │ ├── gol_render.glsl │ │ │ └── gol_transfert.glsl │ ├── rlgl_compute_shader.c │ ├── rlgl_compute_shader.png │ ├── rlgl_standalone.c │ └── rlgl_standalone.png ├── raylib.ico ├── raylib_compile_execute.bat ├── raylib_makefile_example.bat ├── shaders │ ├── resources │ │ ├── LICENSE.md │ │ ├── cubicmap_atlas.png │ │ ├── fudesumi.png │ │ ├── mask.png │ │ ├── models │ │ │ ├── barracks.obj │ │ │ ├── barracks_diffuse.png │ │ │ ├── church.obj │ │ │ ├── church_diffuse.png │ │ │ ├── old_car_new.glb │ │ │ ├── plane.glb │ │ │ ├── robot.glb │ │ │ ├── watermill.obj │ │ │ └── watermill_diffuse.png │ │ ├── old_car_d.png │ │ ├── old_car_e.png │ │ ├── old_car_mra.png │ │ ├── old_car_n.png │ │ ├── plasma.png │ │ ├── raysan.png │ │ ├── road_a.png │ │ ├── road_mra.png │ │ ├── road_n.png │ │ ├── shaders │ │ │ ├── glsl100 │ │ │ │ ├── base.fs │ │ │ │ ├── base.vs │ │ │ │ ├── bloom.fs │ │ │ │ ├── blur.fs │ │ │ │ ├── color_mix.fs │ │ │ │ ├── cross_hatching.fs │ │ │ │ ├── cross_stitching.fs │ │ │ │ ├── cubes_panning.fs │ │ │ │ ├── deferred_shading.fs │ │ │ │ ├── deferred_shading.vs │ │ │ │ ├── depth.fs │ │ │ │ ├── distortion.fs │ │ │ │ ├── dream_vision.fs │ │ │ │ ├── eratosthenes.fs │ │ │ │ ├── fisheye.fs │ │ │ │ ├── fog.fs │ │ │ │ ├── gbuffer.fs │ │ │ │ ├── gbuffer.vs │ │ │ │ ├── grayscale.fs │ │ │ │ ├── hybrid_raster.fs │ │ │ │ ├── hybrid_raymarch.fs │ │ │ │ ├── julia_set.fs │ │ │ │ ├── lighting.fs │ │ │ │ ├── lighting.vs │ │ │ │ ├── lighting_instancing.vs │ │ │ │ ├── lightmap.fs │ │ │ │ ├── lightmap.vs │ │ │ │ ├── mask.fs │ │ │ │ ├── outline.fs │ │ │ │ ├── palette_switch.fs │ │ │ │ ├── pbr.fs │ │ │ │ ├── pbr.vs │ │ │ │ ├── pixelizer.fs │ │ │ │ ├── posterization.fs │ │ │ │ ├── predator.fs │ │ │ │ ├── raymarching.fs │ │ │ │ ├── reload.fs │ │ │ │ ├── rounded_rectangle.fs │ │ │ │ ├── scanlines.fs │ │ │ │ ├── sobel.fs │ │ │ │ ├── spotlight.fs │ │ │ │ ├── swirl.fs │ │ │ │ ├── tiling.fs │ │ │ │ ├── vertex_displacement.fs │ │ │ │ ├── vertex_displacement.vs │ │ │ │ ├── wave.fs │ │ │ │ └── write_depth.fs │ │ │ ├── glsl120 │ │ │ │ ├── base.fs │ │ │ │ ├── base.vs │ │ │ │ ├── bloom.fs │ │ │ │ ├── blur.fs │ │ │ │ ├── cross_hatching.fs │ │ │ │ ├── cross_stitching.fs │ │ │ │ ├── distortion.fs │ │ │ │ ├── dream_vision.fs │ │ │ │ ├── fisheye.fs │ │ │ │ ├── fog.fs │ │ │ │ ├── grayscale.fs │ │ │ │ ├── lighting.fs │ │ │ │ ├── lighting.vs │ │ │ │ ├── lightmap.fs │ │ │ │ ├── lightmap.vs │ │ │ │ ├── palette_switch.fs │ │ │ │ ├── pbr.fs │ │ │ │ ├── pbr.vs │ │ │ │ ├── pixelizer.fs │ │ │ │ ├── posterization.fs │ │ │ │ ├── predator.fs │ │ │ │ ├── raymarching.fs │ │ │ │ ├── rounded_rectangle.fs │ │ │ │ ├── scanlines.fs │ │ │ │ ├── shadowmap.fs │ │ │ │ ├── shadowmap.vs │ │ │ │ ├── sobel.fs │ │ │ │ └── swirl.fs │ │ │ └── glsl330 │ │ │ │ ├── base.fs │ │ │ │ ├── base.vs │ │ │ │ ├── bloom.fs │ │ │ │ ├── blur.fs │ │ │ │ ├── color_mix.fs │ │ │ │ ├── cross_hatching.fs │ │ │ │ ├── cross_stitching.fs │ │ │ │ ├── cubes_panning.fs │ │ │ │ ├── deferred_shading.fs │ │ │ │ ├── deferred_shading.vs │ │ │ │ ├── depth.fs │ │ │ │ ├── distortion.fs │ │ │ │ ├── dream_vision.fs │ │ │ │ ├── eratosthenes.fs │ │ │ │ ├── fisheye.fs │ │ │ │ ├── fog.fs │ │ │ │ ├── gbuffer.fs │ │ │ │ ├── gbuffer.vs │ │ │ │ ├── grayscale.fs │ │ │ │ ├── hybrid_raster.fs │ │ │ │ ├── hybrid_raymarch.fs │ │ │ │ ├── julia_set.fs │ │ │ │ ├── lighting.fs │ │ │ │ ├── lighting.vs │ │ │ │ ├── lighting_instancing.vs │ │ │ │ ├── lightmap.fs │ │ │ │ ├── lightmap.vs │ │ │ │ ├── mask.fs │ │ │ │ ├── outline.fs │ │ │ │ ├── overdraw.fs │ │ │ │ ├── palette_switch.fs │ │ │ │ ├── pbr.fs │ │ │ │ ├── pbr.vs │ │ │ │ ├── pixelizer.fs │ │ │ │ ├── posterization.fs │ │ │ │ ├── predator.fs │ │ │ │ ├── raymarching.fs │ │ │ │ ├── reload.fs │ │ │ │ ├── rounded_rectangle.fs │ │ │ │ ├── scanlines.fs │ │ │ │ ├── shadowmap.fs │ │ │ │ ├── shadowmap.vs │ │ │ │ ├── sobel.fs │ │ │ │ ├── spotlight.fs │ │ │ │ ├── swirl.fs │ │ │ │ ├── tiling.fs │ │ │ │ ├── vertex_displacement.fs │ │ │ │ ├── vertex_displacement.vs │ │ │ │ ├── wave.fs │ │ │ │ └── write_depth.fs │ │ ├── space.png │ │ ├── spark_flame.png │ │ └── texel_checker.png │ ├── rlights.h │ ├── shaders_basic_lighting.c │ ├── shaders_basic_lighting.png │ ├── shaders_basic_pbr.c │ ├── shaders_basic_pbr.png │ ├── shaders_custom_uniform.c │ ├── shaders_custom_uniform.png │ ├── shaders_deferred_render.c │ ├── shaders_deferred_render.png │ ├── shaders_eratosthenes.c │ ├── shaders_eratosthenes.png │ ├── shaders_fog.c │ ├── shaders_fog.png │ ├── shaders_hot_reloading.c │ ├── shaders_hot_reloading.png │ ├── shaders_hybrid_render.c │ ├── shaders_hybrid_render.png │ ├── shaders_julia_set.c │ ├── shaders_julia_set.png │ ├── shaders_lightmap.c │ ├── shaders_lightmap.png │ ├── shaders_mesh_instancing.c │ ├── shaders_mesh_instancing.png │ ├── shaders_model_shader.c │ ├── shaders_model_shader.png │ ├── shaders_multi_sample2d.c │ ├── shaders_multi_sample2d.png │ ├── shaders_palette_switch.c │ ├── shaders_palette_switch.png │ ├── shaders_postprocessing.c │ ├── shaders_postprocessing.png │ ├── shaders_raymarching.c │ ├── shaders_raymarching.png │ ├── shaders_rounded_rectangle.c │ ├── shaders_rounded_rectangle.png │ ├── shaders_shadowmap.c │ ├── shaders_shadowmap.png │ ├── shaders_shapes_textures.c │ ├── shaders_shapes_textures.png │ ├── shaders_simple_mask.c │ ├── shaders_simple_mask.png │ ├── shaders_spotlight.c │ ├── shaders_spotlight.png │ ├── shaders_texture_drawing.c │ ├── shaders_texture_drawing.png │ ├── shaders_texture_outline.c │ ├── shaders_texture_outline.png │ ├── shaders_texture_tiling.c │ ├── shaders_texture_tiling.png │ ├── shaders_texture_waves.c │ ├── shaders_texture_waves.png │ ├── shaders_vertex_displacement.c │ ├── shaders_vertex_displacement.png │ ├── shaders_view_depth.c │ ├── shaders_view_depth.png │ ├── shaders_write_depth.c │ └── shaders_write_depth.png ├── shapes │ ├── raygui.h │ ├── reasings.h │ ├── resources │ │ └── .gitkeep │ ├── shapes_basic_shapes.c │ ├── shapes_basic_shapes.png │ ├── shapes_bouncing_ball.c │ ├── shapes_bouncing_ball.png │ ├── shapes_collision_area.c │ ├── shapes_collision_area.png │ ├── shapes_colors_palette.c │ ├── shapes_colors_palette.png │ ├── shapes_draw_circle_sector.c │ ├── shapes_draw_circle_sector.png │ ├── shapes_draw_rectangle_rounded.c │ ├── shapes_draw_rectangle_rounded.png │ ├── shapes_draw_ring.c │ ├── shapes_draw_ring.png │ ├── shapes_easings_ball_anim.c │ ├── shapes_easings_ball_anim.png │ ├── shapes_easings_box_anim.c │ ├── shapes_easings_box_anim.png │ ├── shapes_easings_rectangle_array.c │ ├── shapes_easings_rectangle_array.png │ ├── shapes_following_eyes.c │ ├── shapes_following_eyes.png │ ├── shapes_lines_bezier.c │ ├── shapes_lines_bezier.png │ ├── shapes_logo_raylib.c │ ├── shapes_logo_raylib.png │ ├── shapes_logo_raylib_anim.c │ ├── shapes_logo_raylib_anim.png │ ├── shapes_rectangle_advanced.c │ ├── shapes_rectangle_advanced.png │ ├── shapes_rectangle_scaling.c │ ├── shapes_rectangle_scaling.png │ ├── shapes_splines_drawing.c │ ├── shapes_splines_drawing.png │ ├── shapes_top_down_lights.c │ └── shapes_top_down_lights.png ├── text │ ├── resources │ │ ├── DotGothic16-Regular.ttf │ │ ├── DotGothic16-Regular_OFL.txt │ │ ├── KAISG.ttf │ │ ├── LICENSE.md │ │ ├── anonymous_pro_bold.ttf │ │ ├── custom_alagard.png │ │ ├── custom_jupiter_crash.png │ │ ├── custom_mecha.png │ │ ├── dejavu.fnt │ │ ├── dejavu.png │ │ ├── fonts │ │ │ ├── alagard.png │ │ │ ├── alpha_beta.png │ │ │ ├── jupiter_crash.png │ │ │ ├── mecha.png │ │ │ ├── pixantiqua.png │ │ │ ├── pixelplay.png │ │ │ ├── romulus.png │ │ │ └── setback.png │ │ ├── noto_cjk.fnt │ │ ├── noto_cjk.png │ │ ├── pixantiqua.fnt │ │ ├── pixantiqua.png │ │ ├── pixantiqua.ttf │ │ ├── shaders │ │ │ ├── glsl100 │ │ │ │ ├── alpha_discard.fs │ │ │ │ └── sdf.fs │ │ │ └── glsl330 │ │ │ │ ├── alpha_discard.fs │ │ │ │ └── sdf.fs │ │ ├── symbola.fnt │ │ └── symbola.png │ ├── text_codepoints_loading.c │ ├── text_codepoints_loading.png │ ├── text_draw_3d.c │ ├── text_draw_3d.png │ ├── text_font_filters.c │ ├── text_font_filters.png │ ├── text_font_loading.c │ ├── text_font_loading.png │ ├── text_font_sdf.c │ ├── text_font_sdf.png │ ├── text_font_spritefont.c │ ├── text_font_spritefont.png │ ├── text_format_text.c │ ├── text_format_text.png │ ├── text_input_box.c │ ├── text_input_box.png │ ├── text_raylib_fonts.c │ ├── text_raylib_fonts.png │ ├── text_rectangle_bounds.c │ ├── text_rectangle_bounds.png │ ├── text_unicode.c │ ├── text_unicode.png │ ├── text_writing_anim.c │ └── text_writing_anim.png └── textures │ ├── resources │ ├── KAISG.ttf │ ├── LICENSE.md │ ├── boom.wav │ ├── button.png │ ├── buttonfx.wav │ ├── cat.png │ ├── custom_jupiter_crash.png │ ├── cyberpunk_street_background.png │ ├── cyberpunk_street_foreground.png │ ├── cyberpunk_street_midground.png │ ├── explosion.png │ ├── fudesumi.png │ ├── fudesumi.raw │ ├── ninepatch_button.png │ ├── parrots.png │ ├── patterns.png │ ├── raylib_logo.png │ ├── road.png │ ├── scarfy.png │ ├── scarfy_run.gif │ ├── spark_flame.png │ └── wabbit_alpha.png │ ├── textures_background_scrolling.c │ ├── textures_background_scrolling.png │ ├── textures_blend_modes.c │ ├── textures_blend_modes.png │ ├── textures_bunnymark.c │ ├── textures_bunnymark.png │ ├── textures_draw_tiled.c │ ├── textures_draw_tiled.png │ ├── textures_fog_of_war.c │ ├── textures_fog_of_war.png │ ├── textures_gif_player.c │ ├── textures_gif_player.png │ ├── textures_image_channel.c │ ├── textures_image_channel.png │ ├── textures_image_drawing.c │ ├── textures_image_drawing.png │ ├── textures_image_generation.c │ ├── textures_image_generation.png │ ├── textures_image_kernel.c │ ├── textures_image_kernel.png │ ├── textures_image_loading.c │ ├── textures_image_loading.png │ ├── textures_image_processing.c │ ├── textures_image_processing.png │ ├── textures_image_rotate.c │ ├── textures_image_rotate.png │ ├── textures_image_text.c │ ├── textures_image_text.png │ ├── textures_logo_raylib.c │ ├── textures_logo_raylib.png │ ├── textures_mouse_painting.c │ ├── textures_mouse_painting.png │ ├── textures_npatch_drawing.c │ ├── textures_npatch_drawing.png │ ├── textures_particles_blending.c │ ├── textures_particles_blending.png │ ├── textures_polygon.c │ ├── textures_polygon.png │ ├── textures_raw_data.c │ ├── textures_raw_data.png │ ├── textures_sprite_anim.c │ ├── textures_sprite_anim.png │ ├── textures_sprite_button.c │ ├── textures_sprite_button.png │ ├── textures_sprite_explosion.c │ ├── textures_sprite_explosion.png │ ├── textures_srcrec_dstrec.c │ ├── textures_srcrec_dstrec.png │ ├── textures_textured_curve.c │ ├── textures_textured_curve.png │ ├── textures_to_image.c │ └── textures_to_image.png ├── logo ├── raylib.icns ├── raylib.ico ├── raylib_1024x1024.png ├── raylib_128x128.png ├── raylib_144x144.png ├── raylib_16x16.png ├── raylib_180x180.png ├── raylib_24x24.png ├── raylib_256x256.png ├── raylib_32x32.png ├── raylib_36x36.png ├── raylib_48x48.png ├── raylib_512x512.png ├── raylib_64x64.png ├── raylib_72x72.png ├── raylib_96x96.png └── raylib_logo_animation.gif ├── parser ├── LICENSE ├── Makefile ├── README.md ├── output │ ├── raylib_api.json │ ├── raylib_api.lua │ ├── raylib_api.txt │ └── raylib_api.xml └── raylib_parser.c ├── projects ├── 4coder │ ├── Makefile │ ├── Makefile.Android │ ├── main.c │ └── project.4coder ├── Builder │ ├── README.md │ ├── examples │ │ ├── README.md │ │ └── meson.build │ └── meson.build ├── CMake │ ├── CMakeLists.txt │ ├── README.md │ └── core_basic_window.c ├── CodeBlocks │ ├── README.md │ ├── compiler_settings.png │ ├── core_basic_window.c │ └── core_basic_window.cbp ├── Geany │ ├── core_basic_window.c │ ├── raylib.c.tags │ ├── raylib_compile_execute.bat │ ├── raylib_compile_sources.bat │ └── raylib_project.geany ├── Notepad++ │ ├── README.md │ ├── npes_saved_mingw.txt │ ├── npes_saved_tcc.txt │ ├── npes_saved_w64devkit.txt │ ├── npes_saved_zig.txt │ └── raylib_npp_parser │ │ ├── raylib_npp.xml │ │ ├── raylib_npp_parser.c │ │ └── raylib_to_parse.h ├── README.md ├── SublimeText │ ├── README.md │ ├── raylib.sublime-build │ └── raylib.sublime-project ├── VS2019-Android │ ├── raylib_android.sln │ └── raylib_android │ │ ├── raylib_android.NativeActivity │ │ ├── android_native_app_glue.c │ │ ├── android_native_app_glue.h │ │ ├── main.c │ │ ├── raylib_android.NativeActivity.vcxproj │ │ ├── raylib_android.NativeActivity.vcxproj.filters │ │ └── raylib_android.NativeActivity.vcxproj.user │ │ └── raylib_android.Packaging │ │ ├── AndroidManifest.xml │ │ ├── build.xml │ │ ├── project.properties │ │ ├── raylib_android.Packaging.androidproj │ │ └── res │ │ └── values │ │ └── strings.xml ├── VS2022 │ ├── examples │ │ ├── audio_mixed_processor.vcxproj │ │ ├── audio_module_playing.vcxproj │ │ ├── audio_music_stream.vcxproj │ │ ├── audio_raw_stream.vcxproj │ │ ├── audio_sound_loading.vcxproj │ │ ├── audio_sound_multi.vcxproj │ │ ├── audio_stream_effects.vcxproj │ │ ├── core_2d_camera.vcxproj │ │ ├── core_2d_camera_mouse_zoom.vcxproj │ │ ├── core_2d_camera_platformer.vcxproj │ │ ├── core_2d_camera_split_screen.vcxproj │ │ ├── core_3d_camera_first_person.vcxproj │ │ ├── core_3d_camera_free.vcxproj │ │ ├── core_3d_camera_mode.vcxproj │ │ ├── core_3d_camera_split_screen.vcxproj │ │ ├── core_3d_picking.vcxproj │ │ ├── core_automation_events.vcxproj │ │ ├── core_basic_screen_manager.vcxproj │ │ ├── core_basic_window.vcxproj │ │ ├── core_custom_frame_control.vcxproj │ │ ├── core_custom_logging.vcxproj │ │ ├── core_drop_files.vcxproj │ │ ├── core_high_dpi.vcxproj │ │ ├── core_input_gamepad.vcxproj │ │ ├── core_input_gestures.vcxproj │ │ ├── core_input_keys.vcxproj │ │ ├── core_input_mouse.vcxproj │ │ ├── core_input_mouse_wheel.vcxproj │ │ ├── core_input_multitouch.vcxproj │ │ ├── core_input_virtual_controls.vcxproj │ │ ├── core_loading_thread.vcxproj │ │ ├── core_random_sequence.vcxproj │ │ ├── core_random_values.vcxproj │ │ ├── core_scissor_test.vcxproj │ │ ├── core_smooth_pixelperfect.vcxproj │ │ ├── core_storage_values.vcxproj │ │ ├── core_vr_simulator.vcxproj │ │ ├── core_window_flags.vcxproj │ │ ├── core_window_letterbox.vcxproj │ │ ├── core_window_should_close.vcxproj │ │ ├── core_world_screen.vcxproj │ │ ├── easings_testbed.vcxproj │ │ ├── embedded_files_loading.vcxproj │ │ ├── models_animation.vcxproj │ │ ├── models_billboard.vcxproj │ │ ├── models_bone_socket.vcxproj │ │ ├── models_box_collisions.vcxproj │ │ ├── models_cubicmap.vcxproj │ │ ├── models_draw_cube_texture.vcxproj │ │ ├── models_first_person_maze.vcxproj │ │ ├── models_geometric_shapes.vcxproj │ │ ├── models_gpu_skinning.vcxproj │ │ ├── models_heightmap.vcxproj │ │ ├── models_loading.vcxproj │ │ ├── models_loading_gltf.vcxproj │ │ ├── models_loading_m3d.vcxproj │ │ ├── models_loading_vox.vcxproj │ │ ├── models_mesh_generation.vcxproj │ │ ├── models_mesh_picking.vcxproj │ │ ├── models_orthographic_projection.vcxproj │ │ ├── models_rlgl_solar_system.vcxproj │ │ ├── models_skybox.vcxproj │ │ ├── models_waving_cubes.vcxproj │ │ ├── models_yaw_pitch_roll.vcxproj │ │ ├── rlgl_compute_shaders.vcxproj │ │ ├── rlgl_standalone.vcxproj │ │ ├── shaders_basic_lighting.vcxproj │ │ ├── shaders_custom_uniform.vcxproj │ │ ├── shaders_deferred_render.vcxproj │ │ ├── shaders_eratosthenes.vcxproj │ │ ├── shaders_fog.vcxproj │ │ ├── shaders_hot_reloading.vcxproj │ │ ├── shaders_hybrid_render.vcxproj │ │ ├── shaders_julia_set.vcxproj │ │ ├── shaders_mesh_instancing.vcxproj │ │ ├── shaders_model_shader.vcxproj │ │ ├── shaders_multi_sample2d.vcxproj │ │ ├── shaders_palette_switch.vcxproj │ │ ├── shaders_postprocessing.vcxproj │ │ ├── shaders_raymarching.vcxproj │ │ ├── shaders_rounded_rectangle.vcxproj │ │ ├── shaders_shadowmap.vcxproj │ │ ├── shaders_shapes_textures.vcxproj │ │ ├── shaders_simple_mask.vcxproj │ │ ├── shaders_spotlight.vcxproj │ │ ├── shaders_texture_drawing.vcxproj │ │ ├── shaders_texture_outline.vcxproj │ │ ├── shaders_texture_tiling.vcxproj │ │ ├── shaders_texture_waves.vcxproj │ │ ├── shaders_vertex_displacement.vcxproj │ │ ├── shaders_view_depth.vcxproj │ │ ├── shaders_write_depth.vcxproj │ │ ├── shapes_basic_shapes.vcxproj │ │ ├── shapes_bouncing_ball.vcxproj │ │ ├── shapes_collision_area.vcxproj │ │ ├── shapes_colors_palette.vcxproj │ │ ├── shapes_draw_circle_sector.vcxproj │ │ ├── shapes_draw_rectangle_rounded.vcxproj │ │ ├── shapes_draw_ring.vcxproj │ │ ├── shapes_easings_ball_anim.vcxproj │ │ ├── shapes_easings_box_anim.vcxproj │ │ ├── shapes_easings_rectangle_array.vcxproj │ │ ├── shapes_following_eyes.vcxproj │ │ ├── shapes_lines_bezier.vcxproj │ │ ├── shapes_logo_raylib.vcxproj │ │ ├── shapes_logo_raylib_anim.vcxproj │ │ ├── shapes_rectangle_advanced.vcxproj │ │ ├── shapes_rectangle_scaling.vcxproj │ │ ├── shapes_splines_drawing.vcxproj │ │ ├── shapes_top_down_lights.vcxproj │ │ ├── text_codepoints_loading.vcxproj │ │ ├── text_draw_3d.vcxproj │ │ ├── text_font_filters.vcxproj │ │ ├── text_font_loading.vcxproj │ │ ├── text_font_sdf.vcxproj │ │ ├── text_font_spritefont.vcxproj │ │ ├── text_format_text.vcxproj │ │ ├── text_input_box.vcxproj │ │ ├── text_raylib_fonts.vcxproj │ │ ├── text_rectangle_bounds.vcxproj │ │ ├── text_unicode.vcxproj │ │ ├── text_writing_anim.vcxproj │ │ ├── textures_background_scrolling.vcxproj │ │ ├── textures_blend_modes.vcxproj │ │ ├── textures_bunnymark.vcxproj │ │ ├── textures_draw_tiled.vcxproj │ │ ├── textures_fog_of_war.vcxproj │ │ ├── textures_gif_player.vcxproj │ │ ├── textures_image_drawing.vcxproj │ │ ├── textures_image_generation.vcxproj │ │ ├── textures_image_loading.vcxproj │ │ ├── textures_image_processing.vcxproj │ │ ├── textures_image_text.vcxproj │ │ ├── textures_logo_raylib.vcxproj │ │ ├── textures_mouse_painting.vcxproj │ │ ├── textures_npatch_drawing.vcxproj │ │ ├── textures_particles_blending.vcxproj │ │ ├── textures_polygon.vcxproj │ │ ├── textures_raw_data.vcxproj │ │ ├── textures_sprite_anim.vcxproj │ │ ├── textures_sprite_button.vcxproj │ │ ├── textures_sprite_explosion.vcxproj │ │ ├── textures_srcrec_dstrec.vcxproj │ │ ├── textures_svg_loading.vcxproj │ │ ├── textures_textured_curve.vcxproj │ │ └── textures_to_image.vcxproj │ ├── raylib.sln │ └── raylib │ │ ├── raylib.vcxproj │ │ └── raylib.vcxproj.filters ├── VSCode │ ├── .vscode │ │ ├── c_cpp_properties.json │ │ ├── launch.json │ │ ├── settings.json │ │ └── tasks.json │ ├── Makefile │ ├── Makefile.Android │ ├── main.c │ ├── main.code-workspace │ └── resources │ │ └── LICENSE └── scripts │ ├── README.md │ ├── build-linux.sh │ ├── build-osx.sh │ ├── build-rpi.sh │ ├── build-windows.bat │ └── core_basic_window.c ├── raylib.pc.in └── src ├── CMakeLists.txt ├── Makefile ├── config.h ├── external ├── RGFW.h ├── cgltf.h ├── dirent.h ├── dr_flac.h ├── dr_mp3.h ├── dr_wav.h ├── glad.h ├── glad_gles2.h ├── glfw │ ├── .mailmap │ ├── CMake │ │ ├── GenerateMappings.cmake │ │ ├── Info.plist.in │ │ ├── cmake_uninstall.cmake.in │ │ ├── glfw3.pc.in │ │ ├── glfw3Config.cmake.in │ │ ├── i686-w64-mingw32-clang.cmake │ │ ├── i686-w64-mingw32.cmake │ │ ├── modules │ │ │ ├── FindEpollShim.cmake │ │ │ └── FindOSMesa.cmake │ │ ├── x86_64-w64-mingw32-clang.cmake │ │ └── x86_64-w64-mingw32.cmake │ ├── CMakeLists.txt │ ├── CONTRIBUTORS.md │ ├── LICENSE.md │ ├── README.md │ ├── deps │ │ ├── getopt.c │ │ ├── getopt.h │ │ ├── glad │ │ │ ├── gl.h │ │ │ ├── gles2.h │ │ │ └── vulkan.h │ │ ├── mingw │ │ │ ├── _mingw_dxhelper.h │ │ │ ├── dinput.h │ │ │ └── xinput.h │ │ └── wayland │ │ │ ├── fractional-scale-v1.xml │ │ │ ├── idle-inhibit-unstable-v1.xml │ │ │ ├── pointer-constraints-unstable-v1.xml │ │ │ ├── relative-pointer-unstable-v1.xml │ │ │ ├── viewporter.xml │ │ │ ├── wayland.xml │ │ │ ├── xdg-activation-v1.xml │ │ │ ├── xdg-decoration-unstable-v1.xml │ │ │ └── xdg-shell.xml │ ├── include │ │ └── GLFW │ │ │ ├── glfw3.h │ │ │ └── glfw3native.h │ └── src │ │ ├── CMakeLists.txt │ │ ├── cocoa_init.m │ │ ├── cocoa_joystick.h │ │ ├── cocoa_joystick.m │ │ ├── cocoa_monitor.m │ │ ├── cocoa_platform.h │ │ ├── cocoa_time.c │ │ ├── cocoa_time.h │ │ ├── cocoa_window.m │ │ ├── context.c │ │ ├── egl_context.c │ │ ├── glfw.rc.in │ │ ├── glx_context.c │ │ ├── init.c │ │ ├── input.c │ │ ├── internal.h │ │ ├── linux_joystick.c │ │ ├── linux_joystick.h │ │ ├── mappings.h │ │ ├── mappings.h.in │ │ ├── monitor.c │ │ ├── nsgl_context.m │ │ ├── null_init.c │ │ ├── null_joystick.c │ │ ├── null_joystick.h │ │ ├── null_monitor.c │ │ ├── null_platform.h │ │ ├── null_window.c │ │ ├── osmesa_context.c │ │ ├── platform.c │ │ ├── platform.h │ │ ├── posix_module.c │ │ ├── posix_poll.c │ │ ├── posix_poll.h │ │ ├── posix_thread.c │ │ ├── posix_thread.h │ │ ├── posix_time.c │ │ ├── posix_time.h │ │ ├── vulkan.c │ │ ├── wgl_context.c │ │ ├── win32_init.c │ │ ├── win32_joystick.c │ │ ├── win32_joystick.h │ │ ├── win32_module.c │ │ ├── win32_monitor.c │ │ ├── win32_platform.h │ │ ├── win32_thread.c │ │ ├── win32_thread.h │ │ ├── win32_time.c │ │ ├── win32_time.h │ │ ├── win32_window.c │ │ ├── window.c │ │ ├── wl_init.c │ │ ├── wl_monitor.c │ │ ├── wl_platform.h │ │ ├── wl_window.c │ │ ├── x11_init.c │ │ ├── x11_monitor.c │ │ ├── x11_platform.h │ │ ├── x11_window.c │ │ ├── xkb_unicode.c │ │ └── xkb_unicode.h ├── jar_mod.h ├── jar_xm.h ├── m3d.h ├── miniaudio.h ├── msf_gif.h ├── par_shapes.h ├── qoa.h ├── qoaplay.c ├── qoi.h ├── rl_gputex.h ├── rprand.h ├── sdefl.h ├── sinfl.h ├── stb_image.h ├── stb_image_resize2.h ├── stb_image_write.h ├── stb_perlin.h ├── stb_rect_pack.h ├── stb_truetype.h ├── stb_vorbis.c ├── tinyobj_loader_c.h ├── vox_loader.h └── win32_clipboard.h ├── minshell.html ├── platforms ├── rcore_android.c ├── rcore_desktop_glfw.c ├── rcore_desktop_rgfw.c ├── rcore_desktop_sdl.c ├── rcore_drm.c ├── rcore_template.c └── rcore_web.c ├── raudio.c ├── raylib.dll.rc ├── raylib.dll.rc.data ├── raylib.h ├── raylib.ico ├── raylib.rc ├── raylib.rc.data ├── raymath.h ├── rcamera.h ├── rcore.c ├── rgestures.h ├── rglfw.c ├── rlgl.h ├── rmodels.c ├── rshapes.c ├── rtext.c ├── rtextures.c ├── shell.html ├── utils.c └── utils.h /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: raysan5 4 | patreon: # raylib 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # raysan 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | custom: # Replace with a single custom sponsorship URL 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /.github/workflows/linux_examples.yml: -------------------------------------------------------------------------------- 1 | name: Linux Examples 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | paths: 7 | - 'src/**' 8 | - 'examples/**' 9 | - '.github/workflows/linux_examples.yml' 10 | pull_request: 11 | branches: [ master ] 12 | paths: 13 | - 'src/**' 14 | - 'examples/**' 15 | - '.github/workflows/linux_examples.yml' 16 | 17 | permissions: 18 | contents: read 19 | 20 | jobs: 21 | build: 22 | runs-on: ubuntu-latest 23 | steps: 24 | - name: Checkout code 25 | uses: actions/checkout@v4 26 | 27 | - name: Setup Environment 28 | run: | 29 | sudo apt-get update -qq 30 | sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libwayland-dev libxkbcommon-dev 31 | 32 | - name: Build Library 33 | run: | 34 | cd src 35 | make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC 36 | cd .. 37 | 38 | - name: Build Examples 39 | run: | 40 | cd examples 41 | make PLATFORM=PLATFORM_DESKTOP -B 42 | cd .. 43 | -------------------------------------------------------------------------------- /.github/workflows/parse.yml: -------------------------------------------------------------------------------- 1 | name: Parse raylib_api 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | paths: 7 | - "src/raylib.h" 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v4 15 | 16 | - name: Update parse files 17 | working-directory: parser 18 | run: | 19 | make raylib_api 20 | mv raylib_api.* output 21 | 22 | - name: Diff parse files 23 | id: diff 24 | run: | 25 | git add -N parser 26 | git diff --name-only --exit-code 27 | continue-on-error: true 28 | 29 | - name: Commit parse files 30 | if: steps.diff.outcome == 'failure' 31 | run: | 32 | set -x 33 | git config user.email "github-actions[bot]@users.noreply.github.com" 34 | git config user.name "github-actions[bot]" 35 | git add parser 36 | git commit -m "Update raylib_api.* by CI" 37 | git push 38 | -------------------------------------------------------------------------------- /.github/workflows/windows_examples.yml: -------------------------------------------------------------------------------- 1 | name: Windows Examples 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | paths: 7 | - 'src/**' 8 | - 'examples/**' 9 | - '.github/workflows/windows_examples.yml' 10 | pull_request: 11 | branches: [ master ] 12 | paths: 13 | - 'src/**' 14 | - 'examples/**' 15 | - '.github/workflows/windows_examples.yml' 16 | 17 | permissions: 18 | contents: read 19 | 20 | jobs: 21 | build: 22 | runs-on: windows-latest 23 | 24 | steps: 25 | - uses: actions/checkout@v4 26 | 27 | - name: Add MSBuild to PATH 28 | uses: microsoft/setup-msbuild@v1 29 | 30 | - name: Build Library (MSVC16) 31 | run: | 32 | cd projects/VS2019 33 | msbuild.exe raylib.sln /property:Configuration=Release /property:Platform=x86 34 | cd ../.. 35 | shell: cmd 36 | 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2025 Ramon Santamaria (@raysan5) 2 | 3 | This software is provided "as-is", without any express or implied warranty. In no event 4 | will the authors be held liable for any damages arising from the use of this software. 5 | 6 | Permission is granted to anyone to use this software for any purpose, including commercial 7 | applications, and to alter it and redistribute it freely, subject to the following restrictions: 8 | 9 | 1. The origin of this software must not be misrepresented; you must not claim that you 10 | wrote the original software. If you use this software in a product, an acknowledgment 11 | in the product documentation would be appreciated but is not required. 12 | 13 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented 14 | as being the original software. 15 | 16 | 3. This notice may not be removed or altered from any source distribution. 17 | -------------------------------------------------------------------------------- /build.zig.zon: -------------------------------------------------------------------------------- 1 | .{ 2 | .name = .raylib, 3 | .version = "5.5.0", 4 | .minimum_zig_version = "0.14.0", 5 | 6 | .fingerprint = 0x13035e5cb8bc1ac2, // Changing this has security and trust implications. 7 | 8 | .dependencies = .{ 9 | .xcode_frameworks = .{ 10 | .url = "git+https://github.com/hexops/xcode-frameworks#9a45f3ac977fd25dff77e58c6de1870b6808c4a7", 11 | .hash = "N-V-__8AABHMqAWYuRdIlflwi8gksPnlUMQBiSxAqQAAZFms", 12 | .lazy = true, 13 | }, 14 | .emsdk = .{ 15 | .url = "git+https://github.com/emscripten-core/emsdk#3.1.50", 16 | .hash = "N-V-__8AALRTBQDo_pUJ8IQ-XiIyYwDKQVwnr7-7o5kvPDGE", 17 | .lazy = true, 18 | }, 19 | }, 20 | 21 | .paths = .{ 22 | "build.zig", 23 | "build.zig.zon", 24 | "src", 25 | "examples", 26 | }, 27 | } 28 | -------------------------------------------------------------------------------- /cmake/AddIfFlagCompiles.cmake: -------------------------------------------------------------------------------- 1 | include(CheckCCompilerFlag) 2 | function(add_if_flag_compiles flag) 3 | CHECK_C_COMPILER_FLAG("${flag}" COMPILER_HAS_THOSE_TOGGLES) 4 | set(outcome "Failed") 5 | if(COMPILER_HAS_THOSE_TOGGLES) 6 | foreach(var ${ARGN}) 7 | set(${var} "${flag} ${${var}}" PARENT_SCOPE) 8 | endforeach() 9 | set(outcome "compiles") 10 | endif() 11 | message(STATUS "Testing if ${flag} can be used -- ${outcome}") 12 | endfunction() 13 | -------------------------------------------------------------------------------- /cmake/CompileDefinitions.cmake: -------------------------------------------------------------------------------- 1 | # Adding compile definitions 2 | target_compile_definitions("raylib" PUBLIC "${PLATFORM_CPP}") 3 | target_compile_definitions("raylib" PUBLIC "${GRAPHICS}") 4 | 5 | function(define_if target variable) 6 | if(${${variable}}) 7 | message(STATUS "${variable}=${${variable}}") 8 | target_compile_definitions(${target} PRIVATE "${variable}") 9 | endif() 10 | endfunction() 11 | 12 | if(${CUSTOMIZE_BUILD}) 13 | target_compile_definitions("raylib" PRIVATE EXTERNAL_CONFIG_FLAGS) 14 | 15 | foreach(FLAG IN LISTS CONFIG_HEADER_FLAGS) 16 | string(REGEX MATCH "([^=]+)=(.+)" _ ${FLAG}) 17 | define_if("raylib" ${CMAKE_MATCH_1}) 18 | endforeach() 19 | 20 | foreach(VALUE IN LISTS CONFIG_HEADER_VALUES) 21 | target_compile_definitions("raylib" PRIVATE ${VALUE}) 22 | endforeach() 23 | endif() 24 | -------------------------------------------------------------------------------- /cmake/EnumOption.cmake: -------------------------------------------------------------------------------- 1 | macro(enum_option var values description) 2 | set(${var}_VALUES ${values}) 3 | list(GET ${var}_VALUES 0 default) 4 | set(${var} "${default}" CACHE STRING "${description}") 5 | set_property(CACHE ${var} PROPERTY STRINGS ${${var}_VALUES}) 6 | if (NOT ";${${var}_VALUES};" MATCHES ";${${var}};") 7 | message(FATAL_ERROR "Unknown value ${${var}}. Only -D${var}=${${var}_VALUES} allowed.") 8 | endif() 9 | endmacro() 10 | -------------------------------------------------------------------------------- /cmake/JoinPaths.cmake: -------------------------------------------------------------------------------- 1 | # This module provides function for joining paths 2 | # known from most languages 3 | # 4 | # Original license: 5 | # SPDX-License-Identifier: (MIT OR CC0-1.0) 6 | # Explicit permission given to distribute this module under 7 | # the terms of the project as described in /LICENSE.rst. 8 | # Copyright 2020 Jan Tojnar 9 | # https://github.com/jtojnar/cmake-snips 10 | # 11 | # Modelled after Python’s os.path.join 12 | # https://docs.python.org/3.7/library/os.path.html#os.path.join 13 | # Windows not supported 14 | function(join_paths joined_path first_path_segment) 15 | set(temp_path "${first_path_segment}") 16 | foreach(current_segment IN LISTS ARGN) 17 | if(NOT ("${current_segment}" STREQUAL "")) 18 | if(IS_ABSOLUTE "${current_segment}") 19 | set(temp_path "${current_segment}") 20 | else() 21 | set(temp_path "${temp_path}/${current_segment}") 22 | endif() 23 | endif() 24 | endforeach() 25 | set(${joined_path} "${temp_path}" PARENT_SCOPE) 26 | endfunction() 27 | -------------------------------------------------------------------------------- /cmake/LibraryPathToLinkerFlags.cmake: -------------------------------------------------------------------------------- 1 | function(library_path_to_linker_flags LD_FLAGS LIB_PATHS) 2 | foreach(L ${LIB_PATHS}) 3 | get_filename_component(DIR ${L} PATH) 4 | get_filename_component(LIBFILE ${L} NAME_WE) 5 | STRING(REGEX REPLACE "^lib" "" FILE ${LIBFILE}) 6 | 7 | if (${L} MATCHES "[.]framework$") 8 | set(FILE_OPT "-framework ${FILE}") 9 | set(DIR_OPT "-F${DIR}") 10 | else() 11 | set(FILE_OPT "-l${FILE}") 12 | set(DIR_OPT "-L${DIR}") 13 | endif() 14 | 15 | if ("${DIR}" STREQUAL "" OR "${DIR}" STREQUAL "${LASTDIR}") 16 | set (DIR_OPT "") 17 | endif() 18 | 19 | set(LASTDIR ${DIR}) 20 | 21 | set(${LD_FLAGS} ${${LD_FLAGS}} ${DIR_OPT} ${FILE_OPT} PARENT_SCOPE) 22 | string (REPLACE ";" " " ${LD_FLAGS} "${${LD_FLAGS}}") 23 | endforeach() 24 | endfunction() 25 | -------------------------------------------------------------------------------- /cmake/PackConfigurations.cmake: -------------------------------------------------------------------------------- 1 | # Packaging 2 | SET(CPACK_PACKAGE_NAME "raylib") 3 | SET(CPACK_PACKAGE_CONTACT "raysan5") 4 | SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Simple and easy-to-use library to enjoy videogames programming") 5 | SET(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}") 6 | SET(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") 7 | SET(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}") 8 | SET(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}") 9 | SET(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/../README.md") 10 | SET(CPACK_RESOURCE_FILE_WELCOME "${PROJECT_SOURCE_DIR}/../README.md") 11 | SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/../LICENSE") 12 | SET(CPACK_PACKAGE_FILE_NAME "raylib-${PROJECT_VERSION}$ENV{RAYLIB_PACKAGE_SUFFIX}") 13 | SET(CPACK_GENERATOR "ZIP;TGZ;DEB;RPM") # Remove this, if you want the NSIS installer on Windows 14 | SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) # can be used to generate deps, slow and requires tools. 15 | SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libatomic1, libc6, libglfw3, libglu1-mesa | libglu1, libglx0, libopengl0") 16 | SET(CPACK_DEBIAN_PACKAGE_NAME "lib${CPACK_PACKAGE_NAME}-dev") 17 | SET(CPACK_RPM_PACKAGE_NAME "lib${CPACK_PACKAGE_NAME}-devel") 18 | include(CPack) 19 | -------------------------------------------------------------------------------- /cmake/ParseConfigHeader.cmake: -------------------------------------------------------------------------------- 1 | file(READ "${CMAKE_CURRENT_SOURCE_DIR}/src/config.h" CONFIG_HEADER_CONTENT) 2 | 3 | set(BLANK_OR_BACKSLASH_PATTERN "[ \t\r\n\\]") 4 | set(VALID_IDENTIFIER_PATTERN "[A-Za-z_]+[A-Za-z_0-9]*") 5 | set(VALID_VALUE_PATTERN [=["?[A-Za-z_0-9.-]+"?]=]) # not really correct but does the job since the config.h file hopefully will have been checked by a C preprocessor. 6 | set(MACRO_REGEX "(//${BLANK_OR_BACKSLASH_PATTERN}*)?\#define${BLANK_OR_BACKSLASH_PATTERN}+(${VALID_IDENTIFIER_PATTERN})${BLANK_OR_BACKSLASH_PATTERN}+(${VALID_VALUE_PATTERN})") 7 | 8 | string(REGEX MATCHALL ${MACRO_REGEX} MACRO_LIST ${CONFIG_HEADER_CONTENT}) 9 | 10 | set(CONFIG_HEADER_FLAGS ${MACRO_LIST}) 11 | list(FILTER CONFIG_HEADER_FLAGS INCLUDE REGEX "^.+SUPPORT_") 12 | list(TRANSFORM CONFIG_HEADER_FLAGS REPLACE ${MACRO_REGEX} [[\2=OFF]] REGEX "^//") 13 | list(TRANSFORM CONFIG_HEADER_FLAGS REPLACE ${MACRO_REGEX} [[\2=ON]]) 14 | 15 | set(CONFIG_HEADER_VALUES ${MACRO_LIST}) 16 | list(FILTER CONFIG_HEADER_VALUES EXCLUDE REGEX "(^.+SUPPORT_)|(^//)") 17 | list(TRANSFORM CONFIG_HEADER_VALUES REPLACE ${MACRO_REGEX} [[\2=\3]]) 18 | -------------------------------------------------------------------------------- /cmake/PopulateConfigVariablesLocally.cmake: -------------------------------------------------------------------------------- 1 | macro(populate_config_variables_locally target) 2 | get_property(raylib_INCLUDE_DIRS TARGET ${target} PROPERTY INTERFACE_INCLUDE_DIRECTORIES) 3 | #get_property(raylib_LIBRARIES TARGET ${target} PROPERTY LOCATION) # only works for SHARED 4 | get_property(raylib_LDFLAGS TARGET ${target} PROPERTY INTERFACE_LINK_LIBRARIES) 5 | get_property(raylib_DEFINITIONS TARGET ${target} PROPERTY DEFINITIONS) 6 | 7 | set(raylib_INCLUDE_DIRS "${raylib_INCLUDE_DIRS}" PARENT_SCOPE) 8 | #set(raylib_LIBRARIES "${raylib_INCLUDE_DIRS}" PARENT_SCOPE) 9 | set(raylib_LDFLAGS "${raylib_LDFLAGS}" PARENT_SCOPE) 10 | set(raylib_DEFINITIONS "${raylib_DEFINITIONS}" PARENT_SCOPE) 11 | endmacro() 12 | -------------------------------------------------------------------------------- /cmake/Uninstall.cmake: -------------------------------------------------------------------------------- 1 | if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") 2 | message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt") 3 | endif() 4 | 5 | file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files) 6 | string(REGEX REPLACE "\n" ";" files "${files}") 7 | foreach(file ${files}) 8 | message(STATUS "Uninstalling $ENV{DESTDIR}${file}") 9 | if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 10 | exec_program( 11 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 12 | OUTPUT_VARIABLE rm_out 13 | RETURN_VALUE rm_retval 14 | ) 15 | if(NOT "${rm_retval}" STREQUAL 0) 16 | message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") 17 | endif() 18 | else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 19 | message(STATUS "File $ENV{DESTDIR}${file} does not exist.") 20 | endif() 21 | endforeach() 22 | -------------------------------------------------------------------------------- /cmake/raylib-config-version.cmake: -------------------------------------------------------------------------------- 1 | set(PACKAGE_VERSION "@PROJECT_VERSION@") 2 | 3 | if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) 4 | set(PACKAGE_VERSION_EXACT TRUE) 5 | endif() 6 | if(NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION) 7 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 8 | else(NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION) 9 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 10 | endif(NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION) 11 | 12 | # if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: 13 | if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "") 14 | return() 15 | endif() 16 | 17 | if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "@CMAKE_SIZEOF_VOID_P@") 18 | math(EXPR installedBits "8 * 8") 19 | set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") 20 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 21 | endif() 22 | -------------------------------------------------------------------------------- /examples/audio/audio_mixed_processor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/audio/audio_mixed_processor.png -------------------------------------------------------------------------------- /examples/audio/audio_module_playing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/audio/audio_module_playing.png -------------------------------------------------------------------------------- /examples/audio/audio_music_stream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/audio/audio_music_stream.png -------------------------------------------------------------------------------- /examples/audio/audio_raw_stream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/audio/audio_raw_stream.png -------------------------------------------------------------------------------- /examples/audio/audio_sound_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/audio/audio_sound_loading.png -------------------------------------------------------------------------------- /examples/audio/audio_sound_multi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/audio/audio_sound_multi.png -------------------------------------------------------------------------------- /examples/audio/audio_sound_positioning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/audio/audio_sound_positioning.png -------------------------------------------------------------------------------- /examples/audio/audio_stream_effects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/audio/audio_stream_effects.png -------------------------------------------------------------------------------- /examples/audio/resources/coin.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/audio/resources/coin.wav -------------------------------------------------------------------------------- /examples/audio/resources/country.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/audio/resources/country.mp3 -------------------------------------------------------------------------------- /examples/audio/resources/mini1111.xm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/audio/resources/mini1111.xm -------------------------------------------------------------------------------- /examples/audio/resources/sound.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/audio/resources/sound.wav -------------------------------------------------------------------------------- /examples/audio/resources/spring.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/audio/resources/spring.wav -------------------------------------------------------------------------------- /examples/audio/resources/target.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/audio/resources/target.flac -------------------------------------------------------------------------------- /examples/audio/resources/target.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/audio/resources/target.ogg -------------------------------------------------------------------------------- /examples/audio/resources/target.qoa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/audio/resources/target.qoa -------------------------------------------------------------------------------- /examples/audio/resources/weird.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/audio/resources/weird.wav -------------------------------------------------------------------------------- /examples/core/core_2d_camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_2d_camera.png -------------------------------------------------------------------------------- /examples/core/core_2d_camera_mouse_zoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_2d_camera_mouse_zoom.png -------------------------------------------------------------------------------- /examples/core/core_2d_camera_platformer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_2d_camera_platformer.png -------------------------------------------------------------------------------- /examples/core/core_2d_camera_split_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_2d_camera_split_screen.png -------------------------------------------------------------------------------- /examples/core/core_3d_camera_first_person.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_3d_camera_first_person.png -------------------------------------------------------------------------------- /examples/core/core_3d_camera_free.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_3d_camera_free.png -------------------------------------------------------------------------------- /examples/core/core_3d_camera_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_3d_camera_mode.png -------------------------------------------------------------------------------- /examples/core/core_3d_camera_split_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_3d_camera_split_screen.png -------------------------------------------------------------------------------- /examples/core/core_3d_picking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_3d_picking.png -------------------------------------------------------------------------------- /examples/core/core_automation_events.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_automation_events.png -------------------------------------------------------------------------------- /examples/core/core_basic_screen_manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_basic_screen_manager.png -------------------------------------------------------------------------------- /examples/core/core_basic_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_basic_window.png -------------------------------------------------------------------------------- /examples/core/core_custom_frame_control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_custom_frame_control.png -------------------------------------------------------------------------------- /examples/core/core_custom_logging.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_custom_logging.png -------------------------------------------------------------------------------- /examples/core/core_drop_files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_drop_files.png -------------------------------------------------------------------------------- /examples/core/core_high_dpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_high_dpi.png -------------------------------------------------------------------------------- /examples/core/core_input_gamepad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_input_gamepad.png -------------------------------------------------------------------------------- /examples/core/core_input_gestures.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_input_gestures.png -------------------------------------------------------------------------------- /examples/core/core_input_gestures_web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_input_gestures_web.png -------------------------------------------------------------------------------- /examples/core/core_input_keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_input_keys.png -------------------------------------------------------------------------------- /examples/core/core_input_mouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_input_mouse.png -------------------------------------------------------------------------------- /examples/core/core_input_mouse_wheel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_input_mouse_wheel.png -------------------------------------------------------------------------------- /examples/core/core_input_multitouch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_input_multitouch.png -------------------------------------------------------------------------------- /examples/core/core_input_virtual_controls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_input_virtual_controls.png -------------------------------------------------------------------------------- /examples/core/core_loading_thread.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_loading_thread.png -------------------------------------------------------------------------------- /examples/core/core_random_sequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_random_sequence.png -------------------------------------------------------------------------------- /examples/core/core_random_values.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_random_values.png -------------------------------------------------------------------------------- /examples/core/core_scissor_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_scissor_test.png -------------------------------------------------------------------------------- /examples/core/core_smooth_pixelperfect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_smooth_pixelperfect.png -------------------------------------------------------------------------------- /examples/core/core_storage_values.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_storage_values.png -------------------------------------------------------------------------------- /examples/core/core_vr_simulator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_vr_simulator.png -------------------------------------------------------------------------------- /examples/core/core_window_flags.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_window_flags.png -------------------------------------------------------------------------------- /examples/core/core_window_letterbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_window_letterbox.png -------------------------------------------------------------------------------- /examples/core/core_window_should_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_window_should_close.png -------------------------------------------------------------------------------- /examples/core/core_world_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/core_world_screen.png -------------------------------------------------------------------------------- /examples/core/resources/LICENSE.md: -------------------------------------------------------------------------------- 1 | | resource | author | licence | notes | 2 | | :------------ | :---------: | :------ | :---- | 3 | | ps3.png | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - | 4 | | xbox.png | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - | 5 | -------------------------------------------------------------------------------- /examples/core/resources/ps3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/resources/ps3.png -------------------------------------------------------------------------------- /examples/core/resources/xbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/core/resources/xbox.png -------------------------------------------------------------------------------- /examples/examples.rc: -------------------------------------------------------------------------------- 1 | GLFW_ICON ICON "raylib.ico" 2 | 3 | 1 VERSIONINFO 4 | FILEVERSION 5,5,0,0 5 | PRODUCTVERSION 5,5,0,0 6 | BEGIN 7 | BLOCK "StringFileInfo" 8 | BEGIN 9 | //BLOCK "080904E4" // English UK 10 | BLOCK "040904E4" // English US 11 | BEGIN 12 | VALUE "CompanyName", "raylib technologies" 13 | VALUE "FileDescription", "raylib application (www.raylib.com)" 14 | VALUE "FileVersion", "5.5.0" 15 | VALUE "InternalName", "raylib-example" 16 | VALUE "LegalCopyright", "(c) 2025 Ramon Santamaria (@raysan5)" 17 | VALUE "OriginalFilename", "raylib-example" 18 | VALUE "ProductName", "raylib-example" 19 | VALUE "ProductVersion", "5.5.0" 20 | END 21 | END 22 | BLOCK "VarFileInfo" 23 | BEGIN 24 | //VALUE "Translation", 0x809, 1252 // English UK 25 | VALUE "Translation", 0x409, 1252 // English US 26 | END 27 | END 28 | -------------------------------------------------------------------------------- /examples/models/models_animation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_animation.png -------------------------------------------------------------------------------- /examples/models/models_billboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_billboard.png -------------------------------------------------------------------------------- /examples/models/models_bone_socket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_bone_socket.png -------------------------------------------------------------------------------- /examples/models/models_box_collisions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_box_collisions.png -------------------------------------------------------------------------------- /examples/models/models_cubicmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_cubicmap.png -------------------------------------------------------------------------------- /examples/models/models_draw_cube_texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_draw_cube_texture.png -------------------------------------------------------------------------------- /examples/models/models_first_person_maze.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_first_person_maze.png -------------------------------------------------------------------------------- /examples/models/models_geometric_shapes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_geometric_shapes.png -------------------------------------------------------------------------------- /examples/models/models_gpu_skinning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_gpu_skinning.png -------------------------------------------------------------------------------- /examples/models/models_heightmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_heightmap.png -------------------------------------------------------------------------------- /examples/models/models_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_loading.png -------------------------------------------------------------------------------- /examples/models/models_loading_gltf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_loading_gltf.png -------------------------------------------------------------------------------- /examples/models/models_loading_m3d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_loading_m3d.png -------------------------------------------------------------------------------- /examples/models/models_loading_vox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_loading_vox.png -------------------------------------------------------------------------------- /examples/models/models_mesh_generation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_mesh_generation.png -------------------------------------------------------------------------------- /examples/models/models_mesh_picking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_mesh_picking.png -------------------------------------------------------------------------------- /examples/models/models_orthographic_projection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_orthographic_projection.png -------------------------------------------------------------------------------- /examples/models/models_point_rendering.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_point_rendering.png -------------------------------------------------------------------------------- /examples/models/models_rlgl_solar_system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_rlgl_solar_system.png -------------------------------------------------------------------------------- /examples/models/models_skybox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_skybox.png -------------------------------------------------------------------------------- /examples/models/models_tesseract_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_tesseract_view.png -------------------------------------------------------------------------------- /examples/models/models_waving_cubes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_waving_cubes.png -------------------------------------------------------------------------------- /examples/models/models_yaw_pitch_roll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/models_yaw_pitch_roll.png -------------------------------------------------------------------------------- /examples/models/resources/billboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/billboard.png -------------------------------------------------------------------------------- /examples/models/resources/cubicmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/cubicmap.png -------------------------------------------------------------------------------- /examples/models/resources/cubicmap_atlas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/cubicmap_atlas.png -------------------------------------------------------------------------------- /examples/models/resources/dresden_square_1k.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/dresden_square_1k.hdr -------------------------------------------------------------------------------- /examples/models/resources/dresden_square_2k.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/dresden_square_2k.hdr -------------------------------------------------------------------------------- /examples/models/resources/heightmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/heightmap.png -------------------------------------------------------------------------------- /examples/models/resources/models/gltf/LICENSE: -------------------------------------------------------------------------------- 1 | robot.glb model by @Quaternius (https://www.patreon.com/quaternius) 2 | Licensed under CC0 1.0 Universal (CC0 1.0) - Public Domain Dedication (https://creativecommons.org/publicdomain/zero/1.0/) 3 | 4 | greenman.glb, greenman_hat.glb, greenman_sword.glb, greenman_shield.glb models by @iP (https://github.com/ipzaur) 5 | Licensed under CC0 1.0 Universal (CC0 1.0) - Public Domain Dedication (https://creativecommons.org/publicdomain/zero/1.0/) -------------------------------------------------------------------------------- /examples/models/resources/models/gltf/greenman.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/gltf/greenman.glb -------------------------------------------------------------------------------- /examples/models/resources/models/gltf/greenman_hat.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/gltf/greenman_hat.glb -------------------------------------------------------------------------------- /examples/models/resources/models/gltf/greenman_shield.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/gltf/greenman_shield.glb -------------------------------------------------------------------------------- /examples/models/resources/models/gltf/greenman_sword.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/gltf/greenman_sword.glb -------------------------------------------------------------------------------- /examples/models/resources/models/gltf/raylib_logo_3d.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/gltf/raylib_logo_3d.glb -------------------------------------------------------------------------------- /examples/models/resources/models/gltf/robot.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/gltf/robot.blend -------------------------------------------------------------------------------- /examples/models/resources/models/gltf/robot.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/gltf/robot.glb -------------------------------------------------------------------------------- /examples/models/resources/models/iqm/guy.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/iqm/guy.blend -------------------------------------------------------------------------------- /examples/models/resources/models/iqm/guy.iqm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/iqm/guy.iqm -------------------------------------------------------------------------------- /examples/models/resources/models/iqm/guyanim.iqm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/iqm/guyanim.iqm -------------------------------------------------------------------------------- /examples/models/resources/models/iqm/guytex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/iqm/guytex.png -------------------------------------------------------------------------------- /examples/models/resources/models/m3d/cesium_man.m3d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/m3d/cesium_man.m3d -------------------------------------------------------------------------------- /examples/models/resources/models/m3d/seagull.m3d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/m3d/seagull.m3d -------------------------------------------------------------------------------- /examples/models/resources/models/m3d/suzanne.m3d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/m3d/suzanne.m3d -------------------------------------------------------------------------------- /examples/models/resources/models/obj/bridge_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/obj/bridge_diffuse.png -------------------------------------------------------------------------------- /examples/models/resources/models/obj/castle_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/obj/castle_diffuse.png -------------------------------------------------------------------------------- /examples/models/resources/models/obj/cube_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/obj/cube_diffuse.png -------------------------------------------------------------------------------- /examples/models/resources/models/obj/house_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/obj/house_diffuse.png -------------------------------------------------------------------------------- /examples/models/resources/models/obj/market_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/obj/market_diffuse.png -------------------------------------------------------------------------------- /examples/models/resources/models/obj/plane_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/obj/plane_diffuse.png -------------------------------------------------------------------------------- /examples/models/resources/models/obj/turret_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/obj/turret_diffuse.png -------------------------------------------------------------------------------- /examples/models/resources/models/obj/well_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/obj/well_diffuse.png -------------------------------------------------------------------------------- /examples/models/resources/models/vox/LICENSE: -------------------------------------------------------------------------------- 1 | The following models are provided by the official github repo of voxel-model format by MagikaVoxel developer @ephtracy 2 | 3 | GitHub official repo: https://github.com/ephtracy/voxel-model 4 | 5 | - chr_knight.vox - https://github.com/ephtracy/voxel-model/blob/master/vox/character/chr_knight.vox 6 | - chr_sword.vox - https://github.com/ephtracy/voxel-model/blob/master/vox/character/chr_sword.vox 7 | - monu9.vox - https://github.com/ephtracy/voxel-model/blob/master/vox/monument/monu9.vox 8 | 9 | Worth mentioning there is no license specified for the models yet: https://github.com/ephtracy/voxel-model/issues/22 10 | -------------------------------------------------------------------------------- /examples/models/resources/models/vox/chr_knight.vox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/vox/chr_knight.vox -------------------------------------------------------------------------------- /examples/models/resources/models/vox/chr_sword.vox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/vox/chr_sword.vox -------------------------------------------------------------------------------- /examples/models/resources/models/vox/fez.vox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/vox/fez.vox -------------------------------------------------------------------------------- /examples/models/resources/models/vox/monu9.vox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/models/vox/monu9.vox -------------------------------------------------------------------------------- /examples/models/resources/shaders/glsl100/cubemap.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec3 fragPosition; 7 | 8 | // Input uniform values 9 | uniform sampler2D equirectangularMap; 10 | 11 | vec2 SampleSphericalMap(vec3 v) 12 | { 13 | vec2 uv = vec2(atan(v.z, v.x), asin(v.y)); 14 | uv *= vec2(0.1591, 0.3183); 15 | uv += 0.5; 16 | return uv; 17 | } 18 | 19 | void main() 20 | { 21 | // Normalize local position 22 | vec2 uv = SampleSphericalMap(normalize(fragPosition)); 23 | 24 | // Fetch color from texture map 25 | vec3 color = texture2D(equirectangularMap, uv).rgb; 26 | 27 | // Calculate final fragment color 28 | gl_FragColor = vec4(color, 1.0); 29 | } 30 | -------------------------------------------------------------------------------- /examples/models/resources/shaders/glsl100/cubemap.vs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | // Input vertex attributes 4 | attribute vec3 vertexPosition; 5 | 6 | // Input uniform values 7 | uniform mat4 matProjection; 8 | uniform mat4 matView; 9 | 10 | // Output vertex attributes (to fragment shader) 11 | varying vec3 fragPosition; 12 | 13 | void main() 14 | { 15 | // Calculate fragment position based on model transformations 16 | fragPosition = vertexPosition; 17 | 18 | // Calculate final vertex position 19 | gl_Position = matProjection*matView*vec4(vertexPosition, 1.0); 20 | } 21 | -------------------------------------------------------------------------------- /examples/models/resources/shaders/glsl100/skinning.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform vec4 colDiffuse; 12 | 13 | void main() 14 | { 15 | // Fetch color from texture sampler 16 | vec4 texelColor = texture2D(texture0, fragTexCoord); 17 | 18 | // Calculate final fragment color 19 | gl_FragColor = texelColor*colDiffuse*fragColor; 20 | } 21 | -------------------------------------------------------------------------------- /examples/models/resources/shaders/glsl100/skybox.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec3 fragPosition; 7 | 8 | // Input uniform values 9 | uniform samplerCube environmentMap; 10 | uniform bool vflipped; 11 | uniform bool doGamma; 12 | 13 | void main() 14 | { 15 | // Fetch color from texture map 16 | vec4 texelColor = vec4(0.0); 17 | 18 | if (vflipped) texelColor = textureCube(environmentMap, vec3(fragPosition.x, -fragPosition.y, fragPosition.z)); 19 | else texelColor = textureCube(environmentMap, fragPosition); 20 | 21 | vec3 color = vec3(texelColor.x, texelColor.y, texelColor.z); 22 | 23 | if (doGamma) // Apply gamma correction 24 | { 25 | color = color/(color + vec3(1.0)); 26 | color = pow(color, vec3(1.0/2.2)); 27 | } 28 | 29 | // Calculate final fragment color 30 | gl_FragColor = vec4(color, 1.0); 31 | } 32 | -------------------------------------------------------------------------------- /examples/models/resources/shaders/glsl100/skybox.vs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | // Input vertex attributes 4 | attribute vec3 vertexPosition; 5 | 6 | // Input uniform values 7 | uniform mat4 matProjection; 8 | uniform mat4 matView; 9 | 10 | // Output vertex attributes (to fragment shader) 11 | varying vec3 fragPosition; 12 | 13 | void main() 14 | { 15 | // Calculate fragment position based on model transformations 16 | fragPosition = vertexPosition; 17 | 18 | // Remove translation from the view matrix 19 | mat4 rotView = mat4(mat3(matView)); 20 | vec4 clipPos = matProjection*rotView*vec4(vertexPosition, 1.0); 21 | 22 | // Calculate final vertex position 23 | gl_Position = clipPos; 24 | } 25 | -------------------------------------------------------------------------------- /examples/models/resources/shaders/glsl330/cubemap.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec3 fragPosition; 5 | 6 | // Input uniform values 7 | uniform sampler2D equirectangularMap; 8 | 9 | // Output fragment color 10 | out vec4 finalColor; 11 | 12 | vec2 SampleSphericalMap(vec3 v) 13 | { 14 | vec2 uv = vec2(atan(v.z, v.x), asin(v.y)); 15 | uv *= vec2(0.1591, 0.3183); 16 | uv += 0.5; 17 | return uv; 18 | } 19 | 20 | void main() 21 | { 22 | // Normalize local position 23 | vec2 uv = SampleSphericalMap(normalize(fragPosition)); 24 | 25 | // Fetch color from texture map 26 | vec3 color = texture(equirectangularMap, uv).rgb; 27 | 28 | // Calculate final fragment color 29 | finalColor = vec4(color, 1.0); 30 | } 31 | -------------------------------------------------------------------------------- /examples/models/resources/shaders/glsl330/cubemap.vs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes 4 | in vec3 vertexPosition; 5 | 6 | // Input uniform values 7 | uniform mat4 matProjection; 8 | uniform mat4 matView; 9 | 10 | // Output vertex attributes (to fragment shader) 11 | out vec3 fragPosition; 12 | 13 | void main() 14 | { 15 | // Calculate fragment position based on model transformations 16 | fragPosition = vertexPosition; 17 | 18 | // Calculate final vertex position 19 | gl_Position = matProjection*matView*vec4(vertexPosition, 1.0); 20 | } 21 | -------------------------------------------------------------------------------- /examples/models/resources/shaders/glsl330/skinning.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | // Output fragment color 8 | out vec4 finalColor; 9 | 10 | uniform sampler2D texture0; 11 | uniform vec4 colDiffuse; 12 | 13 | void main() 14 | { 15 | vec4 texelColor = texture(texture0, fragTexCoord); 16 | finalColor = texelColor*colDiffuse*fragColor; 17 | } 18 | -------------------------------------------------------------------------------- /examples/models/resources/shaders/glsl330/skybox.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec3 fragPosition; 5 | 6 | // Input uniform values 7 | uniform samplerCube environmentMap; 8 | uniform bool vflipped; 9 | uniform bool doGamma; 10 | 11 | // Output fragment color 12 | out vec4 finalColor; 13 | 14 | void main() 15 | { 16 | // Fetch color from texture map 17 | vec3 color = vec3(0.0); 18 | 19 | if (vflipped) color = texture(environmentMap, vec3(fragPosition.x, -fragPosition.y, fragPosition.z)).rgb; 20 | else color = texture(environmentMap, fragPosition).rgb; 21 | 22 | if (doGamma)// Apply gamma correction 23 | { 24 | color = color/(color + vec3(1.0)); 25 | color = pow(color, vec3(1.0/2.2)); 26 | } 27 | 28 | // Calculate final fragment color 29 | finalColor = vec4(color, 1.0); 30 | } 31 | -------------------------------------------------------------------------------- /examples/models/resources/shaders/glsl330/skybox.vs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes 4 | in vec3 vertexPosition; 5 | 6 | // Input uniform values 7 | uniform mat4 matProjection; 8 | uniform mat4 matView; 9 | 10 | // Output vertex attributes (to fragment shader) 11 | out vec3 fragPosition; 12 | 13 | void main() 14 | { 15 | // Calculate fragment position based on model transformations 16 | fragPosition = vertexPosition; 17 | 18 | // Remove translation from the view matrix 19 | mat4 rotView = mat4(mat3(matView)); 20 | vec4 clipPos = matProjection*rotView*vec4(vertexPosition, 1.0); 21 | 22 | // Calculate final vertex position 23 | gl_Position = clipPos; 24 | } 25 | -------------------------------------------------------------------------------- /examples/models/resources/shaders/glsl330/voxel_lighting.vs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes 4 | in vec3 vertexPosition; 5 | //in vec2 vertexTexCoord; 6 | in vec3 vertexNormal; 7 | in vec4 vertexColor; 8 | 9 | // Input uniform values 10 | uniform mat4 mvp; 11 | uniform mat4 matModel; 12 | uniform mat4 matNormal; 13 | 14 | // Output vertex attributes (to fragment shader) 15 | out vec3 fragPosition; 16 | //out vec2 fragTexCoord; 17 | out vec4 fragColor; 18 | out vec3 fragNormal; 19 | 20 | // NOTE: Add your custom variables here 21 | 22 | void main() 23 | { 24 | // Send vertex attributes to fragment shader 25 | fragPosition = vec3(matModel*vec4(vertexPosition, 1.0)); 26 | //fragTexCoord = vertexTexCoord; 27 | fragColor = vertexColor; 28 | fragNormal = normalize(vec3(matNormal*vec4(vertexNormal, 1.0))); 29 | 30 | // Calculate final vertex position 31 | gl_Position = mvp*vec4(vertexPosition, 1.0); 32 | } 33 | -------------------------------------------------------------------------------- /examples/models/resources/skybox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/models/resources/skybox.png -------------------------------------------------------------------------------- /examples/others/easings_testbed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/others/easings_testbed.png -------------------------------------------------------------------------------- /examples/others/embedded_files_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/others/embedded_files_loading.png -------------------------------------------------------------------------------- /examples/others/external/lib/libglfw3.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/others/external/lib/libglfw3.a -------------------------------------------------------------------------------- /examples/others/raylib_opengl_interop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/others/raylib_opengl_interop.png -------------------------------------------------------------------------------- /examples/others/raymath_vector_angle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/others/raymath_vector_angle.png -------------------------------------------------------------------------------- /examples/others/resources/shaders/glsl100/point_particle.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input uniform values 6 | uniform vec4 color; 7 | 8 | // NOTE: Add your custom variables here 9 | 10 | void main() 11 | { 12 | // Each point is drawn as a screen space square of gl_PointSize size. gl_PointCoord contains where we are inside of 13 | // it. (0, 0) is the top left, (1, 1) the bottom right corner. 14 | // Draw each point as a colored circle with alpha 1.0 in the center and 0.0 at the outer edges. 15 | gl_FragColor = vec4(color.rgb, color.a * (1.0 - length(gl_PointCoord.xy - vec2(0.5))*2.0)); 16 | } -------------------------------------------------------------------------------- /examples/others/resources/shaders/glsl100/point_particle.vs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | // Input vertex attributes 4 | attribute vec3 vertexPosition; 5 | 6 | // Input uniform values 7 | uniform mat4 mvp; 8 | uniform float currentTime; 9 | 10 | // NOTE: Add your custom variables here 11 | 12 | void main() 13 | { 14 | // Unpack data from vertexPosition 15 | vec2 pos = vertexPosition.xy; 16 | float period = vertexPosition.z; 17 | 18 | // Calculate final vertex position (jiggle it around a bit horizontally) 19 | pos += vec2(100.0, 0.0) * sin(period * currentTime); 20 | gl_Position = mvp * vec4(pos.x, pos.y, 0.0, 1.0); 21 | 22 | // Calculate the screen space size of this particle (also vary it over time) 23 | gl_PointSize = 10.0 - 5.0 * abs(sin(period * currentTime)); 24 | } -------------------------------------------------------------------------------- /examples/others/resources/shaders/glsl330/point_particle.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input uniform values 4 | uniform vec4 color; 5 | 6 | // Output fragment color 7 | out vec4 finalColor; 8 | 9 | // NOTE: Add your custom variables here 10 | 11 | void main() 12 | { 13 | // Each point is drawn as a screen space square of gl_PointSize size. gl_PointCoord contains where we are inside of 14 | // it. (0, 0) is the top left, (1, 1) the bottom right corner. 15 | // Draw each point as a colored circle with alpha 1.0 in the center and 0.0 at the outer edges. 16 | finalColor = vec4(color.rgb, color.a * (1 - length(gl_PointCoord.xy - vec2(0.5))*2)); 17 | } -------------------------------------------------------------------------------- /examples/others/resources/shaders/glsl330/point_particle.vs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes 4 | in vec3 vertexPosition; 5 | 6 | // Input uniform values 7 | uniform mat4 mvp; 8 | uniform float currentTime; 9 | 10 | // NOTE: Add your custom variables here 11 | 12 | void main() 13 | { 14 | // Unpack data from vertexPosition 15 | vec2 pos = vertexPosition.xy; 16 | float period = vertexPosition.z; 17 | 18 | // Calculate final vertex position (jiggle it around a bit horizontally) 19 | pos += vec2(100, 0) * sin(period * currentTime); 20 | gl_Position = mvp * vec4(pos, 0.0, 1.0); 21 | 22 | // Calculate the screen space size of this particle (also vary it over time) 23 | gl_PointSize = 10 - 5 * abs(sin(period * currentTime)); 24 | } -------------------------------------------------------------------------------- /examples/others/resources/shaders/glsl430/gol_render.glsl: -------------------------------------------------------------------------------- 1 | #version 430 2 | 3 | // Game of Life rendering shader 4 | // Just renders the content of the ssbo at binding 1 to screen 5 | 6 | #define GOL_WIDTH 768 7 | 8 | // Input vertex attributes (from vertex shader) 9 | in vec2 fragTexCoord; 10 | 11 | // Output fragment color 12 | out vec4 finalColor; 13 | 14 | // Input game of life grid. 15 | layout(std430, binding = 1) readonly buffer golLayout 16 | { 17 | uint golBuffer[]; 18 | }; 19 | 20 | // Output resolution 21 | uniform vec2 resolution; 22 | 23 | void main() 24 | { 25 | ivec2 coords = ivec2(fragTexCoord*resolution); 26 | 27 | if ((golBuffer[coords.x + coords.y*uvec2(resolution).x]) == 1) finalColor = vec4(1.0); 28 | else finalColor = vec4(0.0, 0.0, 0.0, 1.0); 29 | } 30 | -------------------------------------------------------------------------------- /examples/others/rlgl_compute_shader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/others/rlgl_compute_shader.png -------------------------------------------------------------------------------- /examples/others/rlgl_standalone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/others/rlgl_standalone.png -------------------------------------------------------------------------------- /examples/raylib.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/raylib.ico -------------------------------------------------------------------------------- /examples/raylib_makefile_example.bat: -------------------------------------------------------------------------------- 1 | ::@echo off 2 | :: . 3 | :: Compile your examples using: raylib_makefile_example.bat core/core_basic_window 4 | :: . 5 | :: > Setup required Environment 6 | :: ------------------------------------- 7 | set RAYLIB_INCLUDE_DIR=C:\raylib\raylib\src 8 | set RAYLIB_LIB_DIR=C:\raylib\raylib\src 9 | set RAYLIB_RES_FILE=C:\raylib\raylib\src\raylib.rc.data 10 | set COMPILER_DIR=C:\raylib\w64devkit\bin 11 | set PATH=%PATH%;%COMPILER_DIR% 12 | set FILENAME=%1 13 | set FILENAME_FULL_PATH=%~f1 14 | cd %~dp0 15 | :: . 16 | :: > Cleaning latest build 17 | :: --------------------------- 18 | cmd /c if exist %FILENAME_FULL_PATH%.exe del /F %FILENAME_FULL_PATH%.exe 19 | :: . 20 | :: > Compiling program 21 | :: -------------------------- 22 | :: -B : Force make recompilation despite file not changed 23 | mingw32-make %FILENAME% -B PLATFORM=PLATFORM_DESKTOP 24 | :: . 25 | :: > Executing program 26 | :: ------------------------- 27 | cmd /c if exist %FILENAME_FULL_PATH%.exe %FILENAME_FULL_PATH%.exe 28 | -------------------------------------------------------------------------------- /examples/shaders/resources/cubicmap_atlas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/cubicmap_atlas.png -------------------------------------------------------------------------------- /examples/shaders/resources/fudesumi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/fudesumi.png -------------------------------------------------------------------------------- /examples/shaders/resources/mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/mask.png -------------------------------------------------------------------------------- /examples/shaders/resources/models/barracks_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/models/barracks_diffuse.png -------------------------------------------------------------------------------- /examples/shaders/resources/models/church_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/models/church_diffuse.png -------------------------------------------------------------------------------- /examples/shaders/resources/models/old_car_new.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/models/old_car_new.glb -------------------------------------------------------------------------------- /examples/shaders/resources/models/plane.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/models/plane.glb -------------------------------------------------------------------------------- /examples/shaders/resources/models/robot.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/models/robot.glb -------------------------------------------------------------------------------- /examples/shaders/resources/models/watermill_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/models/watermill_diffuse.png -------------------------------------------------------------------------------- /examples/shaders/resources/old_car_d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/old_car_d.png -------------------------------------------------------------------------------- /examples/shaders/resources/old_car_e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/old_car_e.png -------------------------------------------------------------------------------- /examples/shaders/resources/old_car_mra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/old_car_mra.png -------------------------------------------------------------------------------- /examples/shaders/resources/old_car_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/old_car_n.png -------------------------------------------------------------------------------- /examples/shaders/resources/plasma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/plasma.png -------------------------------------------------------------------------------- /examples/shaders/resources/raysan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/raysan.png -------------------------------------------------------------------------------- /examples/shaders/resources/road_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/road_a.png -------------------------------------------------------------------------------- /examples/shaders/resources/road_mra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/road_mra.png -------------------------------------------------------------------------------- /examples/shaders/resources/road_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/road_n.png -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/base.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform vec4 colDiffuse; 12 | 13 | // NOTE: Add your custom variables here 14 | 15 | void main() 16 | { 17 | // Texel color fetching from texture sampler 18 | vec4 texelColor = texture2D(texture0, fragTexCoord); 19 | 20 | // NOTE: Implement here your fragment shader code 21 | 22 | gl_FragColor = texelColor*colDiffuse; 23 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/base.vs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | // Input vertex attributes 4 | attribute vec3 vertexPosition; 5 | attribute vec2 vertexTexCoord; 6 | attribute vec3 vertexNormal; 7 | attribute vec4 vertexColor; 8 | 9 | // Input uniform values 10 | uniform mat4 mvp; 11 | 12 | // Output vertex attributes (to fragment shader) 13 | varying vec2 fragTexCoord; 14 | varying vec4 fragColor; 15 | 16 | // NOTE: Add your custom variables here 17 | 18 | void main() 19 | { 20 | // Send vertex attributes to fragment shader 21 | fragTexCoord = vertexTexCoord; 22 | fragColor = vertexColor; 23 | 24 | // Calculate final vertex position 25 | gl_Position = mvp*vec4(vertexPosition, 1.0); 26 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/bloom.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform vec4 colDiffuse; 12 | 13 | // NOTE: Add your custom variables here 14 | 15 | const vec2 size = vec2(800, 450); // render size 16 | const float samples = 5.0; // pixels per axis; higher = bigger glow, worse performance 17 | const float quality = 2.5; // lower = smaller glow, better quality 18 | 19 | void main() 20 | { 21 | vec4 sum = vec4(0); 22 | vec2 sizeFactor = vec2(1)/size*quality; 23 | 24 | // Texel color fetching from texture sampler 25 | vec4 source = texture2D(texture0, fragTexCoord); 26 | 27 | const int range = 2; // should be = (samples - 1)/2; 28 | 29 | for (int x = -range; x <= range; x++) 30 | { 31 | for (int y = -range; y <= range; y++) 32 | { 33 | sum += texture2D(texture0, fragTexCoord + vec2(x, y)*sizeFactor); 34 | } 35 | } 36 | 37 | // Calculate final fragment color 38 | gl_FragColor = ((sum/(samples*samples)) + source)*colDiffuse; 39 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/blur.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform vec4 colDiffuse; 12 | 13 | // NOTE: Add your custom variables here 14 | 15 | // NOTE: Render size values must be passed from code 16 | const float renderWidth = 800.0; 17 | const float renderHeight = 450.0; 18 | 19 | vec3 offset = vec3(0.0, 1.3846153846, 3.2307692308); 20 | vec3 weight = vec3(0.2270270270, 0.3162162162, 0.0702702703); 21 | 22 | void main() 23 | { 24 | // Texel color fetching from texture sampler 25 | vec3 tc = texture2D(texture0, fragTexCoord).rgb*weight.x; 26 | 27 | tc += texture2D(texture0, fragTexCoord + vec2(offset.y)/renderWidth, 0.0).rgb*weight.y; 28 | tc += texture2D(texture0, fragTexCoord - vec2(offset.y)/renderWidth, 0.0).rgb*weight.y; 29 | 30 | tc += texture2D(texture0, fragTexCoord + vec2(offset.z)/renderWidth, 0.0).rgb*weight.z; 31 | tc += texture2D(texture0, fragTexCoord - vec2(offset.z)/renderWidth, 0.0).rgb*weight.z; 32 | 33 | gl_FragColor = vec4(tc, 1.0); 34 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/color_mix.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform sampler2D texture1; 12 | uniform vec4 colDiffuse; 13 | 14 | uniform float divider; 15 | 16 | void main() 17 | { 18 | // Texel color fetching from texture sampler 19 | vec4 texelColor0 = texture2D(texture0, fragTexCoord); 20 | vec4 texelColor1 = texture2D(texture1, fragTexCoord); 21 | 22 | float x = fract(fragTexCoord.s); 23 | float final = smoothstep(divider - 0.1, divider + 0.1, x); 24 | 25 | gl_FragColor = mix(texelColor0, texelColor1, final); 26 | } 27 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/deferred_shading.vs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | // Input vertex attributes 4 | attribute vec3 vertexPosition; 5 | attribute vec2 vertexTexCoord; 6 | 7 | // Output vertex attributes (to fragment shader) 8 | varying vec2 fragTexCoord; 9 | 10 | void main() 11 | { 12 | fragTexCoord = vertexTexCoord; 13 | 14 | // Calculate final vertex position 15 | gl_Position = vec4(vertexPosition, 1.0); 16 | } 17 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/depth.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | // Input vertex attributes (from vertex shader) 4 | varying vec2 fragTexCoord; 5 | 6 | // Input uniform values 7 | uniform sampler2D depthTexture; 8 | uniform bool flipY; 9 | 10 | float nearPlane = 0.1; 11 | float farPlane = 100.0; 12 | 13 | void main() 14 | { 15 | // Handle potential Y-flipping 16 | vec2 texCoord = fragTexCoord; 17 | if (flipY) 18 | texCoord.y = 1.0 - texCoord.y; 19 | 20 | // Sample depth texture 21 | float depth = texture2D(depthTexture, texCoord).r; 22 | 23 | // Linearize depth 24 | float linearDepth = (2.0*nearPlane)/(farPlane + nearPlane - depth*(farPlane - nearPlane)); 25 | 26 | // Output final color 27 | gl_FragColor = vec4(vec3(linearDepth), 1.0); 28 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/dream_vision.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform vec4 colDiffuse; 12 | 13 | // NOTE: Add your custom variables here 14 | 15 | void main() 16 | { 17 | vec4 color = texture2D(texture0, fragTexCoord); 18 | 19 | color += texture2D(texture0, fragTexCoord + 0.001); 20 | color += texture2D(texture0, fragTexCoord + 0.003); 21 | color += texture2D(texture0, fragTexCoord + 0.005); 22 | color += texture2D(texture0, fragTexCoord + 0.007); 23 | color += texture2D(texture0, fragTexCoord + 0.009); 24 | color += texture2D(texture0, fragTexCoord + 0.011); 25 | 26 | color += texture2D(texture0, fragTexCoord - 0.001); 27 | color += texture2D(texture0, fragTexCoord - 0.003); 28 | color += texture2D(texture0, fragTexCoord - 0.005); 29 | color += texture2D(texture0, fragTexCoord - 0.007); 30 | color += texture2D(texture0, fragTexCoord - 0.009); 31 | color += texture2D(texture0, fragTexCoord - 0.011); 32 | 33 | color.rgb = vec3((color.r + color.g + color.b)/3.0); 34 | color = color/9.5; 35 | 36 | gl_FragColor = color; 37 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/fisheye.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform vec4 colDiffuse; 12 | 13 | // NOTE: Add your custom variables here 14 | 15 | const float PI = 3.1415926535; 16 | 17 | void main() 18 | { 19 | float aperture = 178.0; 20 | float apertureHalf = 0.5 * aperture * (PI / 180.0); 21 | float maxFactor = sin(apertureHalf); 22 | 23 | vec2 uv = vec2(0.0); 24 | vec2 xy = 2.0 * fragTexCoord.xy - 1.0; 25 | float d = length(xy); 26 | 27 | if (d < (2.0 - maxFactor)) 28 | { 29 | d = length(xy * maxFactor); 30 | float z = sqrt(1.0 - d * d); 31 | float r = atan(d, z) / PI; 32 | float phi = atan(xy.y, xy.x); 33 | 34 | uv.x = r * cos(phi) + 0.5; 35 | uv.y = r * sin(phi) + 0.5; 36 | } 37 | else 38 | { 39 | uv = fragTexCoord.xy; 40 | } 41 | 42 | gl_FragColor = texture2D(texture0, uv); 43 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/gbuffer.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec3 fragPosition; 7 | varying vec2 fragTexCoord; 8 | varying vec3 fragNormal; 9 | varying vec4 fragColor; 10 | 11 | // TODO: Is there some alternative for GLSL100 12 | //layout (location = 0) out vec3 gPosition; 13 | //layout (location = 1) out vec3 gNormal; 14 | //layout (location = 2) out vec4 gAlbedoSpec; 15 | //uniform vec3 gPosition; 16 | //uniform vec3 gNormal; 17 | //uniform vec4 gAlbedoSpec; 18 | 19 | // Input uniform values 20 | uniform sampler2D texture0; // Diffuse texture 21 | uniform sampler2D specularTexture; 22 | 23 | void main() 24 | { 25 | // Store the fragment position vector in the first gbuffer texture 26 | //gPosition = fragPosition; 27 | 28 | // Store the per-fragment normals into the gbuffer 29 | //gNormal = normalize(fragNormal); 30 | 31 | // Store the diffuse per-fragment color 32 | gl_FragColor.rgb = texture2D(texture0, fragTexCoord).rgb; 33 | 34 | // Store specular intensity in gAlbedoSpec's alpha component 35 | gl_FragColor.a = texture2D(specularTexture, fragTexCoord).r; 36 | } 37 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/grayscale.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform vec4 colDiffuse; 12 | 13 | // NOTE: Add your custom variables here 14 | 15 | void main() 16 | { 17 | // Texel color fetching from texture sampler 18 | vec4 texelColor = texture2D(texture0, fragTexCoord)*colDiffuse*fragColor; 19 | 20 | // Convert texel color to grayscale using NTSC conversion weights 21 | float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114)); 22 | 23 | // Calculate final fragment color 24 | gl_FragColor = vec4(gray, gray, gray, texelColor.a); 25 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/hybrid_raster.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | #extension GL_EXT_frag_depth : enable // Extension required for writing depth 3 | precision mediump float; // Precision required for OpenGL ES2 (WebGL) 4 | 5 | varying vec2 fragTexCoord; 6 | varying vec4 fragColor; 7 | 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | void main() 12 | { 13 | vec4 texelColor = texture2D(texture0, fragTexCoord); 14 | gl_FragColor = texelColor*colDiffuse*fragColor; 15 | gl_FragDepthEXT = gl_FragCoord.z; 16 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/lighting_instancing.vs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | // Input vertex attributes 4 | attribute vec3 vertexPosition; 5 | attribute vec2 vertexTexCoord; 6 | attribute vec3 vertexNormal; 7 | attribute vec4 vertexColor; 8 | 9 | attribute mat4 instanceTransform; 10 | 11 | // Input uniform values 12 | uniform mat4 mvp; 13 | uniform mat4 matNormal; 14 | 15 | // Output vertex attributes (to fragment shader) 16 | varying vec3 fragPosition; 17 | varying vec2 fragTexCoord; 18 | varying vec4 fragColor; 19 | varying vec3 fragNormal; 20 | 21 | // NOTE: Add your custom variables here 22 | 23 | void main() 24 | { 25 | // Compute MVP for current instance 26 | mat4 mvpi = mvp*instanceTransform; 27 | 28 | // Send vertex attributes to fragment shader 29 | fragPosition = vec3(mvpi*vec4(vertexPosition, 1.0)); 30 | fragTexCoord = vertexTexCoord; 31 | fragColor = vertexColor; 32 | fragNormal = normalize(vec3(matNormal*vec4(vertexNormal, 1.0))); 33 | 34 | // Calculate final vertex position 35 | gl_Position = mvpi*vec4(vertexPosition, 1.0); 36 | } 37 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/lightmap.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec2 fragTexCoord2; 8 | varying vec3 fragPosition; 9 | varying vec4 fragColor; 10 | 11 | // Input uniform values 12 | uniform sampler2D texture0; 13 | uniform sampler2D texture1; 14 | 15 | void main() 16 | { 17 | // Texel color fetching from texture sampler 18 | vec4 texelColor = texture2D(texture0, fragTexCoord); 19 | vec4 texelColor2 = texture2D(texture1, fragTexCoord2); 20 | 21 | gl_FragColor = texelColor * texelColor2; 22 | } 23 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/lightmap.vs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | // Input vertex attributes 4 | attribute vec3 vertexPosition; 5 | attribute vec2 vertexTexCoord; 6 | attribute vec2 vertexTexCoord2; 7 | attribute vec4 vertexColor; 8 | 9 | // Input uniform values 10 | uniform mat4 mvp; 11 | uniform mat4 matModel; 12 | 13 | // Output vertex attributes (to fragment shader) 14 | varying vec3 fragPosition; 15 | varying vec2 fragTexCoord; 16 | varying vec2 fragTexCoord2; 17 | varying vec4 fragColor; 18 | 19 | // NOTE: Add your custom variables here 20 | 21 | void main() 22 | { 23 | // Send vertex attributes to fragment shader 24 | fragPosition = vec3(matModel*vec4(vertexPosition, 1.0)); 25 | fragTexCoord = vertexTexCoord; 26 | fragTexCoord2 = vertexTexCoord2; 27 | fragColor = vertexColor; 28 | 29 | // Calculate final vertex position 30 | gl_Position = mvp*vec4(vertexPosition, 1.0); 31 | } 32 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/mask.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform sampler2D mask; 12 | uniform vec4 colDiffuse; 13 | uniform int frame; 14 | 15 | // NOTE: Add your custom variables here 16 | 17 | void main() 18 | { 19 | vec4 maskColour = texture2D(mask, fragTexCoord + vec2(sin(-float(frame)/150.0)/10.0, cos(-float(frame)/170.0)/10.0)); 20 | if (maskColour.r < 0.25) discard; 21 | vec4 texelColor = texture2D(texture0, fragTexCoord + vec2(sin(float(frame)/90.0)/8.0, cos(float(frame)/60.0)/8.0)); 22 | 23 | gl_FragColor = texelColor*maskColour; 24 | } 25 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/pixelizer.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform vec4 colDiffuse; 12 | 13 | // NOTE: Add your custom variables here 14 | 15 | // NOTE: Render size values must be passed from code 16 | const float renderWidth = 800.0; 17 | const float renderHeight = 450.0; 18 | 19 | float pixelWidth = 5.0; 20 | float pixelHeight = 5.0; 21 | 22 | void main() 23 | { 24 | float dx = pixelWidth*(1.0/renderWidth); 25 | float dy = pixelHeight*(1.0/renderHeight); 26 | 27 | vec2 coord = vec2(dx*floor(fragTexCoord.x/dx), dy*floor(fragTexCoord.y/dy)); 28 | 29 | vec3 tc = texture2D(texture0, coord).rgb; 30 | 31 | gl_FragColor = vec4(tc, 1.0); 32 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/posterization.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform vec4 colDiffuse; 12 | 13 | // NOTE: Add your custom variables here 14 | 15 | float gamma = 0.6; 16 | float numColors = 8.0; 17 | 18 | void main() 19 | { 20 | vec3 color = texture2D(texture0, fragTexCoord.xy).rgb; 21 | 22 | color = pow(color, vec3(gamma, gamma, gamma)); 23 | color = color*numColors; 24 | color = floor(color); 25 | color = color/numColors; 26 | color = pow(color, vec3(1.0/gamma)); 27 | 28 | gl_FragColor = vec4(color, 1.0); 29 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/predator.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform vec4 colDiffuse; 12 | 13 | // NOTE: Add your custom variables here 14 | 15 | void main() 16 | { 17 | vec3 color = texture2D(texture0, fragTexCoord).rgb; 18 | vec3 colors[3]; 19 | colors[0] = vec3(0.0, 0.0, 1.0); 20 | colors[1] = vec3(1.0, 1.0, 0.0); 21 | colors[2] = vec3(1.0, 0.0, 0.0); 22 | 23 | float lum = (color.r + color.g + color.b)/3.0; 24 | 25 | vec3 tc = vec3(0.0, 0.0, 0.0); 26 | 27 | if (lum < 0.5) tc = mix(colors[0], colors[1], lum/0.5); 28 | else tc = mix(colors[1], colors[2], (lum - 0.5)/0.5); 29 | 30 | gl_FragColor = vec4(tc, 1.0); 31 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/scanlines.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform vec4 colDiffuse; 12 | 13 | // NOTE: Add your custom variables here 14 | 15 | float offset = 0.0; 16 | float frequency = 450.0/3.0; 17 | 18 | uniform float time; 19 | 20 | void main() 21 | { 22 | /* 23 | // Scanlines method 1 24 | float tval = 0; //time 25 | vec2 uv = 0.5 + (fragTexCoord - 0.5)*(0.9 + 0.01*sin(0.5*tval)); 26 | 27 | vec4 color = texture2D(texture0, fragTexCoord); 28 | 29 | color = clamp(color*0.5 + 0.5*color*color*1.2, 0.0, 1.0); 30 | color *= 0.5 + 0.5*16.0*uv.x*uv.y*(1.0 - uv.x)*(1.0 - uv.y); 31 | color *= vec4(0.8, 1.0, 0.7, 1); 32 | color *= 0.9 + 0.1*sin(10.0*tval + uv.y*1000.0); 33 | color *= 0.97 + 0.03*sin(110.0*tval); 34 | 35 | fragColor = color; 36 | */ 37 | // Scanlines method 2 38 | float globalPos = (fragTexCoord.y + offset) * frequency; 39 | float wavePos = cos((fract(globalPos) - 0.5)*3.14); 40 | 41 | vec4 color = texture2D(texture0, fragTexCoord); 42 | 43 | gl_FragColor = mix(vec4(0.0, 0.3, 0.0, 0.0), color, wavePos); 44 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/swirl.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform vec4 colDiffuse; 12 | 13 | // NOTE: Add your custom variables here 14 | 15 | // NOTE: Render size values should be passed from code 16 | const float renderWidth = 800.0; 17 | const float renderHeight = 450.0; 18 | 19 | float radius = 250.0; 20 | float angle = 0.8; 21 | 22 | uniform vec2 center; 23 | 24 | void main() 25 | { 26 | vec2 texSize = vec2(renderWidth, renderHeight); 27 | vec2 tc = fragTexCoord*texSize; 28 | tc -= center; 29 | 30 | float dist = length(tc); 31 | 32 | if (dist < radius) 33 | { 34 | float percent = (radius - dist)/radius; 35 | float theta = percent*percent*angle*8.0; 36 | float s = sin(theta); 37 | float c = cos(theta); 38 | 39 | tc = vec2(dot(tc, vec2(c, -s)), dot(tc, vec2(s, c))); 40 | } 41 | 42 | tc += center; 43 | vec4 color = texture2D(texture0, tc/texSize)*colDiffuse*fragColor;; 44 | 45 | gl_FragColor = vec4(color.rgb, 1.0); 46 | } 47 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/tiling.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform vec4 colDiffuse; 12 | 13 | // NOTE: Add your custom variables here 14 | uniform vec2 tiling; 15 | 16 | void main() 17 | { 18 | vec2 texCoord = fragTexCoord*tiling; 19 | 20 | gl_FragColor = texture2D(texture0, texCoord)*colDiffuse; 21 | } 22 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/vertex_displacement.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from fragment shader) 6 | varying vec2 fragTexCoord; 7 | varying float height; 8 | 9 | 10 | void main() 11 | { 12 | vec4 darkblue = vec4(0.0, 0.13, 0.18, 1.0); 13 | vec4 lightblue = vec4(1.0, 1.0, 1.0, 1.0); 14 | // Interpolate between two colors based on height 15 | vec4 finalColor = mix(darkblue, lightblue, height); 16 | 17 | gl_FragColor = finalColor; 18 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/wave.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform vec4 colDiffuse; 12 | 13 | uniform float seconds; 14 | 15 | uniform vec2 size; 16 | 17 | uniform float freqX; 18 | uniform float freqY; 19 | uniform float ampX; 20 | uniform float ampY; 21 | uniform float speedX; 22 | uniform float speedY; 23 | 24 | void main() { 25 | float pixelWidth = 1.0 / size.x; 26 | float pixelHeight = 1.0 / size.y; 27 | float aspect = pixelHeight / pixelWidth; 28 | float boxLeft = 0.0; 29 | float boxTop = 0.0; 30 | 31 | vec2 p = fragTexCoord; 32 | p.x += cos((fragTexCoord.y - boxTop) * freqX / ( pixelWidth * 750.0) + (seconds * speedX)) * ampX * pixelWidth; 33 | p.y += sin((fragTexCoord.x - boxLeft) * freqY * aspect / ( pixelHeight * 750.0) + (seconds * speedY)) * ampY * pixelHeight; 34 | 35 | gl_FragColor = texture2D(texture0, p)*colDiffuse*fragColor; 36 | } 37 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl100/write_depth.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | #extension GL_EXT_frag_depth : enable 3 | precision mediump float; // Precision required for OpenGL ES2 (WebGL) 4 | 5 | varying vec2 fragTexCoord; 6 | varying vec4 fragColor; 7 | 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | void main() 12 | { 13 | vec4 texelColor = texture2D(texture0, fragTexCoord); 14 | 15 | gl_FragColor = texelColor*colDiffuse*fragColor; 16 | gl_FragDepthEXT = 1.0 - gl_FragCoord.z; 17 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl120/base.fs: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Input vertex attributes (from vertex shader) 4 | varying vec2 fragTexCoord; 5 | varying vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // NOTE: Add your custom variables here 12 | uniform vec2 resolution = vec2(800, 450); 13 | 14 | void main() 15 | { 16 | // Texel color fetching from texture sampler 17 | vec4 texelColor = texture2D(texture0, fragTexCoord); 18 | 19 | // NOTE: Implement here your fragment shader code 20 | 21 | gl_FragColor = texelColor*colDiffuse; 22 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl120/base.vs: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Input vertex attributes 4 | attribute vec3 vertexPosition; 5 | attribute vec2 vertexTexCoord; 6 | attribute vec3 vertexNormal; 7 | attribute vec4 vertexColor; 8 | 9 | // Input uniform values 10 | uniform mat4 mvp; 11 | 12 | // Output vertex attributes (to fragment shader) 13 | varying vec2 fragTexCoord; 14 | varying vec4 fragColor; 15 | 16 | // NOTE: Add your custom variables here 17 | 18 | void main() 19 | { 20 | // Send vertex attributes to fragment shader 21 | fragTexCoord = vertexTexCoord; 22 | fragColor = vertexColor; 23 | 24 | // Calculate final vertex position 25 | gl_Position = mvp*vec4(vertexPosition, 1.0); 26 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl120/bloom.fs: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Input vertex attributes (from vertex shader) 4 | varying vec2 fragTexCoord; 5 | varying vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // NOTE: Add your custom variables here 12 | 13 | const vec2 size = vec2(800, 450); // Framebuffer size 14 | const float samples = 5.0; // Pixels per axis; higher = bigger glow, worse performance 15 | const float quality = 2.5; // Defines size factor: Lower = smaller glow, better quality 16 | 17 | void main() 18 | { 19 | vec4 sum = vec4(0); 20 | vec2 sizeFactor = vec2(1)/size*quality; 21 | 22 | // Texel color fetching from texture sampler 23 | vec4 source = texture2D(texture0, fragTexCoord); 24 | 25 | const int range = 2; // should be = (samples - 1)/2; 26 | 27 | for (int x = -range; x <= range; x++) 28 | { 29 | for (int y = -range; y <= range; y++) 30 | { 31 | sum += texture2D(texture0, fragTexCoord + vec2(x, y)*sizeFactor); 32 | } 33 | } 34 | 35 | // Calculate final fragment color 36 | gl_FragColor = ((sum/(samples*samples)) + source)*colDiffuse; 37 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl120/blur.fs: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Input vertex attributes (from vertex shader) 4 | varying vec2 fragTexCoord; 5 | varying vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // NOTE: Add your custom variables here 12 | 13 | // NOTE: Render size values must be passed from code 14 | const float renderWidth = 800.0; 15 | const float renderHeight = 450.0; 16 | 17 | vec3 offset = vec3(0.0, 1.3846153846, 3.2307692308); 18 | vec3 weight = vec3(0.2270270270, 0.3162162162, 0.0702702703); 19 | 20 | void main() 21 | { 22 | // Texel color fetching from texture sampler 23 | vec3 tc = texture2D(texture0, fragTexCoord).rgb*weight.x; 24 | 25 | tc += texture2D(texture0, fragTexCoord + vec2(offset.y)/renderWidth, 0.0).rgb*weight.y; 26 | tc += texture2D(texture0, fragTexCoord - vec2(offset.y)/renderWidth, 0.0).rgb*weight.y; 27 | 28 | tc += texture2D(texture0, fragTexCoord + vec2(offset.z)/renderWidth, 0.0).rgb*weight.z; 29 | tc += texture2D(texture0, fragTexCoord - vec2(offset.z)/renderWidth, 0.0).rgb*weight.z; 30 | 31 | gl_FragColor = vec4(tc, 1.0); 32 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl120/cross_hatching.fs: -------------------------------------------------------------------------------- 1 | # version 120 2 | 3 | // Input vertex attributes (from vertex shader) 4 | varying vec2 fragTexCoord; 5 | varying vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // NOTE: Add your custom variables here 12 | 13 | float hatchOffsetY = 5.0; 14 | float lumThreshold01 = 0.9; 15 | float lumThreshold02 = 0.7; 16 | float lumThreshold03 = 0.5; 17 | float lumThreshold04 = 0.3; 18 | 19 | void main() 20 | { 21 | vec3 tc = vec3(1.0, 1.0, 1.0); 22 | float lum = length(texture2D(texture0, fragTexCoord).rgb); 23 | 24 | if (lum < lumThreshold01) 25 | { 26 | if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); 27 | } 28 | 29 | if (lum < lumThreshold02) 30 | { 31 | if (mod(gl_FragCoord .x - gl_FragCoord .y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); 32 | } 33 | 34 | if (lum < lumThreshold03) 35 | { 36 | if (mod(gl_FragCoord .x + gl_FragCoord .y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); 37 | } 38 | 39 | if (lum < lumThreshold04) 40 | { 41 | if (mod(gl_FragCoord .x - gl_FragCoord .y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); 42 | } 43 | 44 | gl_FragColor = vec4(tc, 1.0); 45 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl120/dream_vision.fs: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Input vertex attributes (from vertex shader) 4 | varying vec2 fragTexCoord; 5 | varying vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // NOTE: Add your custom variables here 12 | 13 | void main() 14 | { 15 | vec4 color = texture2D(texture0, fragTexCoord); 16 | 17 | color += texture2D(texture0, fragTexCoord + 0.001); 18 | color += texture2D(texture0, fragTexCoord + 0.003); 19 | color += texture2D(texture0, fragTexCoord + 0.005); 20 | color += texture2D(texture0, fragTexCoord + 0.007); 21 | color += texture2D(texture0, fragTexCoord + 0.009); 22 | color += texture2D(texture0, fragTexCoord + 0.011); 23 | 24 | color += texture2D(texture0, fragTexCoord - 0.001); 25 | color += texture2D(texture0, fragTexCoord - 0.003); 26 | color += texture2D(texture0, fragTexCoord - 0.005); 27 | color += texture2D(texture0, fragTexCoord - 0.007); 28 | color += texture2D(texture0, fragTexCoord - 0.009); 29 | color += texture2D(texture0, fragTexCoord - 0.011); 30 | 31 | color.rgb = vec3((color.r + color.g + color.b)/3.0); 32 | color = color/9.5; 33 | 34 | gl_FragColor = color; 35 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl120/fisheye.fs: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Input vertex attributes (from vertex shader) 4 | varying vec2 fragTexCoord; 5 | varying vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // NOTE: Add your custom variables here 12 | 13 | const float PI = 3.1415926535; 14 | 15 | void main() 16 | { 17 | float aperture = 178.0; 18 | float apertureHalf = 0.5 * aperture * (PI / 180.0); 19 | float maxFactor = sin(apertureHalf); 20 | 21 | vec2 uv = vec2(0.0); 22 | vec2 xy = 2.0 * fragTexCoord.xy - 1.0; 23 | float d = length(xy); 24 | 25 | if (d < (2.0 - maxFactor)) 26 | { 27 | d = length(xy * maxFactor); 28 | float z = sqrt(1.0 - d * d); 29 | float r = atan(d, z) / PI; 30 | float phi = atan(xy.y, xy.x); 31 | 32 | uv.x = r * cos(phi) + 0.5; 33 | uv.y = r * sin(phi) + 0.5; 34 | } 35 | else 36 | { 37 | uv = fragTexCoord.xy; 38 | } 39 | 40 | gl_FragColor = texture2D(texture0, uv); 41 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl120/grayscale.fs: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Input vertex attributes (from vertex shader) 4 | varying vec2 fragTexCoord; 5 | varying vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // NOTE: Add your custom variables here 12 | 13 | void main() 14 | { 15 | // Texel color fetching from texture sampler 16 | vec4 texelColor = texture2D(texture0, fragTexCoord)*colDiffuse*fragColor; 17 | 18 | // Convert texel color to grayscale using NTSC conversion weights 19 | float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114)); 20 | 21 | // Calculate final fragment color 22 | gl_FragColor = vec4(gray, gray, gray, texelColor.a); 23 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl120/lightmap.fs: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Input vertex attributes (from vertex shader) 4 | varying vec2 fragTexCoord; 5 | varying vec2 fragTexCoord2; 6 | varying vec3 fragPosition; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform sampler2D texture1; 12 | 13 | void main() 14 | { 15 | // Texel color fetching from texture sampler 16 | vec4 texelColor = texture2D(texture0, fragTexCoord); 17 | vec4 texelColor2 = texture2D(texture1, fragTexCoord2); 18 | 19 | gl_FragColor = texelColor * texelColor2; 20 | } 21 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl120/lightmap.vs: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Input vertex attributes 4 | attribute vec3 vertexPosition; 5 | attribute vec2 vertexTexCoord; 6 | attribute vec2 vertexTexCoord2; 7 | attribute vec4 vertexColor; 8 | 9 | // Input uniform values 10 | uniform mat4 mvp; 11 | uniform mat4 matModel; 12 | 13 | // Output vertex attributes (to fragment shader) 14 | varying vec3 fragPosition; 15 | varying vec2 fragTexCoord; 16 | varying vec2 fragTexCoord2; 17 | varying vec4 fragColor; 18 | 19 | // NOTE: Add your custom variables here 20 | 21 | void main() 22 | { 23 | // Send vertex attributes to fragment shader 24 | fragPosition = vec3(matModel*vec4(vertexPosition, 1.0)); 25 | fragTexCoord = vertexTexCoord; 26 | fragTexCoord2 = vertexTexCoord2; 27 | fragColor = vertexColor; 28 | 29 | // Calculate final vertex position 30 | gl_Position = mvp*vec4(vertexPosition, 1.0); 31 | } 32 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl120/palette_switch.fs: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | const int colors = 8; 4 | 5 | // Input fragment attributes (from fragment shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform ivec3 palette[colors]; 12 | 13 | void main() 14 | { 15 | // Texel color fetching from texture sampler 16 | vec4 texelColor = texture(texture0, fragTexCoord) * fragColor; 17 | 18 | // Convert the (normalized) texel color RED component (GB would work, too) 19 | // to the palette index by scaling up from [0, 1] to [0, 255]. 20 | int index = int(texelColor.r * 255.0); 21 | ivec3 color = palette[index]; 22 | 23 | // Calculate final fragment color. Note that the palette color components 24 | // are defined in the range [0, 255] and need to be normalized to [0, 1] 25 | // for OpenGL to work. 26 | gl_FragColor = vec4(color / 255.0, texelColor.a); 27 | } 28 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl120/pixelizer.fs: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Input vertex attributes (from vertex shader) 4 | varying vec2 fragTexCoord; 5 | varying vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // NOTE: Add your custom variables here 12 | 13 | // NOTE: Render size values must be passed from code 14 | const float renderWidth = 800.0; 15 | const float renderHeight = 450.0; 16 | 17 | float pixelWidth = 5.0; 18 | float pixelHeight = 5.0; 19 | 20 | void main() 21 | { 22 | float dx = pixelWidth*(1.0/renderWidth); 23 | float dy = pixelHeight*(1.0/renderHeight); 24 | 25 | vec2 coord = vec2(dx*floor(fragTexCoord.x/dx), dy*floor(fragTexCoord.y/dy)); 26 | 27 | vec3 tc = texture2D(texture0, coord).rgb; 28 | 29 | gl_FragColor = vec4(tc, 1.0); 30 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl120/posterization.fs: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Input vertex attributes (from vertex shader) 4 | varying vec2 fragTexCoord; 5 | varying vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // NOTE: Add your custom variables here 12 | 13 | float gamma = 0.6; 14 | float numColors = 8.0; 15 | 16 | void main() 17 | { 18 | vec3 color = texture2D(texture0, fragTexCoord.xy).rgb; 19 | 20 | color = pow(color, vec3(gamma, gamma, gamma)); 21 | color = color*numColors; 22 | color = floor(color); 23 | color = color/numColors; 24 | color = pow(color, vec3(1.0/gamma)); 25 | 26 | gl_FragColor = vec4(color, 1.0); 27 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl120/predator.fs: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Input vertex attributes (from vertex shader) 4 | varying vec2 fragTexCoord; 5 | varying vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // NOTE: Add your custom variables here 12 | 13 | void main() 14 | { 15 | vec3 color = texture2D(texture0, fragTexCoord).rgb; 16 | vec3 colors[3]; 17 | colors[0] = vec3(0.0, 0.0, 1.0); 18 | colors[1] = vec3(1.0, 1.0, 0.0); 19 | colors[2] = vec3(1.0, 0.0, 0.0); 20 | 21 | float lum = (color.r + color.g + color.b)/3.0; 22 | 23 | vec3 tc = vec3(0.0, 0.0, 0.0); 24 | 25 | if (lum < 0.5) tc = mix(colors[0], colors[1], lum/0.5); 26 | else tc = mix(colors[1], colors[2], (lum - 0.5)/0.5); 27 | 28 | gl_FragColor = vec4(tc, 1.0); 29 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl120/scanlines.fs: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Input vertex attributes (from vertex shader) 4 | varying vec2 fragTexCoord; 5 | varying vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // NOTE: Add your custom variables here 12 | 13 | float offset = 0.0; 14 | float frequency = 450.0/3.0; 15 | 16 | uniform float time; 17 | 18 | void main() 19 | { 20 | /* 21 | // Scanlines method 1 22 | float tval = 0; //time 23 | vec2 uv = 0.5 + (fragTexCoord - 0.5)*(0.9 + 0.01*sin(0.5*tval)); 24 | 25 | vec4 color = texture2D(texture0, fragTexCoord); 26 | 27 | color = clamp(color*0.5 + 0.5*color*color*1.2, 0.0, 1.0); 28 | color *= 0.5 + 0.5*16.0*uv.x*uv.y*(1.0 - uv.x)*(1.0 - uv.y); 29 | color *= vec4(0.8, 1.0, 0.7, 1); 30 | color *= 0.9 + 0.1*sin(10.0*tval + uv.y*1000.0); 31 | color *= 0.97 + 0.03*sin(110.0*tval); 32 | 33 | fragColor = color; 34 | */ 35 | // Scanlines method 2 36 | float globalPos = (fragTexCoord.y + offset) * frequency; 37 | float wavePos = cos((fract(globalPos) - 0.5)*3.14); 38 | 39 | vec4 color = texture2D(texture0, fragTexCoord); 40 | 41 | gl_FragColor = mix(vec4(0.0, 0.3, 0.0, 0.0), color, wavePos); 42 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl120/shadowmap.vs: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Input vertex attributes 4 | attribute vec3 vertexPosition; 5 | attribute vec2 vertexTexCoord; 6 | attribute vec3 vertexNormal; 7 | attribute vec4 vertexColor; 8 | 9 | // Input uniform values 10 | uniform mat4 mvp; 11 | uniform mat4 matModel; 12 | uniform mat4 matNormal; 13 | 14 | // Output vertex attributes (to fragment shader) 15 | varying vec3 fragPosition; 16 | varying vec2 fragTexCoord; 17 | varying vec4 fragColor; 18 | varying vec3 fragNormal; 19 | 20 | // NOTE: Add your custom variables here 21 | 22 | void main() 23 | { 24 | // Send vertex attributes to fragment shader 25 | fragPosition = vec3(matModel*vec4(vertexPosition, 1.0)); 26 | fragTexCoord = vertexTexCoord; 27 | fragColor = vertexColor; 28 | fragNormal = normalize(vec3(matNormal*vec4(vertexNormal, 1.0))); 29 | 30 | // Calculate final vertex position 31 | gl_Position = mvp*vec4(vertexPosition, 1.0); 32 | } 33 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl120/swirl.fs: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Input vertex attributes (from vertex shader) 4 | varying vec2 fragTexCoord; 5 | varying vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // NOTE: Add your custom variables here 12 | 13 | // NOTE: Render size values should be passed from code 14 | const float renderWidth = 800; 15 | const float renderHeight = 450; 16 | 17 | float radius = 250.0; 18 | float angle = 0.8; 19 | 20 | uniform vec2 center; 21 | 22 | void main() 23 | { 24 | vec2 texSize = vec2(renderWidth, renderHeight); 25 | vec2 tc = fragTexCoord*texSize; 26 | tc -= center; 27 | 28 | float dist = length(tc); 29 | 30 | if (dist < radius) 31 | { 32 | float percent = (radius - dist)/radius; 33 | float theta = percent*percent*angle*8.0; 34 | float s = sin(theta); 35 | float c = cos(theta); 36 | 37 | tc = vec2(dot(tc, vec2(c, -s)), dot(tc, vec2(s, c))); 38 | } 39 | 40 | tc += center; 41 | vec4 color = texture2D(texture0, tc/texSize)*colDiffuse*fragColor;; 42 | 43 | gl_FragColor = vec4(color.rgb, 1.0);; 44 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/base.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // Output fragment color 12 | out vec4 finalColor; 13 | 14 | // NOTE: Add your custom variables here 15 | 16 | void main() 17 | { 18 | // Texel color fetching from texture sampler 19 | vec4 texelColor = texture(texture0, fragTexCoord); 20 | 21 | // NOTE: Implement here your fragment shader code 22 | 23 | // final color is the color from the texture 24 | // times the tint color (colDiffuse) 25 | // times the fragment color (interpolated vertex color) 26 | finalColor = texelColor*colDiffuse*fragColor; 27 | } 28 | 29 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/base.vs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes 4 | in vec3 vertexPosition; 5 | in vec2 vertexTexCoord; 6 | in vec3 vertexNormal; 7 | in vec4 vertexColor; 8 | 9 | // Input uniform values 10 | uniform mat4 mvp; 11 | 12 | // Output vertex attributes (to fragment shader) 13 | out vec2 fragTexCoord; 14 | out vec4 fragColor; 15 | 16 | // NOTE: Add your custom variables here 17 | 18 | void main() 19 | { 20 | // Send vertex attributes to fragment shader 21 | fragTexCoord = vertexTexCoord; 22 | fragColor = vertexColor; 23 | 24 | // Calculate final vertex position 25 | gl_Position = mvp*vec4(vertexPosition, 1.0); 26 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/bloom.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // Output fragment color 12 | out vec4 finalColor; 13 | 14 | // NOTE: Add your custom variables here 15 | 16 | const vec2 size = vec2(800, 450); // Framebuffer size 17 | const float samples = 5.0; // Pixels per axis; higher = bigger glow, worse performance 18 | const float quality = 2.5; // Defines size factor: Lower = smaller glow, better quality 19 | 20 | void main() 21 | { 22 | vec4 sum = vec4(0); 23 | vec2 sizeFactor = vec2(1)/size*quality; 24 | 25 | // Texel color fetching from texture sampler 26 | vec4 source = texture(texture0, fragTexCoord); 27 | 28 | const int range = 2; // should be = (samples - 1)/2; 29 | 30 | for (int x = -range; x <= range; x++) 31 | { 32 | for (int y = -range; y <= range; y++) 33 | { 34 | sum += texture(texture0, fragTexCoord + vec2(x, y)*sizeFactor); 35 | } 36 | } 37 | 38 | // Calculate final fragment color 39 | finalColor = ((sum/(samples*samples)) + source)*colDiffuse; 40 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/blur.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // Output fragment color 12 | out vec4 finalColor; 13 | 14 | // NOTE: Add your custom variables here 15 | 16 | // NOTE: Render size values must be passed from code 17 | const float renderWidth = 800; 18 | const float renderHeight = 450; 19 | 20 | float offset[3] = float[](0.0, 1.3846153846, 3.2307692308); 21 | float weight[3] = float[](0.2270270270, 0.3162162162, 0.0702702703); 22 | 23 | void main() 24 | { 25 | // Texel color fetching from texture sampler 26 | vec3 texelColor = texture(texture0, fragTexCoord).rgb*weight[0]; 27 | 28 | for (int i = 1; i < 3; i++) 29 | { 30 | texelColor += texture(texture0, fragTexCoord + vec2(offset[i])/renderWidth, 0.0).rgb*weight[i]; 31 | texelColor += texture(texture0, fragTexCoord - vec2(offset[i])/renderWidth, 0.0).rgb*weight[i]; 32 | } 33 | 34 | finalColor = vec4(texelColor, 1.0); 35 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/color_mix.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec3 vertexPos; 5 | in vec2 fragTexCoord; 6 | in vec4 fragColor; 7 | 8 | // Input uniform values 9 | uniform sampler2D texture0; 10 | uniform sampler2D texture1; 11 | uniform vec4 colDiffuse; 12 | 13 | uniform float divider = 0.5; 14 | 15 | out vec4 finalColor; 16 | 17 | void main() 18 | { 19 | // Texel color fetching from texture sampler 20 | vec4 texelColor0 = texture(texture0, fragTexCoord); 21 | vec4 texelColor1 = texture(texture1, fragTexCoord); 22 | 23 | float x = fract(fragTexCoord.s); 24 | float final = smoothstep(divider - 0.1, divider + 0.1, x); 25 | 26 | finalColor = mix(texelColor0, texelColor1, final); 27 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/deferred_shading.vs: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | layout (location = 0) in vec3 vertexPosition; 4 | layout (location = 1) in vec2 vertexTexCoord; 5 | 6 | out vec2 texCoord; 7 | 8 | void main() { 9 | gl_Position = vec4(vertexPosition, 1.0); 10 | texCoord = vertexTexCoord; 11 | } 12 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/depth.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | 6 | // Input uniform values 7 | uniform sampler2D depthTexture; 8 | uniform bool flipY; 9 | 10 | const float nearPlane = 0.1; 11 | const float farPlane = 100.0; 12 | 13 | // Output fragment color 14 | out vec4 finalColor; 15 | 16 | void main() 17 | { 18 | // Handle potential Y-flipping 19 | vec2 texCoord = fragTexCoord; 20 | if (flipY) texCoord.y = 1.0 - texCoord.y; 21 | 22 | // Sample depth 23 | float depth = texture(depthTexture, texCoord).r; 24 | 25 | // Linearize depth value 26 | float linearDepth = (2.0*nearPlane)/(farPlane + nearPlane - depth*(farPlane - nearPlane)); 27 | 28 | // Output final color 29 | finalColor = vec4(vec3(linearDepth), 1.0); 30 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/dream_vision.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | in vec2 fragTexCoord; 4 | 5 | out vec4 fragColor; 6 | 7 | uniform sampler2D texture0; 8 | uniform vec4 colDiffuse; 9 | 10 | // NOTE: Add your custom variables here 11 | 12 | void main() 13 | { 14 | vec4 color = texture(texture0, fragTexCoord); 15 | 16 | color += texture(texture0, fragTexCoord + 0.001); 17 | color += texture(texture0, fragTexCoord + 0.003); 18 | color += texture(texture0, fragTexCoord + 0.005); 19 | color += texture(texture0, fragTexCoord + 0.007); 20 | color += texture(texture0, fragTexCoord + 0.009); 21 | color += texture(texture0, fragTexCoord + 0.011); 22 | 23 | color += texture(texture0, fragTexCoord - 0.001); 24 | color += texture(texture0, fragTexCoord - 0.003); 25 | color += texture(texture0, fragTexCoord - 0.005); 26 | color += texture(texture0, fragTexCoord - 0.007); 27 | color += texture(texture0, fragTexCoord - 0.009); 28 | color += texture(texture0, fragTexCoord - 0.011); 29 | 30 | color.rgb = vec3((color.r + color.g + color.b)/3.0); 31 | color = color/9.5; 32 | 33 | fragColor = color; 34 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/fisheye.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | in vec2 fragTexCoord; 4 | 5 | out vec4 fragColor; 6 | 7 | uniform sampler2D texture0; 8 | uniform vec4 colDiffuse; 9 | 10 | // NOTE: Add your custom variables here 11 | 12 | const float PI = 3.1415926535; 13 | 14 | void main() 15 | { 16 | float aperture = 178.0; 17 | float apertureHalf = 0.5 * aperture * (PI / 180.0); 18 | float maxFactor = sin(apertureHalf); 19 | 20 | vec2 uv = vec2(0); 21 | vec2 xy = 2.0 * fragTexCoord.xy - 1.0; 22 | float d = length(xy); 23 | 24 | if (d < (2.0 - maxFactor)) 25 | { 26 | d = length(xy * maxFactor); 27 | float z = sqrt(1.0 - d * d); 28 | float r = atan(d, z) / PI; 29 | float phi = atan(xy.y, xy.x); 30 | 31 | uv.x = r * cos(phi) + 0.5; 32 | uv.y = r * sin(phi) + 0.5; 33 | } 34 | else 35 | { 36 | uv = fragTexCoord.xy; 37 | } 38 | 39 | fragColor = texture(texture0, uv); 40 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/gbuffer.fs: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | layout (location = 0) out vec3 gPosition; 3 | layout (location = 1) out vec3 gNormal; 4 | layout (location = 2) out vec4 gAlbedoSpec; 5 | 6 | in vec3 fragPosition; 7 | in vec2 fragTexCoord; 8 | in vec3 fragNormal; 9 | 10 | uniform sampler2D diffuseTexture; 11 | uniform sampler2D specularTexture; 12 | 13 | void main() { 14 | // store the fragment position vector in the first gbuffer texture 15 | gPosition = fragPosition; 16 | // also store the per-fragment normals into the gbuffer 17 | gNormal = normalize(fragNormal); 18 | // and the diffuse per-fragment color 19 | gAlbedoSpec.rgb = texture(diffuseTexture, fragTexCoord).rgb; 20 | // store specular intensity in gAlbedoSpec's alpha component 21 | gAlbedoSpec.a = texture(specularTexture, fragTexCoord).r; 22 | } 23 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/gbuffer.vs: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | layout (location = 0) in vec3 vertexPosition; 3 | layout (location = 1) in vec2 vertexTexCoord; 4 | layout (location = 2) in vec3 vertexNormal; 5 | 6 | out vec3 fragPosition; 7 | out vec2 fragTexCoord; 8 | out vec3 fragNormal; 9 | 10 | uniform mat4 matModel; 11 | uniform mat4 matView; 12 | uniform mat4 matProjection; 13 | 14 | void main() 15 | { 16 | vec4 worldPos = matModel * vec4(vertexPosition, 1.0); 17 | fragPosition = worldPos.xyz; 18 | fragTexCoord = vertexTexCoord; 19 | 20 | mat3 normalMatrix = transpose(inverse(mat3(matModel))); 21 | fragNormal = normalMatrix * vertexNormal; 22 | 23 | gl_Position = matProjection * matView * worldPos; 24 | } 25 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/grayscale.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // Output fragment color 12 | out vec4 finalColor; 13 | 14 | // NOTE: Add your custom variables here 15 | 16 | void main() 17 | { 18 | // Texel color fetching from texture sampler 19 | vec4 texelColor = texture(texture0, fragTexCoord)*colDiffuse*fragColor; 20 | 21 | // Convert texel color to grayscale using NTSC conversion weights 22 | float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114)); 23 | 24 | // Calculate final fragment color 25 | finalColor = vec4(gray, gray, gray, texelColor.a); 26 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/hybrid_raster.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // Output fragment color 12 | //out vec4 finalColor; 13 | 14 | // NOTE: Add your custom variables here 15 | 16 | void main() 17 | { 18 | vec4 texelColor = texture(texture0, fragTexCoord); 19 | 20 | gl_FragColor = texelColor*colDiffuse*fragColor; 21 | gl_FragDepth = gl_FragCoord.z; 22 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/lighting.vs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes 4 | in vec3 vertexPosition; 5 | in vec2 vertexTexCoord; 6 | in vec3 vertexNormal; 7 | in vec4 vertexColor; 8 | 9 | // Input uniform values 10 | uniform mat4 mvp; 11 | uniform mat4 matModel; 12 | uniform mat4 matNormal; 13 | 14 | // Output vertex attributes (to fragment shader) 15 | out vec3 fragPosition; 16 | out vec2 fragTexCoord; 17 | out vec4 fragColor; 18 | out vec3 fragNormal; 19 | 20 | // NOTE: Add your custom variables here 21 | 22 | void main() 23 | { 24 | // Send vertex attributes to fragment shader 25 | fragPosition = vec3(matModel*vec4(vertexPosition, 1.0)); 26 | fragTexCoord = vertexTexCoord; 27 | fragColor = vertexColor; 28 | fragNormal = normalize(vec3(matNormal*vec4(vertexNormal, 1.0))); 29 | 30 | // Calculate final vertex position 31 | gl_Position = mvp*vec4(vertexPosition, 1.0); 32 | } 33 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/lighting_instancing.vs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes 4 | in vec3 vertexPosition; 5 | in vec2 vertexTexCoord; 6 | in vec3 vertexNormal; 7 | //in vec4 vertexColor; // Not required 8 | 9 | in mat4 instanceTransform; 10 | 11 | // Input uniform values 12 | uniform mat4 mvp; 13 | uniform mat4 matNormal; 14 | 15 | // Output vertex attributes (to fragment shader) 16 | out vec3 fragPosition; 17 | out vec2 fragTexCoord; 18 | out vec4 fragColor; 19 | out vec3 fragNormal; 20 | 21 | // NOTE: Add your custom variables here 22 | 23 | void main() 24 | { 25 | // Send vertex attributes to fragment shader 26 | fragPosition = vec3(instanceTransform*vec4(vertexPosition, 1.0)); 27 | fragTexCoord = vertexTexCoord; 28 | fragColor = vec4(1.0); 29 | fragNormal = normalize(vec3(matNormal*vec4(vertexNormal, 1.0))); 30 | 31 | // Calculate final vertex position, note that we multiply mvp by instanceTransform 32 | gl_Position = mvp*instanceTransform*vec4(vertexPosition, 1.0); 33 | } 34 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/lightmap.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec2 fragTexCoord2; 6 | in vec3 fragPosition; 7 | in vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform sampler2D texture1; 12 | 13 | // Output fragment color 14 | out vec4 finalColor; 15 | 16 | void main() 17 | { 18 | // Texel color fetching from texture sampler 19 | vec4 texelColor = texture(texture0, fragTexCoord); 20 | vec4 texelColor2 = texture(texture1, fragTexCoord2); 21 | 22 | finalColor = texelColor * texelColor2; 23 | } 24 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/lightmap.vs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes 4 | in vec3 vertexPosition; 5 | in vec2 vertexTexCoord; 6 | in vec2 vertexTexCoord2; 7 | in vec4 vertexColor; 8 | 9 | // Input uniform values 10 | uniform mat4 mvp; 11 | uniform mat4 matModel; 12 | 13 | // Output vertex attributes (to fragment shader) 14 | out vec3 fragPosition; 15 | out vec2 fragTexCoord; 16 | out vec2 fragTexCoord2; 17 | out vec4 fragColor; 18 | 19 | void main() 20 | { 21 | // Send vertex attributes to fragment shader 22 | fragPosition = vec3(matModel*vec4(vertexPosition, 1.0)); 23 | fragTexCoord = vertexTexCoord; 24 | fragTexCoord2 = vertexTexCoord2; 25 | fragColor = vertexColor; 26 | 27 | // Calculate final vertex position 28 | gl_Position = mvp*vec4(vertexPosition, 1.0); 29 | } 30 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/mask.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform sampler2D mask; 10 | uniform int frame; 11 | 12 | // Output fragment color 13 | out vec4 finalColor; 14 | 15 | void main() 16 | { 17 | vec4 maskColour = texture(mask, fragTexCoord + vec2(sin(-frame/150.0)/10.0, cos(-frame/170.0)/10.0)); 18 | if (maskColour.r < 0.25) discard; 19 | vec4 texelColor = texture(texture0, fragTexCoord + vec2(sin(frame/90.0)/8.0, cos(frame/60.0)/8.0)); 20 | 21 | finalColor = texelColor*maskColour; 22 | } 23 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/overdraw.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // Output fragment color 12 | out vec4 finalColor; 13 | 14 | // NOTE: Add your custom variables here 15 | 16 | void main() 17 | { 18 | // To show overdraw, we just render all the fragments 19 | // with a solid color and some transparency 20 | 21 | // NOTE: This is not a postpro render, 22 | // it will only render all screen texture in a plain color 23 | 24 | finalColor = vec4(1.0, 0.0, 0.0, 0.2); 25 | } 26 | 27 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/palette_switch.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | const int MAX_INDEXED_COLORS = 8; 4 | 5 | // Input fragment attributes (from fragment shader) 6 | in vec2 fragTexCoord; 7 | in vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform ivec3 palette[MAX_INDEXED_COLORS]; 12 | //uniform sampler2D palette; // Alternative to ivec3, palette provided as a 256x1 texture 13 | 14 | // Output fragment color 15 | out vec4 finalColor; 16 | 17 | void main() 18 | { 19 | // Texel color fetching from texture sampler 20 | // NOTE: The texel is actually the a GRAYSCALE index color 21 | vec4 texelColor = texture(texture0, fragTexCoord)*fragColor; 22 | 23 | // Convert the (normalized) texel color RED component (GB would work, too) 24 | // to the palette index by scaling up from [0..1] to [0..255] 25 | int index = int(texelColor.r*255.0); 26 | ivec3 color = palette[index]; 27 | 28 | //finalColor = texture(palette, texelColor.xy); // Alternative to ivec3 29 | 30 | // Calculate final fragment color. Note that the palette color components 31 | // are defined in the range [0..255] and need to be normalized to [0..1] 32 | finalColor = vec4(color/255.0, texelColor.a); 33 | } 34 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/pixelizer.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // Output fragment color 12 | out vec4 finalColor; 13 | 14 | // NOTE: Add your custom variables here 15 | 16 | // NOTE: Render size values must be passed from code 17 | const float renderWidth = 800; 18 | const float renderHeight = 450; 19 | 20 | uniform float pixelWidth = 5.0; 21 | uniform float pixelHeight = 5.0; 22 | 23 | void main() 24 | { 25 | float dx = pixelWidth*(1.0/renderWidth); 26 | float dy = pixelHeight*(1.0/renderHeight); 27 | 28 | vec2 coord = vec2(dx*floor(fragTexCoord.x/dx), dy*floor(fragTexCoord.y/dy)); 29 | 30 | vec3 tc = texture(texture0, coord).rgb; 31 | 32 | finalColor = vec4(tc, 1.0); 33 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/posterization.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // Output fragment color 12 | out vec4 finalColor; 13 | 14 | // NOTE: Add your custom variables here 15 | 16 | float gamma = 0.6; 17 | float numColors = 8.0; 18 | 19 | void main() 20 | { 21 | // Texel color fetching from texture sampler 22 | vec3 texelColor = texture(texture0, fragTexCoord.xy).rgb; 23 | 24 | texelColor = pow(texelColor, vec3(gamma, gamma, gamma)); 25 | texelColor = texelColor*numColors; 26 | texelColor = floor(texelColor); 27 | texelColor = texelColor/numColors; 28 | texelColor = pow(texelColor, vec3(1.0/gamma)); 29 | 30 | finalColor = vec4(texelColor, 1.0); 31 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/predator.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // Output fragment color 12 | out vec4 finalColor; 13 | 14 | // NOTE: Add your custom variables here 15 | 16 | void main() 17 | { 18 | // Texel color fetching from texture sampler 19 | vec3 texelColor = texture(texture0, fragTexCoord).rgb; 20 | vec3 colors[3]; 21 | colors[0] = vec3(0.0, 0.0, 1.0); 22 | colors[1] = vec3(1.0, 1.0, 0.0); 23 | colors[2] = vec3(1.0, 0.0, 0.0); 24 | 25 | float lum = (texelColor.r + texelColor.g + texelColor.b)/3.0; 26 | 27 | int ix = (lum < 0.5)? 0:1; 28 | 29 | vec3 tc = mix(colors[ix], colors[ix + 1], (lum - float(ix)*0.5)/0.5); 30 | 31 | finalColor = vec4(tc, 1.0); 32 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/shadowmap.vs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes 4 | in vec3 vertexPosition; 5 | in vec2 vertexTexCoord; 6 | in vec3 vertexNormal; 7 | in vec4 vertexColor; 8 | 9 | // Input uniform values 10 | uniform mat4 mvp; 11 | uniform mat4 matModel; 12 | uniform mat4 matNormal; 13 | 14 | // Output vertex attributes (to fragment shader) 15 | out vec3 fragPosition; 16 | out vec2 fragTexCoord; 17 | out vec4 fragColor; 18 | out vec3 fragNormal; 19 | 20 | // NOTE: Add your custom variables here 21 | 22 | void main() 23 | { 24 | // Send vertex attributes to fragment shader 25 | fragPosition = vec3(matModel*vec4(vertexPosition, 1.0)); 26 | fragTexCoord = vertexTexCoord; 27 | fragColor = vertexColor; 28 | fragNormal = normalize(vec3(matNormal*vec4(vertexNormal, 1.0))); 29 | 30 | // Calculate final vertex position 31 | gl_Position = mvp*vec4(vertexPosition, 1.0); 32 | } 33 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/swirl.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // Output fragment color 12 | out vec4 finalColor; 13 | 14 | // NOTE: Add your custom variables here 15 | 16 | // NOTE: Render size values should be passed from code 17 | const float renderWidth = 800; 18 | const float renderHeight = 450; 19 | 20 | float radius = 250.0; 21 | float angle = 0.8; 22 | 23 | uniform vec2 center = vec2(200.0, 200.0); 24 | 25 | void main() 26 | { 27 | vec2 texSize = vec2(renderWidth, renderHeight); 28 | vec2 tc = fragTexCoord*texSize; 29 | tc -= center; 30 | 31 | float dist = length(tc); 32 | 33 | if (dist < radius) 34 | { 35 | float percent = (radius - dist)/radius; 36 | float theta = percent*percent*angle*8.0; 37 | float s = sin(theta); 38 | float c = cos(theta); 39 | 40 | tc = vec2(dot(tc, vec2(c, -s)), dot(tc, vec2(s, c))); 41 | } 42 | 43 | tc += center; 44 | vec4 color = texture(texture0, tc/texSize)*colDiffuse*fragColor;; 45 | 46 | finalColor = vec4(color.rgb, 1.0);; 47 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/tiling.fs: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | uniform vec2 tiling; 12 | 13 | out vec4 finalColor; 14 | 15 | void main() 16 | { 17 | vec2 texCoord = fragTexCoord*tiling; 18 | 19 | finalColor = texture(texture0, texCoord)*colDiffuse; 20 | } 21 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/vertex_displacement.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input fragment attributes (from fragment shader) 4 | in vec2 fragTexCoord; 5 | in float height; 6 | 7 | // Output fragment color 8 | out vec4 finalColor; 9 | 10 | void main() 11 | { 12 | vec4 darkblue = vec4(0.0, 0.13, 0.18, 1.0); 13 | vec4 lightblue = vec4(1.0, 1.0, 1.0, 1.0); 14 | // interplate between two colors based on height 15 | finalColor = mix(darkblue, lightblue, height); 16 | } -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/wave.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // Output fragment color 12 | out vec4 finalColor; 13 | 14 | uniform float seconds; 15 | 16 | uniform vec2 size; 17 | 18 | uniform float freqX; 19 | uniform float freqY; 20 | uniform float ampX; 21 | uniform float ampY; 22 | uniform float speedX; 23 | uniform float speedY; 24 | 25 | void main() { 26 | float pixelWidth = 1.0 / size.x; 27 | float pixelHeight = 1.0 / size.y; 28 | float aspect = pixelHeight / pixelWidth; 29 | float boxLeft = 0.0; 30 | float boxTop = 0.0; 31 | 32 | vec2 p = fragTexCoord; 33 | p.x += cos((fragTexCoord.y - boxTop) * freqX / ( pixelWidth * 750.0) + (seconds * speedX)) * ampX * pixelWidth; 34 | p.y += sin((fragTexCoord.x - boxLeft) * freqY * aspect / ( pixelHeight * 750.0) + (seconds * speedY)) * ampY * pixelHeight; 35 | 36 | finalColor = texture(texture0, p)*colDiffuse*fragColor; 37 | } 38 | -------------------------------------------------------------------------------- /examples/shaders/resources/shaders/glsl330/write_depth.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // Output fragment color 12 | out vec4 finalColor; 13 | 14 | void main() 15 | { 16 | vec4 texelColor = texture(texture0, fragTexCoord); 17 | 18 | finalColor = texelColor*colDiffuse*fragColor; 19 | gl_FragDepth = 1.0 - finalColor.z; 20 | } 21 | -------------------------------------------------------------------------------- /examples/shaders/resources/space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/space.png -------------------------------------------------------------------------------- /examples/shaders/resources/spark_flame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/spark_flame.png -------------------------------------------------------------------------------- /examples/shaders/resources/texel_checker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/resources/texel_checker.png -------------------------------------------------------------------------------- /examples/shaders/shaders_basic_lighting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_basic_lighting.png -------------------------------------------------------------------------------- /examples/shaders/shaders_basic_pbr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_basic_pbr.png -------------------------------------------------------------------------------- /examples/shaders/shaders_custom_uniform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_custom_uniform.png -------------------------------------------------------------------------------- /examples/shaders/shaders_deferred_render.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_deferred_render.png -------------------------------------------------------------------------------- /examples/shaders/shaders_eratosthenes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_eratosthenes.png -------------------------------------------------------------------------------- /examples/shaders/shaders_fog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_fog.png -------------------------------------------------------------------------------- /examples/shaders/shaders_hot_reloading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_hot_reloading.png -------------------------------------------------------------------------------- /examples/shaders/shaders_hybrid_render.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_hybrid_render.png -------------------------------------------------------------------------------- /examples/shaders/shaders_julia_set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_julia_set.png -------------------------------------------------------------------------------- /examples/shaders/shaders_lightmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_lightmap.png -------------------------------------------------------------------------------- /examples/shaders/shaders_mesh_instancing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_mesh_instancing.png -------------------------------------------------------------------------------- /examples/shaders/shaders_model_shader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_model_shader.png -------------------------------------------------------------------------------- /examples/shaders/shaders_multi_sample2d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_multi_sample2d.png -------------------------------------------------------------------------------- /examples/shaders/shaders_palette_switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_palette_switch.png -------------------------------------------------------------------------------- /examples/shaders/shaders_postprocessing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_postprocessing.png -------------------------------------------------------------------------------- /examples/shaders/shaders_raymarching.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_raymarching.png -------------------------------------------------------------------------------- /examples/shaders/shaders_rounded_rectangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_rounded_rectangle.png -------------------------------------------------------------------------------- /examples/shaders/shaders_shadowmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_shadowmap.png -------------------------------------------------------------------------------- /examples/shaders/shaders_shapes_textures.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_shapes_textures.png -------------------------------------------------------------------------------- /examples/shaders/shaders_simple_mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_simple_mask.png -------------------------------------------------------------------------------- /examples/shaders/shaders_spotlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_spotlight.png -------------------------------------------------------------------------------- /examples/shaders/shaders_texture_drawing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_texture_drawing.png -------------------------------------------------------------------------------- /examples/shaders/shaders_texture_outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_texture_outline.png -------------------------------------------------------------------------------- /examples/shaders/shaders_texture_tiling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_texture_tiling.png -------------------------------------------------------------------------------- /examples/shaders/shaders_texture_waves.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_texture_waves.png -------------------------------------------------------------------------------- /examples/shaders/shaders_vertex_displacement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_vertex_displacement.png -------------------------------------------------------------------------------- /examples/shaders/shaders_view_depth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_view_depth.png -------------------------------------------------------------------------------- /examples/shaders/shaders_write_depth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shaders/shaders_write_depth.png -------------------------------------------------------------------------------- /examples/shapes/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/resources/.gitkeep -------------------------------------------------------------------------------- /examples/shapes/shapes_basic_shapes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_basic_shapes.png -------------------------------------------------------------------------------- /examples/shapes/shapes_bouncing_ball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_bouncing_ball.png -------------------------------------------------------------------------------- /examples/shapes/shapes_collision_area.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_collision_area.png -------------------------------------------------------------------------------- /examples/shapes/shapes_colors_palette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_colors_palette.png -------------------------------------------------------------------------------- /examples/shapes/shapes_draw_circle_sector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_draw_circle_sector.png -------------------------------------------------------------------------------- /examples/shapes/shapes_draw_rectangle_rounded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_draw_rectangle_rounded.png -------------------------------------------------------------------------------- /examples/shapes/shapes_draw_ring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_draw_ring.png -------------------------------------------------------------------------------- /examples/shapes/shapes_easings_ball_anim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_easings_ball_anim.png -------------------------------------------------------------------------------- /examples/shapes/shapes_easings_box_anim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_easings_box_anim.png -------------------------------------------------------------------------------- /examples/shapes/shapes_easings_rectangle_array.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_easings_rectangle_array.png -------------------------------------------------------------------------------- /examples/shapes/shapes_following_eyes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_following_eyes.png -------------------------------------------------------------------------------- /examples/shapes/shapes_lines_bezier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_lines_bezier.png -------------------------------------------------------------------------------- /examples/shapes/shapes_logo_raylib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_logo_raylib.png -------------------------------------------------------------------------------- /examples/shapes/shapes_logo_raylib_anim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_logo_raylib_anim.png -------------------------------------------------------------------------------- /examples/shapes/shapes_rectangle_advanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_rectangle_advanced.png -------------------------------------------------------------------------------- /examples/shapes/shapes_rectangle_scaling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_rectangle_scaling.png -------------------------------------------------------------------------------- /examples/shapes/shapes_splines_drawing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_splines_drawing.png -------------------------------------------------------------------------------- /examples/shapes/shapes_top_down_lights.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/shapes/shapes_top_down_lights.png -------------------------------------------------------------------------------- /examples/text/resources/DotGothic16-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/DotGothic16-Regular.ttf -------------------------------------------------------------------------------- /examples/text/resources/KAISG.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/KAISG.ttf -------------------------------------------------------------------------------- /examples/text/resources/anonymous_pro_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/anonymous_pro_bold.ttf -------------------------------------------------------------------------------- /examples/text/resources/custom_alagard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/custom_alagard.png -------------------------------------------------------------------------------- /examples/text/resources/custom_jupiter_crash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/custom_jupiter_crash.png -------------------------------------------------------------------------------- /examples/text/resources/custom_mecha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/custom_mecha.png -------------------------------------------------------------------------------- /examples/text/resources/dejavu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/dejavu.png -------------------------------------------------------------------------------- /examples/text/resources/fonts/alagard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/fonts/alagard.png -------------------------------------------------------------------------------- /examples/text/resources/fonts/alpha_beta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/fonts/alpha_beta.png -------------------------------------------------------------------------------- /examples/text/resources/fonts/jupiter_crash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/fonts/jupiter_crash.png -------------------------------------------------------------------------------- /examples/text/resources/fonts/mecha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/fonts/mecha.png -------------------------------------------------------------------------------- /examples/text/resources/fonts/pixantiqua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/fonts/pixantiqua.png -------------------------------------------------------------------------------- /examples/text/resources/fonts/pixelplay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/fonts/pixelplay.png -------------------------------------------------------------------------------- /examples/text/resources/fonts/romulus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/fonts/romulus.png -------------------------------------------------------------------------------- /examples/text/resources/fonts/setback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/fonts/setback.png -------------------------------------------------------------------------------- /examples/text/resources/noto_cjk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/noto_cjk.png -------------------------------------------------------------------------------- /examples/text/resources/pixantiqua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/pixantiqua.png -------------------------------------------------------------------------------- /examples/text/resources/pixantiqua.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/pixantiqua.ttf -------------------------------------------------------------------------------- /examples/text/resources/shaders/glsl100/alpha_discard.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform vec4 colDiffuse; 12 | 13 | void main() 14 | { 15 | vec4 texelColor = texture2D(texture0, fragTexCoord); 16 | 17 | if (texelColor.a == 0.0) discard; 18 | 19 | gl_FragColor = texelColor*fragColor*colDiffuse; 20 | } 21 | -------------------------------------------------------------------------------- /examples/text/resources/shaders/glsl100/sdf.fs: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | 5 | // Input vertex attributes (from vertex shader) 6 | varying vec2 fragTexCoord; 7 | varying vec4 fragColor; 8 | 9 | // Input uniform values 10 | uniform sampler2D texture0; 11 | uniform vec4 colDiffuse; 12 | 13 | // NOTE: Add your custom variables here 14 | const float smoothing = 1.0/16.0; 15 | 16 | void main() 17 | { 18 | // Texel color fetching from texture sampler 19 | // NOTE: Calculate alpha using signed distance field (SDF) 20 | float distance = texture2D(texture0, fragTexCoord).a; 21 | float alpha = smoothstep(0.5 - smoothing, 0.5 + smoothing, distance); 22 | 23 | // Calculate final fragment color 24 | gl_FragColor = vec4(fragColor.rgb, fragColor.a*alpha); 25 | } 26 | -------------------------------------------------------------------------------- /examples/text/resources/shaders/glsl330/alpha_discard.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // Output fragment color 12 | out vec4 finalColor; 13 | 14 | void main() 15 | { 16 | vec4 texelColor = texture(texture0, fragTexCoord); 17 | if (texelColor.a == 0.0) discard; 18 | finalColor = texelColor * fragColor * colDiffuse; 19 | } 20 | -------------------------------------------------------------------------------- /examples/text/resources/shaders/glsl330/sdf.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | // Input uniform values 8 | uniform sampler2D texture0; 9 | uniform vec4 colDiffuse; 10 | 11 | // Output fragment color 12 | out vec4 finalColor; 13 | 14 | // NOTE: Add your custom variables here 15 | 16 | void main() 17 | { 18 | // Texel color fetching from texture sampler 19 | // NOTE: Calculate alpha using signed distance field (SDF) 20 | float distanceFromOutline = texture(texture0, fragTexCoord).a - 0.5; 21 | float distanceChangePerFragment = length(vec2(dFdx(distanceFromOutline), dFdy(distanceFromOutline))); 22 | float alpha = smoothstep(-distanceChangePerFragment, distanceChangePerFragment, distanceFromOutline); 23 | 24 | // Calculate final fragment color 25 | finalColor = vec4(fragColor.rgb, fragColor.a*alpha); 26 | } 27 | -------------------------------------------------------------------------------- /examples/text/resources/symbola.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/resources/symbola.png -------------------------------------------------------------------------------- /examples/text/text_codepoints_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/text_codepoints_loading.png -------------------------------------------------------------------------------- /examples/text/text_draw_3d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/text_draw_3d.png -------------------------------------------------------------------------------- /examples/text/text_font_filters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/text_font_filters.png -------------------------------------------------------------------------------- /examples/text/text_font_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/text_font_loading.png -------------------------------------------------------------------------------- /examples/text/text_font_sdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/text_font_sdf.png -------------------------------------------------------------------------------- /examples/text/text_font_spritefont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/text_font_spritefont.png -------------------------------------------------------------------------------- /examples/text/text_format_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/text_format_text.png -------------------------------------------------------------------------------- /examples/text/text_input_box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/text_input_box.png -------------------------------------------------------------------------------- /examples/text/text_raylib_fonts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/text_raylib_fonts.png -------------------------------------------------------------------------------- /examples/text/text_rectangle_bounds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/text_rectangle_bounds.png -------------------------------------------------------------------------------- /examples/text/text_unicode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/text_unicode.png -------------------------------------------------------------------------------- /examples/text/text_writing_anim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/text/text_writing_anim.png -------------------------------------------------------------------------------- /examples/textures/resources/KAISG.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/KAISG.ttf -------------------------------------------------------------------------------- /examples/textures/resources/boom.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/boom.wav -------------------------------------------------------------------------------- /examples/textures/resources/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/button.png -------------------------------------------------------------------------------- /examples/textures/resources/buttonfx.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/buttonfx.wav -------------------------------------------------------------------------------- /examples/textures/resources/cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/cat.png -------------------------------------------------------------------------------- /examples/textures/resources/custom_jupiter_crash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/custom_jupiter_crash.png -------------------------------------------------------------------------------- /examples/textures/resources/cyberpunk_street_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/cyberpunk_street_background.png -------------------------------------------------------------------------------- /examples/textures/resources/cyberpunk_street_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/cyberpunk_street_foreground.png -------------------------------------------------------------------------------- /examples/textures/resources/cyberpunk_street_midground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/cyberpunk_street_midground.png -------------------------------------------------------------------------------- /examples/textures/resources/explosion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/explosion.png -------------------------------------------------------------------------------- /examples/textures/resources/fudesumi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/fudesumi.png -------------------------------------------------------------------------------- /examples/textures/resources/fudesumi.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/fudesumi.raw -------------------------------------------------------------------------------- /examples/textures/resources/ninepatch_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/ninepatch_button.png -------------------------------------------------------------------------------- /examples/textures/resources/parrots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/parrots.png -------------------------------------------------------------------------------- /examples/textures/resources/patterns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/patterns.png -------------------------------------------------------------------------------- /examples/textures/resources/raylib_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/raylib_logo.png -------------------------------------------------------------------------------- /examples/textures/resources/road.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/road.png -------------------------------------------------------------------------------- /examples/textures/resources/scarfy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/scarfy.png -------------------------------------------------------------------------------- /examples/textures/resources/scarfy_run.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/scarfy_run.gif -------------------------------------------------------------------------------- /examples/textures/resources/spark_flame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/spark_flame.png -------------------------------------------------------------------------------- /examples/textures/resources/wabbit_alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/resources/wabbit_alpha.png -------------------------------------------------------------------------------- /examples/textures/textures_background_scrolling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_background_scrolling.png -------------------------------------------------------------------------------- /examples/textures/textures_blend_modes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_blend_modes.png -------------------------------------------------------------------------------- /examples/textures/textures_bunnymark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_bunnymark.png -------------------------------------------------------------------------------- /examples/textures/textures_draw_tiled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_draw_tiled.png -------------------------------------------------------------------------------- /examples/textures/textures_fog_of_war.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_fog_of_war.png -------------------------------------------------------------------------------- /examples/textures/textures_gif_player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_gif_player.png -------------------------------------------------------------------------------- /examples/textures/textures_image_channel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_image_channel.png -------------------------------------------------------------------------------- /examples/textures/textures_image_drawing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_image_drawing.png -------------------------------------------------------------------------------- /examples/textures/textures_image_generation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_image_generation.png -------------------------------------------------------------------------------- /examples/textures/textures_image_kernel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_image_kernel.png -------------------------------------------------------------------------------- /examples/textures/textures_image_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_image_loading.png -------------------------------------------------------------------------------- /examples/textures/textures_image_processing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_image_processing.png -------------------------------------------------------------------------------- /examples/textures/textures_image_rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_image_rotate.png -------------------------------------------------------------------------------- /examples/textures/textures_image_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_image_text.png -------------------------------------------------------------------------------- /examples/textures/textures_logo_raylib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_logo_raylib.png -------------------------------------------------------------------------------- /examples/textures/textures_mouse_painting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_mouse_painting.png -------------------------------------------------------------------------------- /examples/textures/textures_npatch_drawing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_npatch_drawing.png -------------------------------------------------------------------------------- /examples/textures/textures_particles_blending.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_particles_blending.png -------------------------------------------------------------------------------- /examples/textures/textures_polygon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_polygon.png -------------------------------------------------------------------------------- /examples/textures/textures_raw_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_raw_data.png -------------------------------------------------------------------------------- /examples/textures/textures_sprite_anim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_sprite_anim.png -------------------------------------------------------------------------------- /examples/textures/textures_sprite_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_sprite_button.png -------------------------------------------------------------------------------- /examples/textures/textures_sprite_explosion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_sprite_explosion.png -------------------------------------------------------------------------------- /examples/textures/textures_srcrec_dstrec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_srcrec_dstrec.png -------------------------------------------------------------------------------- /examples/textures/textures_textured_curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_textured_curve.png -------------------------------------------------------------------------------- /examples/textures/textures_to_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/examples/textures/textures_to_image.png -------------------------------------------------------------------------------- /logo/raylib.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/logo/raylib.icns -------------------------------------------------------------------------------- /logo/raylib.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/logo/raylib.ico -------------------------------------------------------------------------------- /logo/raylib_1024x1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/logo/raylib_1024x1024.png -------------------------------------------------------------------------------- /logo/raylib_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/logo/raylib_128x128.png -------------------------------------------------------------------------------- /logo/raylib_144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/logo/raylib_144x144.png -------------------------------------------------------------------------------- /logo/raylib_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/logo/raylib_16x16.png -------------------------------------------------------------------------------- /logo/raylib_180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/logo/raylib_180x180.png -------------------------------------------------------------------------------- /logo/raylib_24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/logo/raylib_24x24.png -------------------------------------------------------------------------------- /logo/raylib_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/logo/raylib_256x256.png -------------------------------------------------------------------------------- /logo/raylib_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/logo/raylib_32x32.png -------------------------------------------------------------------------------- /logo/raylib_36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/logo/raylib_36x36.png -------------------------------------------------------------------------------- /logo/raylib_48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/logo/raylib_48x48.png -------------------------------------------------------------------------------- /logo/raylib_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/logo/raylib_512x512.png -------------------------------------------------------------------------------- /logo/raylib_64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/logo/raylib_64x64.png -------------------------------------------------------------------------------- /logo/raylib_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/logo/raylib_72x72.png -------------------------------------------------------------------------------- /logo/raylib_96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/logo/raylib_96x96.png -------------------------------------------------------------------------------- /logo/raylib_logo_animation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/logo/raylib_logo_animation.gif -------------------------------------------------------------------------------- /parser/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2021-2025 Ramon Santamaria (@raysan5) 2 | 3 | This software is provided "as-is", without any express or implied warranty. In no event 4 | will the authors be held liable for any damages arising from the use of this software. 5 | 6 | Permission is granted to anyone to use this software for any purpose, including commercial 7 | applications, and to alter it and redistribute it freely, subject to the following restrictions: 8 | 9 | 1. The origin of this software must not be misrepresented; you must not claim that you 10 | wrote the original software. If you use this software in a product, an acknowledgment 11 | in the product documentation would be appreciated but is not required. 12 | 13 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented 14 | as being the original software. 15 | 16 | 3. This notice may not be removed or altered from any source distribution. 17 | -------------------------------------------------------------------------------- /projects/4coder/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "raylib.h" 3 | 4 | int main() { 5 | int screenWidth = 800; 6 | int screenHeight = 450; 7 | 8 | InitWindow(screenWidth, screenHeight, "raylib"); 9 | 10 | Camera cam; 11 | cam.position = (Vector3){ 0.0f, 10.0f, 8.f }; 12 | cam.target = (Vector3){ 0.0f, 0.0f, 0.0f }; 13 | cam.up = (Vector3){ 0.0f, 1.f, 0.0f }; 14 | cam.fovy = 60.0f; 15 | 16 | Vector3 cubePos = { 0.0f, 0.0f, 0.0f }; 17 | 18 | SetTargetFPS(60); 19 | 20 | while (!WindowShouldClose()) { 21 | cam.position.x = sin(GetTime()) * 10.0f; 22 | cam.position.z = cos(GetTime()) * 10.0f; 23 | 24 | BeginDrawing(); 25 | ClearBackground(RAYWHITE); 26 | BeginMode3D(cam); 27 | DrawCube(cubePos, 2.f, 2.f, 2.f, RED); 28 | DrawCubeWires(cubePos, 2.f, 2.f, 2.f, MAROON); 29 | DrawGrid(10, 1.f); 30 | EndMode3D(); 31 | DrawText("This is a raylib example", 10, 40, 20, DARKGRAY); 32 | DrawFPS(10, 10); 33 | EndDrawing(); 34 | } 35 | 36 | CloseWindow(); 37 | return 0; 38 | } -------------------------------------------------------------------------------- /projects/Builder/README.md: -------------------------------------------------------------------------------- 1 | # Builder project template 2 | 3 | This is a project template to be used with [GNOME Builder](https://raw.githubusercontent.com/jubalh/raymario/master/meson.build). 4 | It uses the [meson](https://raw.githubusercontent.com/jubalh/raymario/master/meson.build) build system. 5 | 6 | Project can be compiled via the command line using: 7 | ``` 8 | meson build 9 | cd build 10 | ninja 11 | ninja install 12 | ``` 13 | 14 | Or it can be opened with Building simply clicking on the `meson.build` file. 15 | Alternatively, open Builder first and click on the `open` button at the top-left. 16 | 17 | There are comments to the `meson.build` file to note the values that should be edited. 18 | For a full overview of options please check the [meson manual](http://mesonbuild.com/Manual.html). 19 | 20 | In the provided file, it's assumed that the build file is located at the root folder of the project, and that all the sources are in a `src` subfolder. 21 | 22 | Check out the `examples` directory for a simple example on how to use this template. 23 | 24 | You can also look at [raymario](https://github.com/jubalh/raymario) for a slightly more complex example which also installs resource files. 25 | -------------------------------------------------------------------------------- /projects/Builder/examples/README.md: -------------------------------------------------------------------------------- 1 | Open `meson.build` with Builder or run `meson build; cd build; ninja; ./core_basic_window` on the commandline to launch the example. 2 | -------------------------------------------------------------------------------- /projects/Builder/examples/meson.build: -------------------------------------------------------------------------------- 1 | # This file should be in the main folder of your project 2 | 3 | # Replace 'projectname' with the name of your project 4 | # Replace '1.0' with its version 5 | project('core_basic_window', 'c', version: '1.0', 6 | meson_version: '>= 0.39.1') 7 | 8 | # We want a C Compiler to be present 9 | cc = meson.get_compiler('c') 10 | 11 | # Find dependencies 12 | gl_dep = dependency('gl') 13 | m_dep = cc.find_library('m', required : false) 14 | raylib_dep = cc.find_library('raylib', required : false) 15 | 16 | # List your source files here 17 | source_c = [ 18 | '../../../examples/core/core_basic_window.c', 19 | ] 20 | 21 | # Build executable 22 | core_basic_window = executable('core_basic_window', 23 | source_c, 24 | dependencies : [ raylib_dep, gl_dep, m_dep ], 25 | install : true) 26 | -------------------------------------------------------------------------------- /projects/Builder/meson.build: -------------------------------------------------------------------------------- 1 | # This file should be in the main folder of your project 2 | 3 | # Replace 'projectname' with the name of your project 4 | # Replace '1.0' with its version 5 | project('projectname', 'c', version: '1.0', 6 | meson_version: '>= 0.39.1') 7 | 8 | # We want a C Compiler to be present 9 | cc = meson.get_compiler('c') 10 | 11 | # Find dependencies 12 | gl_dep = dependency('gl') 13 | m_dep = cc.find_library('m', required : false) 14 | raylib_dep = cc.find_library('raylib', required : false) 15 | 16 | # List your source files here 17 | source_c = [ 18 | 'src/main.c', 19 | ] 20 | 21 | # Build executable 22 | projectname = executable('projectname', 23 | source_c, 24 | dependencies : [ raylib_dep, gl_dep, m_dep ], 25 | install : true) 26 | -------------------------------------------------------------------------------- /projects/CMake/README.md: -------------------------------------------------------------------------------- 1 | # raylib CMake Project 2 | 3 | This provides a base project template which builds with [CMake](https://cmake.org). 4 | 5 | ## Usage 6 | 7 | To compile the example, use one of the following dependending on your build target... 8 | 9 | ### Desktop 10 | 11 | Use the following to build for desktop: 12 | 13 | ``` bash 14 | cmake -B build 15 | cmake --build build 16 | ``` 17 | 18 | ### Web 19 | 20 | Compiling for the web requires the [Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html): 21 | 22 | ``` bash 23 | mkdir build 24 | cd build 25 | emcmake cmake .. -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXECUTABLE_SUFFIX=".html" 26 | emmake make 27 | ``` 28 | -------------------------------------------------------------------------------- /projects/CodeBlocks/README.md: -------------------------------------------------------------------------------- 1 | # raylib template for Code::Blocks 2 | 3 | 1. Install raylib. 4 | 5 | On Windows you should install the **Windows Installer (with MinGW compiler)** package. 6 | On other platforms you can install however you like following the instructions in the wiki. 7 | 8 | * https://github.com/raysan5/raylib/releases/download/4.2.0/raylib_installer_v420.mingw.exe 9 | * https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux 10 | * https://github.com/raysan5/raylib/wiki/Working-on-macOS 11 | 12 | 2. Install and run Code::Blocks. 13 | 14 | 3. **Windows only**: Select `Settings` `Compiler` `Toolchain executables`. 15 | Change `Compiler's installation directory` to `C:\raylib\MingGW`. Do *not* press auto-detect. 16 | There is a screenshot below showing how it should look. Press `OK`. 17 | 18 | 4. Select `File` `Open` and open the `core_basic_windows.cbp` file. 19 | 20 | ![Compiler Settings](compiler_settings.png) 21 | 22 | For an example with resources, see https://github.com/electronstudio/raylib-game-template-codeblocks -------------------------------------------------------------------------------- /projects/CodeBlocks/compiler_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/projects/CodeBlocks/compiler_settings.png -------------------------------------------------------------------------------- /projects/Geany/raylib_compile_execute.bat: -------------------------------------------------------------------------------- 1 | ::@echo off 2 | :: > Setup required Environment 3 | :: ------------------------------------- 4 | set RAYLIB_DIR=C:\raylib 5 | set COMPILER_DIR=C:\raylib\mingw\bin 6 | set PATH=%PATH%;%COMPILER_DIR% 7 | set FILE_NAME=%1 8 | set NAME_PART=%FILE_NAME:~0,-2% 9 | cd %~dp0 10 | :: . 11 | :: > Cleaning latest build 12 | :: --------------------------- 13 | cmd /c if exist %NAME_PART%.exe del /F %NAME_PART%.exe 14 | :: . 15 | :: > Compiling program 16 | :: -------------------------- 17 | gcc -o %NAME_PART%.exe %FILE_NAME% %RAYLIB_DIR%\src\raylib.rc.data -s -O2 -I../../src -Iexternal -lraylib -lopengl32 -lgdi32 -lwinmm -std=c99 -Wall -mwindows 18 | :: . 19 | :: . > Executing program 20 | :: ------------------------- 21 | cmd /c if exist %NAME_PART%.exe %NAME_PART%.exe -------------------------------------------------------------------------------- /projects/Geany/raylib_project.geany: -------------------------------------------------------------------------------- 1 | [editor] 2 | line_wrapping=false 3 | line_break_column=72 4 | auto_continue_multiline=true 5 | 6 | [file_prefs] 7 | final_new_line=true 8 | ensure_convert_new_lines=false 9 | strip_trailing_spaces=false 10 | replace_tabs=true 11 | 12 | [indentation] 13 | indent_width=4 14 | indent_type=0 15 | indent_hard_tab_width=8 16 | detect_indent=false 17 | detect_indent_width=false 18 | indent_mode=2 19 | 20 | [project] 21 | name=raylib_project 22 | base_path=./ 23 | description=raylib project template 24 | file_patterns= 25 | 26 | [long line marker] 27 | long_line_behaviour=1 28 | long_line_column=72 29 | 30 | [files] 31 | current_page=0 32 | FILE_NAME_0=0;C;0;EUTF-8;1;1;0;C%3A%5CGitHub%5Craylib%5Cprojects%5CGeany%5Ccore_basic_window.c;0;4 33 | 34 | [build-menu] 35 | filetypes=C; 36 | EX_00_LB=_Execute 37 | EX_00_CM="./%e" 38 | EX_00_WD= 39 | CFT_00_LB=_Compile 40 | CFT_00_CM=raylib_compile_execute.bat %f 41 | CFT_00_WD= 42 | -------------------------------------------------------------------------------- /projects/Notepad++/README.md: -------------------------------------------------------------------------------- 1 | ### Notepad++ raylib config files 2 | 3 | This folder includes some useful files to config Notepad++ for raylib. 4 | 5 | #### raylib functions autocomplete - c_raylib.xml 6 | 7 | Autocomplete information for Notepad++. The contents of this file should be copied inside raylib\Notepad++\plugins\APIs\c.xml file. 8 | 9 | This file has been automatically generated using the provided tool: `raylib_npp_parser` 10 | 11 | This simple tool basically parses raylib.h header for functions starting by RLAPI, extracts all required information and generates de Notepad++ autocomplete XML equivalent. 12 | 13 | To use the tool, just drag and drop raylib.h over raylib_npp_parser program. 14 | 15 | #### Notepad++ NppExec compilation scripts - npes_saved.txt 16 | 17 | A series of scripts for Notepad++ NppExec plugin to compile raylib library and examples. 18 | 19 | 20 | -------------------------------------------------------------------------------- /projects/Notepad++/npes_saved_mingw.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/projects/Notepad++/npes_saved_mingw.txt -------------------------------------------------------------------------------- /projects/Notepad++/npes_saved_tcc.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/projects/Notepad++/npes_saved_tcc.txt -------------------------------------------------------------------------------- /projects/Notepad++/npes_saved_w64devkit.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/projects/Notepad++/npes_saved_w64devkit.txt -------------------------------------------------------------------------------- /projects/Notepad++/npes_saved_zig.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/projects/Notepad++/npes_saved_zig.txt -------------------------------------------------------------------------------- /projects/Notepad++/raylib_npp_parser/raylib_npp.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/projects/Notepad++/raylib_npp_parser/raylib_npp.xml -------------------------------------------------------------------------------- /projects/README.md: -------------------------------------------------------------------------------- 1 | ## raylib PROJECT TEMPLATES 2 | 3 | This folder contains raylib templates for some common IDEs. 4 | 5 | IDE | Platform(s) | Source | Example(s) 6 | ----| ------------| :-------: | :-----: 7 | [4coder](http://4coder.net/) | Windows | ❌ | ✔️ 8 | [Builder](https://wiki.gnome.org/Apps/Builder) | Linux | ❌ | ✔️ 9 | [CMake](https://cmake.org/) | Windows, Linux, macOS, Web | ✔️ | ✔️ 10 | [CodeBlocks](http://www.codeblocks.org/) | Windows, Linux, macOS | ❌ | ✔️ 11 | [Geany](https://www.geany.org/) | Windows, Linux | ✔️ | ✔️ 12 | [Notepad++](https://notepad-plus-plus.org/) | Windows | ✔️ | ✔️ 13 | [SublimeText](https://www.sublimetext.com/) | Windows, Linux, macOS | ✔️ | ✔️ 14 | [VS2019](https://www.visualstudio.com) | Windows | ✔️ | ✔️ 15 | [VSCode](https://code.visualstudio.com/) | Windows, macOS | ❌ | ✔️ 16 | scripts | Windows, Linux, macOS | ✔️ | ✔️ 17 | 18 | *New IDEs config files are welcome!* 19 | -------------------------------------------------------------------------------- /projects/SublimeText/README.md: -------------------------------------------------------------------------------- 1 | # Sublime Text 3 project template 2 | 3 | This is a project template to be used with [Sublime Text 3](https://www.sublimetext.com/). 4 | 5 | Simply click on the `raylib.sublime-project` file to open it with Sublime Text. 6 | Alternatively you can open Sublime Text first and click on the `Project -> Open Project`. 7 | 8 | It comes with raylib.sublime-build. This file needs to be copied into the sublime packages folder for the user. On windows it can be found in `%AppData%\Sublime Text 3\Packages\User`. 9 | 10 | Once done open the project and select `Tools -> Build System -> raylib`. 11 | To run press Ctrl + Shift + B and select which build you want to run. 12 | 13 | For a full overview of build systems please check the [build systems guide](https://www.sublimetext.com/docs/3/build_systems.html). 14 | -------------------------------------------------------------------------------- /projects/SublimeText/raylib.sublime-build: -------------------------------------------------------------------------------- 1 | { 2 | "variants": [ 3 | { 4 | "name": "desktop", 5 | "shell_cmd": "cd ${folder}\\src && mingw32-make PLATFORM=PLATFORM_DESKTOP" 6 | }, 7 | 8 | { 9 | "name": "examples", 10 | "shell_cmd": "cd ${folder}\\examples && mingw32-make PLATFORM=PLATFORM_DESKTOP" 11 | }, 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /projects/SublimeText/raylib.sublime-project: -------------------------------------------------------------------------------- 1 | { 2 | "folders": 3 | [ 4 | { 5 | "path": "../../" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/raylib_android.NativeActivity.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/raylib_android.NativeActivity.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /projects/VS2019-Android/raylib_android/raylib_android.Packaging/project.properties: -------------------------------------------------------------------------------- 1 | # Project target 2 | target=$(androidapilevel) 3 | # Provide path to the directory where prebuilt external jar files are by setting jar.libs.dir= 4 | -------------------------------------------------------------------------------- /projects/VS2019-Android/raylib_android/raylib_android.Packaging/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | raylib_android.Packaging 4 | 5 | -------------------------------------------------------------------------------- /projects/VSCode/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": { 3 | "**/.git": true, 4 | "**/.svn": true, 5 | "**/.hg": true, 6 | "**/CVS": true, 7 | "**/.DS_Store": true, 8 | "**/*.o": true, 9 | "**/*.exe": true, 10 | } 11 | } -------------------------------------------------------------------------------- /projects/VSCode/main.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | } 6 | ], 7 | "settings": { 8 | "files.associations": { 9 | "raylib.h": "c", 10 | "math.h": "c", 11 | "blocks.h": "c", 12 | "stdio.h": "c", 13 | "*.m": "c" 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /projects/VSCode/resources/LICENSE: -------------------------------------------------------------------------------- 1 | Assets license. 2 | -------------------------------------------------------------------------------- /raylib.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=@libdir_for_pc_file@ 4 | includedir=@includedir_for_pc_file@ 5 | 6 | Name: raylib 7 | Description: A simple and easy-to-use library to enjoy videogames programming 8 | URL: https://github.com/raysan5/raylib 9 | Version: @PROJECT_VERSION@ 10 | Libs: -L"${libdir}" -lraylib @PKG_CONFIG_LIBS_EXTRA@ 11 | Libs.private: @PKG_CONFIG_LIBS_PRIVATE@ 12 | Requires.private: @GLFW_PKG_DEPS@ 13 | Cflags: -I"${includedir}" 14 | -------------------------------------------------------------------------------- /src/external/glfw/.mailmap: -------------------------------------------------------------------------------- 1 | Camilla Löwy 2 | Camilla Löwy 3 | Camilla Löwy 4 | 5 | Emmanuel Gil Peyrot 6 | 7 | Marcus Geelnard 8 | Marcus Geelnard 9 | Marcus Geelnard 10 | 11 | -------------------------------------------------------------------------------- /src/external/glfw/CMake/cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | 2 | if (NOT EXISTS "@GLFW_BINARY_DIR@/install_manifest.txt") 3 | message(FATAL_ERROR "Cannot find install manifest: \"@GLFW_BINARY_DIR@/install_manifest.txt\"") 4 | endif() 5 | 6 | file(READ "@GLFW_BINARY_DIR@/install_manifest.txt" files) 7 | string(REGEX REPLACE "\n" ";" files "${files}") 8 | 9 | foreach (file ${files}) 10 | message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 11 | if (EXISTS "$ENV{DESTDIR}${file}") 12 | exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 13 | OUTPUT_VARIABLE rm_out 14 | RETURN_VALUE rm_retval) 15 | if (NOT "${rm_retval}" STREQUAL 0) 16 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 17 | endif() 18 | elseif (IS_SYMLINK "$ENV{DESTDIR}${file}") 19 | EXEC_PROGRAM("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 20 | OUTPUT_VARIABLE rm_out 21 | RETURN_VALUE rm_retval) 22 | if (NOT "${rm_retval}" STREQUAL 0) 23 | message(FATAL_ERROR "Problem when removing symlink \"$ENV{DESTDIR}${file}\"") 24 | endif() 25 | else() 26 | message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") 27 | endif() 28 | endforeach() 29 | 30 | -------------------------------------------------------------------------------- /src/external/glfw/CMake/glfw3.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 4 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 5 | 6 | Name: GLFW 7 | Description: A multi-platform library for OpenGL, window and input 8 | Version: @GLFW_VERSION@ 9 | URL: https://www.glfw.org/ 10 | Requires.private: @GLFW_PKG_CONFIG_REQUIRES_PRIVATE@ 11 | Libs: -L${libdir} -l@GLFW_LIB_NAME@@GLFW_LIB_NAME_SUFFIX@ 12 | Libs.private: @GLFW_PKG_CONFIG_LIBS_PRIVATE@ 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /src/external/glfw/CMake/glfw3Config.cmake.in: -------------------------------------------------------------------------------- 1 | include(CMakeFindDependencyMacro) 2 | find_dependency(Threads) 3 | include("${CMAKE_CURRENT_LIST_DIR}/glfw3Targets.cmake") 4 | -------------------------------------------------------------------------------- /src/external/glfw/CMake/i686-w64-mingw32-clang.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross-compiling with 32-bit MinGW-w64 Clang 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "i686-w64-mingw32-clang") 5 | SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-clang++") 6 | SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /src/external/glfw/CMake/i686-w64-mingw32.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross-compiling with 32-bit MinGW-w64 GCC 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "i686-w64-mingw32-gcc") 5 | SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-g++") 6 | SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /src/external/glfw/CMake/modules/FindEpollShim.cmake: -------------------------------------------------------------------------------- 1 | # Find EpollShim 2 | # Once done, this will define 3 | # 4 | # EPOLLSHIM_FOUND - System has EpollShim 5 | # EPOLLSHIM_INCLUDE_DIRS - The EpollShim include directories 6 | # EPOLLSHIM_LIBRARIES - The libraries needed to use EpollShim 7 | 8 | find_path(EPOLLSHIM_INCLUDE_DIRS NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim) 9 | find_library(EPOLLSHIM_LIBRARIES NAMES epoll-shim libepoll-shim HINTS /usr/local/lib) 10 | 11 | if (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES) 12 | set(EPOLLSHIM_FOUND TRUE) 13 | endif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES) 14 | 15 | include(FindPackageHandleStandardArgs) 16 | find_package_handle_standard_args(EpollShim DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS) 17 | mark_as_advanced(EPOLLSHIM_INCLUDE_DIRS EPOLLSHIM_LIBRARIES) 18 | -------------------------------------------------------------------------------- /src/external/glfw/CMake/modules/FindOSMesa.cmake: -------------------------------------------------------------------------------- 1 | # Try to find OSMesa on a Unix system 2 | # 3 | # This will define: 4 | # 5 | # OSMESA_LIBRARIES - Link these to use OSMesa 6 | # OSMESA_INCLUDE_DIR - Include directory for OSMesa 7 | # 8 | # Copyright (c) 2014 Brandon Schaefer 9 | 10 | if (NOT WIN32) 11 | 12 | find_package (PkgConfig) 13 | pkg_check_modules (PKG_OSMESA QUIET osmesa) 14 | 15 | set (OSMESA_INCLUDE_DIR ${PKG_OSMESA_INCLUDE_DIRS}) 16 | set (OSMESA_LIBRARIES ${PKG_OSMESA_LIBRARIES}) 17 | 18 | endif () 19 | -------------------------------------------------------------------------------- /src/external/glfw/CMake/x86_64-w64-mingw32-clang.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross-compiling with 64-bit MinGW-w64 Clang 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-clang") 5 | SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-clang++") 6 | SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /src/external/glfw/CMake/x86_64-w64-mingw32.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross-compiling with 64-bit MinGW-w64 GCC 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-gcc") 5 | SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-g++") 6 | SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /src/external/glfw/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002-2006 Marcus Geelnard 2 | 3 | Copyright (c) 2006-2019 Camilla Löwy 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would 16 | be appreciated but is not required. 17 | 18 | 2. Altered source versions must be plainly marked as such, and must not 19 | be misrepresented as being the original software. 20 | 21 | 3. This notice may not be removed or altered from any source 22 | distribution. 23 | 24 | -------------------------------------------------------------------------------- /src/external/glfw/README.md: -------------------------------------------------------------------------------- 1 | # GLFW (modified for raylib) 2 | 3 | This directory contains a modification of GLFW, whose official website and 4 | upstream repository are https://glfw.org and https://github.com/glfw/glfw, 5 | respectively. 6 | 7 | In this modification, some static functions sharing the same name in different 8 | platforms have been renamed so all of GLFW's source files can be combined into 9 | one (as done by ``rglfw.c``). Also, the Null platform, which is not used by 10 | raylib, has been disabled. The renamed functions are: 11 | 12 | `` 13 | createKeyTables() 14 | translateKey() 15 | acquireMonitor() 16 | releaseMonitor() 17 | `` 18 | 19 | -------------------------------------------------------------------------------- /src/external/glfw/src/glfw.rc.in: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | VS_VERSION_INFO VERSIONINFO 5 | FILEVERSION @GLFW_VERSION_MAJOR@,@GLFW_VERSION_MINOR@,@GLFW_VERSION_PATCH@,0 6 | PRODUCTVERSION @GLFW_VERSION_MAJOR@,@GLFW_VERSION_MINOR@,@GLFW_VERSION_PATCH@,0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_NT_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 12 | { 13 | BLOCK "StringFileInfo" 14 | { 15 | BLOCK "040904B0" 16 | { 17 | VALUE "CompanyName", "GLFW" 18 | VALUE "FileDescription", "GLFW @GLFW_VERSION@ DLL" 19 | VALUE "FileVersion", "@GLFW_VERSION@" 20 | VALUE "OriginalFilename", "glfw3.dll" 21 | VALUE "ProductName", "GLFW" 22 | VALUE "ProductVersion", "@GLFW_VERSION@" 23 | } 24 | } 25 | BLOCK "VarFileInfo" 26 | { 27 | VALUE "Translation", 0x409, 1200 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/raylib.dll.rc: -------------------------------------------------------------------------------- 1 | GLFW_ICON ICON "raylib.ico" 2 | 3 | 1 VERSIONINFO 4 | FILEVERSION 5,5,0,0 5 | PRODUCTVERSION 5,5,0,0 6 | BEGIN 7 | BLOCK "StringFileInfo" 8 | BEGIN 9 | //BLOCK "080904E4" // English UK 10 | BLOCK "040904E4" // English US 11 | BEGIN 12 | VALUE "CompanyName", "raylib technologies" 13 | VALUE "FileDescription", "raylib dynamic library (www.raylib.com)" 14 | VALUE "FileVersion", "5.5.0" 15 | VALUE "InternalName", "raylib.dll" 16 | VALUE "LegalCopyright", "(c) 2025 Ramon Santamaria (@raysan5)" 17 | VALUE "OriginalFilename", "raylib.dll" 18 | VALUE "ProductName", "raylib" 19 | VALUE "ProductVersion", "5.5.0" 20 | END 21 | END 22 | BLOCK "VarFileInfo" 23 | BEGIN 24 | //VALUE "Translation", 0x809, 1252 // English UK 25 | VALUE "Translation", 0x409, 1252 // English US 26 | END 27 | END 28 | -------------------------------------------------------------------------------- /src/raylib.dll.rc.data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/src/raylib.dll.rc.data -------------------------------------------------------------------------------- /src/raylib.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/src/raylib.ico -------------------------------------------------------------------------------- /src/raylib.rc: -------------------------------------------------------------------------------- 1 | GLFW_ICON ICON "raylib.ico" 2 | 3 | 1 VERSIONINFO 4 | FILEVERSION 5,5,0,0 5 | PRODUCTVERSION 5,5,0,0 6 | BEGIN 7 | BLOCK "StringFileInfo" 8 | BEGIN 9 | //BLOCK "080904E4" // English UK 10 | BLOCK "040904E4" // English US 11 | BEGIN 12 | VALUE "CompanyName", "raylib technologies" 13 | VALUE "FileDescription", "raylib application (www.raylib.com)" 14 | VALUE "FileVersion", "5.5.0" 15 | VALUE "InternalName", "raylib" 16 | VALUE "LegalCopyright", "(c) 2025 Ramon Santamaria (@raysan5)" 17 | VALUE "OriginalFilename", "raylib" 18 | VALUE "ProductName", "raylib app" 19 | VALUE "ProductVersion", "5.5.0" 20 | END 21 | END 22 | BLOCK "VarFileInfo" 23 | BEGIN 24 | //VALUE "Translation", 0x809, 1252 // English UK 25 | VALUE "Translation", 0x409, 1252 // English US 26 | END 27 | END 28 | -------------------------------------------------------------------------------- /src/raylib.rc.data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raysan5/raylib/924c87db33bded97e244ebd289650896418032ad/src/raylib.rc.data --------------------------------------------------------------------------------