6 Комити

Аутор SHA1 Порука Датум
  Ray 2878f7db22 Create examples_report.md пре 3 недеља
  Ray 8bc1d62e88 REXM: Added legend info to report пре 3 недеља
  Ray 59546eb54a REXM: Support examples data `validation` and **report generation** пре 3 недеља
  Ray c95fd5a803 REXM: Support paths customization with environment variables пре 3 недеља
  Ray c3cad65d30 Update examples_list.txt пре 3 недеља
  Ray 095319602c REVIEWED: Compule for OpenGL 1.1 #5088 пре 3 недеља
4 измењених фајлова са 479 додато и 206 уклоњено
  1. +87
    -87
      examples/examples_list.txt
  2. +27
    -21
      src/rlgl.h
  3. +180
    -0
      tools/rexm/examples_report.md
  4. +185
    -98
      tools/rexm/rexm.c

+ 87
- 87
examples/examples_list.txt Прегледај датотеку

@ -7,130 +7,130 @@
#
# WARNING: List is not ordered by example name but by the display order on web
#
core;core_basic_window;⭐️☆☆☆;1.0;1.0;"Ray";@raysan5
core;core_input_keys;⭐️☆☆☆;1.0;1.0;"Ray";@raysan5
core;core_input_mouse;⭐️☆☆☆;1.0;5.5;"Ray";@raysan5
core;core_input_mouse_wheel;⭐️☆☆☆;1.1;1.3;"Ray";@raysan5
core;core_input_gamepad;⭐️☆☆☆;1.1;4.2;"Ray";@raysan5
core;core_basic_window;⭐️☆☆☆;1.0;1.0;"Ramon Santamaria";@raysan5
core;core_input_keys;⭐️☆☆☆;1.0;1.0;"Ramon Santamaria";@raysan5
core;core_input_mouse;⭐️☆☆☆;1.0;5.5;"Ramon Santamaria";@raysan5
core;core_input_mouse_wheel;⭐️☆☆☆;1.1;1.3;"Ramon Santamaria";@raysan5
core;core_input_gamepad;⭐️☆☆☆;1.1;4.2;"Ramon Santamaria";@raysan5
core;core_input_multitouch;⭐️☆☆☆;2.1;2.5;"Berni";@Berni8k
core;core_input_gestures;⭐️⭐️☆☆;1.4;4.2;"Ray";@raysan5
core;core_input_gestures;⭐️⭐️☆☆;1.4;4.2;"Ramon Santamaria";@raysan5
core;core_input_virtual_controls;⭐️⭐️☆☆;5.0;5.0;"oblerion";@oblerion
core;core_2d_camera;⭐️⭐️☆☆;1.5;3.0;"Ray";@raysan5
core;core_2d_camera;⭐️⭐️☆☆;1.5;3.0;"Ramon Santamaria";@raysan5
core;core_2d_camera_mouse_zoom;⭐️⭐️☆☆;4.2;4.2;"Jeffery Myers";@JeffM2501
core;core_2d_camera_platformer;⭐️⭐️⭐️☆;2.5;3.0;"arvyy";@arvyy
core;core_2d_camera_split_screen;⭐️⭐️⭐️⭐️;4.5;4.5;"Gabriel dos Santos Sanches";@gabrielssanches
core;core_3d_camera_mode;⭐️☆☆☆;1.0;1.0;"Ray";@raysan5
core;core_3d_camera_free;⭐️☆☆☆;1.3;1.3;"Ray";@raysan5
core;core_3d_camera_first_person;⭐️⭐️☆☆;1.3;1.3;"Ray";@raysan5
core;core_3d_camera_mode;⭐️☆☆☆;1.0;1.0;"Ramon Santamaria";@raysan5
core;core_3d_camera_free;⭐️☆☆☆;1.3;1.3;"Ramon Santamaria";@raysan5
core;core_3d_camera_first_person;⭐️⭐️☆☆;1.3;1.3;"Ramon Santamaria";@raysan5
core;core_3d_camera_split_screen;⭐️⭐️⭐️☆;3.7;4.0;"Jeffery Myers";@JeffM2501
core;core_3d_picking;⭐️⭐️☆☆;1.3;4.0;"Ray";@raysan5
core;core_world_screen;⭐️⭐️☆☆;1.3;1.4;"Ray";@raysan5
core;core_3d_picking;⭐️⭐️☆☆;1.3;4.0;"Ramon Santamaria";@raysan5
core;core_world_screen;⭐️⭐️☆☆;1.3;1.4;"Ramon Santamaria";@raysan5
core;core_custom_logging;⭐️⭐️⭐️☆;2.5;2.5;"Pablo Marcos Oltra";@pamarcos
core;core_window_flags;⭐️⭐️⭐️☆;3.5;3.5;"Ray";@raysan5
core;core_window_flags;⭐️⭐️⭐️☆;3.5;3.5;"Ramon Santamaria";@raysan5
core;core_window_letterbox;⭐️⭐️☆☆;2.5;4.0;"Anata";@anatagawa
core;core_window_should_close;⭐️☆☆☆;4.2;4.2;"Ray";@raysan5
core;core_drop_files;⭐️⭐️☆☆;1.3;4.2;"Ray";@raysan5
core;core_random_values;⭐️☆☆☆;1.1;1.1;"Ray";@raysan5
core;core_storage_values;⭐️⭐️☆☆;1.4;4.2;"Ray";@raysan5
core;core_vr_simulator;⭐️⭐️⭐️☆;2.5;4.0;"Ray";@raysan5
core;core_loading_thread;⭐️⭐️⭐️☆;2.5;3.0;"Ray";@raysan5
core;core_window_should_close;⭐️☆☆☆;4.2;4.2;"Ramon Santamaria";@raysan5
core;core_drop_files;⭐️⭐️☆☆;1.3;4.2;"Ramon Santamaria";@raysan5
core;core_random_values;⭐️☆☆☆;1.1;1.1;"Ramon Santamaria";@raysan5
core;core_storage_values;⭐️⭐️☆☆;1.4;4.2;"Ramon Santamaria";@raysan5
core;core_vr_simulator;⭐️⭐️⭐️☆;2.5;4.0;"Ramon Santamaria";@raysan5
core;core_loading_thread;⭐️⭐️⭐️☆;2.5;3.0;"Ramon Santamaria";@raysan5
core;core_scissor_test;⭐️☆☆☆;2.5;3.0;"Chris Dill";@MysteriousSpace
core;core_basic_screen_manager;⭐️☆☆☆;4.0;4.0;"Ray";@raysan5
core;core_custom_frame_control;⭐️⭐️⭐️⭐️;4.0;4.0;"Ray";@raysan5
core;core_basic_screen_manager;⭐️☆☆☆;4.0;4.0;"Ramon Santamaria";@raysan5
core;core_custom_frame_control;⭐️⭐️⭐️⭐️;4.0;4.0;"Ramon Santamaria";@raysan5
core;core_smooth_pixelperfect;⭐️⭐️⭐️☆;3.7;4.0;"Giancamillo Alessandroni";@NotManyIdeasDev
core;core_random_sequence;⭐️☆☆☆;5.0;5.0;"Dalton Overmyer";@REDl3east
core;core_basic_window_web;⭐️☆☆☆;1.3;1.3;"Ray";@raysan5
core;core_basic_window_web;⭐️☆☆☆;1.3;1.3;"Ramon Santamaria";@raysan5
core;core_input_gestures_web;⭐️⭐️☆☆;4.6-dev;4.6-dev;"ubkp";@ubkp
core;core_automation_events;⭐️⭐️⭐️☆;5.0;5.0;"Ray";@raysan5
core;core_automation_events;⭐️⭐️⭐️☆;5.0;5.0;"Ramon Santamaria";@raysan5
core;core_high_dpi;⭐️☆☆☆;5.0;5.0;"Jonathan Marler";@marler8997
shapes;shapes_basic_shapes;⭐️☆☆☆;1.0;4.2;"Ray";@raysan5
shapes;shapes_bouncing_ball;⭐️☆☆☆;2.5;2.5;"Ray";@raysan5
shapes;shapes_colors_palette;⭐️⭐️☆☆;1.0;2.5;"Ray";@raysan5
shapes;shapes_logo_raylib;⭐️☆☆☆;1.0;1.0;"Ray";@raysan5
shapes;shapes_logo_raylib_anim;⭐️⭐️☆☆;2.5;4.0;"Ray";@raysan5
shapes;shapes_basic_shapes;⭐️☆☆☆;1.0;4.2;"Ramon Santamaria";@raysan5
shapes;shapes_bouncing_ball;⭐️☆☆☆;2.5;2.5;"Ramon Santamaria";@raysan5
shapes;shapes_colors_palette;⭐️⭐️☆☆;1.0;2.5;"Ramon Santamaria";@raysan5
shapes;shapes_logo_raylib;⭐️☆☆☆;1.0;1.0;"Ramon Santamaria";@raysan5
shapes;shapes_logo_raylib_anim;⭐️⭐️☆☆;2.5;4.0;"Ramon Santamaria";@raysan5
shapes;shapes_rectangle_scaling;⭐️⭐️☆☆;2.5;2.5;"Vlad Adrian";@demizdor
shapes;shapes_lines_bezier;⭐️☆☆☆;1.7;1.7;"Ray";@raysan5
shapes;shapes_collision_area;⭐️⭐️☆☆;2.5;2.5;"Ray";@raysan5
shapes;shapes_following_eyes;⭐️⭐️☆☆;2.5;2.5;"Ray";@raysan5
shapes;shapes_easings_ball_anim;⭐️⭐️☆☆;2.5;2.5;"Ray";@raysan5
shapes;shapes_easings_box_anim;⭐️⭐️☆☆;2.5;2.5;"Ray";@raysan5
shapes;shapes_easings_rectangle_array;⭐️⭐️⭐️☆;2.0;2.5;"Ray";@raysan5
shapes;shapes_lines_bezier;⭐️☆☆☆;1.7;1.7;"Ramon Santamaria";@raysan5
shapes;shapes_collision_area;⭐️⭐️☆☆;2.5;2.5;"Ramon Santamaria";@raysan5
shapes;shapes_following_eyes;⭐️⭐️☆☆;2.5;2.5;"Ramon Santamaria";@raysan5
shapes;shapes_easings_ball_anim;⭐️⭐️☆☆;2.5;2.5;"Ramon Santamaria";@raysan5
shapes;shapes_easings_box_anim;⭐️⭐️☆☆;2.5;2.5;"Ramon Santamaria";@raysan5
shapes;shapes_easings_rectangle_array;⭐️⭐️⭐️☆;2.0;2.5;"Ramon Santamaria";@raysan5
shapes;shapes_draw_ring;⭐️⭐️⭐️☆;2.5;2.5;"Vlad Adrian";@demizdor
shapes;shapes_draw_circle_sector;⭐️⭐️⭐️☆;2.5;2.5;"Vlad Adrian";@demizdor
shapes;shapes_draw_rectangle_rounded;⭐️⭐️⭐️☆;2.5;2.5;"Vlad Adrian";@demizdor
shapes;shapes_top_down_lights;⭐️⭐️⭐️⭐️;4.2;4.2;"Jeffery Myers";@JeffM2501
shapes;shapes_rectangle_advanced;⭐️⭐️⭐️⭐️;5.5;5.5;"Everton Jr.";@evertonse
shapes;shapes_splines_drawing;⭐️⭐️⭐️☆;5.0;5.0;"Ray";@raysan5
shapes;shapes_splines_drawing;⭐️⭐️⭐️☆;5.0;5.0;"Ramon Santamaria";@raysan5
shapes;shapes_digital_clock;⭐️⭐️☆☆;5.5;5.5;"Hamza RAHAL";@rhmz-rhl
shapes;shapes_double_pendulum;⭐️⭐️☆☆;5.5;5.5;"JoeCheong";@Joecheong2006
textures;textures_logo_raylib;⭐️☆☆☆;1.0;1.0;"Ray";@raysan5
textures;textures_srcrec_dstrec;⭐️⭐️⭐️☆;1.3;1.3;"Ray";@raysan5
textures;textures_image_drawing;⭐️⭐️☆☆;1.4;1.4;"Ray";@raysan5
textures;textures_logo_raylib;⭐️☆☆☆;1.0;1.0;"Ramon Santamaria";@raysan5
textures;textures_srcrec_dstrec;⭐️⭐️⭐️☆;1.3;1.3;"Ramon Santamaria";@raysan5
textures;textures_image_drawing;⭐️⭐️☆☆;1.4;1.4;"Ramon Santamaria";@raysan5
textures;textures_image_generation;⭐️⭐️☆☆;1.8;1.8;"Wilhem Barbier";@nounoursheureux
textures;textures_image_loading;⭐️☆☆☆;1.3;1.3;"Ray";@raysan5
textures;textures_image_processing;⭐️⭐️⭐️☆;1.4;3.5;"Ray";@raysan5
textures;textures_image_text;⭐️⭐️☆☆;1.8;4.0;"Ray";@raysan5
textures;textures_to_image;⭐️☆☆☆;1.3;4.0;"Ray";@raysan5
textures;textures_raw_data;⭐️⭐️⭐️☆;1.3;3.5;"Ray";@raysan5
textures;textures_particles_blending;⭐️☆☆☆;1.7;3.5;"Ray";@raysan5
textures;textures_image_loading;⭐️☆☆☆;1.3;1.3;"Ramon Santamaria";@raysan5
textures;textures_image_processing;⭐️⭐️⭐️☆;1.4;3.5;"Ramon Santamaria";@raysan5
textures;textures_image_text;⭐️⭐️☆☆;1.8;4.0;"Ramon Santamaria";@raysan5
textures;textures_to_image;⭐️☆☆☆;1.3;4.0;"Ramon Santamaria";@raysan5
textures;textures_raw_data;⭐️⭐️⭐️☆;1.3;3.5;"Ramon Santamaria";@raysan5
textures;textures_particles_blending;⭐️☆☆☆;1.7;3.5;"Ramon Santamaria";@raysan5
textures;textures_npatch_drawing;⭐️⭐️⭐️☆;2.0;2.5;"Jorge A. Gomes";@overdev
textures;textures_background_scrolling;⭐️☆☆☆;2.0;2.5;"Ray";@raysan5
textures;textures_sprite_anim;⭐️⭐️☆☆;1.3;1.3;"Ray";@raysan5
textures;textures_sprite_button;⭐️⭐️☆☆;2.5;2.5;"Ray";@raysan5
textures;textures_sprite_explosion;⭐️⭐️☆☆;2.5;3.5;"Ray";@raysan5
textures;textures_bunnymark;⭐️⭐️⭐️☆;1.6;2.5;"Ray";@raysan5
textures;textures_background_scrolling;⭐️☆☆☆;2.0;2.5;"Ramon Santamaria";@raysan5
textures;textures_sprite_anim;⭐️⭐️☆☆;1.3;1.3;"Ramon Santamaria";@raysan5
textures;textures_sprite_button;⭐️⭐️☆☆;2.5;2.5;"Ramon Santamaria";@raysan5
textures;textures_sprite_explosion;⭐️⭐️☆☆;2.5;3.5;"Ramon Santamaria";@raysan5
textures;textures_bunnymark;⭐️⭐️⭐️☆;1.6;2.5;"Ramon Santamaria";@raysan5
textures;textures_mouse_painting;⭐️⭐️⭐️☆;3.0;3.0;"Chris Dill";@MysteriousSpace
textures;textures_blend_modes;⭐️☆☆☆;3.5;3.5;"Karlo Licudine";@accidentalrebel
textures;textures_draw_tiled;⭐️⭐️⭐️☆;3.0;4.2;"Vlad Adrian";@demizdor
textures;textures_polygon;⭐️☆☆☆;3.7;3.7;"Chris Camacho";@chriscamacho
textures;textures_fog_of_war;⭐️⭐️⭐️☆;4.2;4.2;"Ray";@raysan5
textures;textures_gif_player;⭐️⭐️⭐️☆;4.2;4.2;"Ray";@raysan5
textures;textures_fog_of_war;⭐️⭐️⭐️☆;4.2;4.2;"Ramon Santamaria";@raysan5
textures;textures_gif_player;⭐️⭐️⭐️☆;4.2;4.2;"Ramon Santamaria";@raysan5
textures;textures_image_kernel;⭐️⭐️⭐️⭐️;1.3;1.3;"Karim Salem";@kimo-s
textures;textures_image_channel;⭐️⭐️☆☆;5.1-dev;5.1-dev;"Bruno Cabral";@brccabral
textures;textures_image_rotate;⭐️⭐️☆☆;1.0;1.0;"Ray";@raysan5
textures;textures_image_rotate;⭐️⭐️☆☆;1.0;1.0;"Ramon Santamaria";@raysan5
textures;textures_textured_curve;⭐️⭐️⭐️☆;4.5;4.5;"Jeffery Myers";@JeffM2501
text;text_raylib_fonts;⭐️☆☆☆;1.7;3.7;"Ray";@raysan5
text;text_font_spritefont;⭐️☆☆☆;1.0;1.0;"Ray";@raysan5
text;text_font_filters;⭐️⭐️☆☆;1.3;4.2;"Ray";@raysan5
text;text_font_loading;⭐️☆☆☆;1.4;3.0;"Ray";@raysan5
text;text_font_sdf;⭐️⭐️⭐️☆;1.3;4.0;"Ray";@raysan5
text;text_format_text;⭐️☆☆☆;1.1;3.0;"Ray";@raysan5
text;text_input_box;⭐️⭐️☆☆;1.7;3.5;"Ray";@raysan5
text;text_writing_anim;⭐️⭐️☆☆;1.4;1.4;"Ray";@raysan5
text;text_raylib_fonts;⭐️☆☆☆;1.7;3.7;"Ramon Santamaria";@raysan5
text;text_font_spritefont;⭐️☆☆☆;1.0;1.0;"Ramon Santamaria";@raysan5
text;text_font_filters;⭐️⭐️☆☆;1.3;4.2;"Ramon Santamaria";@raysan5
text;text_font_loading;⭐️☆☆☆;1.4;3.0;"Ramon Santamaria";@raysan5
text;text_font_sdf;⭐️⭐️⭐️☆;1.3;4.0;"Ramon Santamaria";@raysan5
text;text_format_text;⭐️☆☆☆;1.1;3.0;"Ramon Santamaria";@raysan5
text;text_input_box;⭐️⭐️☆☆;1.7;3.5;"Ramon Santamaria";@raysan5
text;text_writing_anim;⭐️⭐️☆☆;1.4;1.4;"Ramon Santamaria";@raysan5
text;text_rectangle_bounds;⭐️⭐️⭐️⭐️;2.5;4.0;"Vlad Adrian";@demizdor
text;text_unicode;⭐️⭐️⭐️⭐️;2.5;4.0;"Vlad Adrian";@demizdor
text;text_draw_3d;⭐️⭐️⭐️⭐️;3.5;4.0;"Vlad Adrian";@demizdor
text;text_codepoints_loading;⭐️⭐️⭐️☆;4.2;4.2;"Ray";@raysan5
text;text_codepoints_loading;⭐️⭐️⭐️☆;4.2;4.2;"Ramon Santamaria";@raysan5
models;models_animation;⭐️⭐️☆☆;2.5;3.5;"Culacant";@culacant
models;models_billboard;⭐️⭐️⭐️☆;1.3;3.5;"Ray";@raysan5
models;models_box_collisions;⭐️☆☆☆;1.3;3.5;"Ray";@raysan5
models;models_cubicmap;⭐️⭐️☆☆;1.8;3.5;"Ray";@raysan5
models;models_first_person_maze;⭐️⭐️☆☆;2.5;3.5;"Ray";@raysan5
models;models_geometric_shapes;⭐️☆☆☆;1.0;3.5;"Ray";@raysan5
models;models_mesh_generation;⭐️⭐️☆☆;1.8;4.0;"Ray";@raysan5
models;models_billboard;⭐️⭐️⭐️☆;1.3;3.5;"Ramon Santamaria";@raysan5
models;models_box_collisions;⭐️☆☆☆;1.3;3.5;"Ramon Santamaria";@raysan5
models;models_cubicmap;⭐️⭐️☆☆;1.8;3.5;"Ramon Santamaria";@raysan5
models;models_first_person_maze;⭐️⭐️☆☆;2.5;3.5;"Ramon Santamaria";@raysan5
models;models_geometric_shapes;⭐️☆☆☆;1.0;3.5;"Ramon Santamaria";@raysan5
models;models_mesh_generation;⭐️⭐️☆☆;1.8;4.0;"Ramon Santamaria";@raysan5
models;models_mesh_picking;⭐️⭐️⭐️☆;1.7;4.0;"Joel Davis";@joeld42
models;models_loading;⭐️☆☆☆;2.0;4.2;"Ray";@raysan5
models;models_loading_gltf;⭐️☆☆☆;3.7;4.2;"Ray";@raysan5
models;models_loading;⭐️☆☆☆;2.0;4.2;"Ramon Santamaria";@raysan5
models;models_loading_gltf;⭐️☆☆☆;3.7;4.2;"Ramon Santamaria";@raysan5
models;models_loading_vox;⭐️☆☆☆;4.0;4.0;"Johann Nadalutti";@procfxgen
models;models_loading_m3d;⭐️⭐️☆☆;4.5;4.5;"bzt";@model3d
models;models_orthographic_projection;⭐️☆☆☆;2.0;3.7;"Max Danielsson";@autious
models;models_point_rendering;⭐️⭐️⭐️☆;5.0;5.0;"Reese Gallagher";@satchelfrost
models;models_rlgl_solar_system;⭐️⭐️⭐️⭐️;2.5;4.0;"Ray";@raysan5
models;models_rlgl_solar_system;⭐️⭐️⭐️⭐️;2.5;4.0;"Ramon Santamaria";@raysan5
models;models_yaw_pitch_roll;⭐️⭐️☆☆;1.8;4.0;"Berni";@Berni8k
models;models_waving_cubes;⭐️⭐️⭐️☆;2.5;3.7;"Codecat";@codecat
models;models_heightmap;⭐️☆☆☆;1.8;3.5;"Ray";@raysan5
models;models_skybox;⭐️⭐️☆☆;1.8;4.0;"Ray";@raysan5
models;models_draw_cube_texture;⭐️⭐️☆☆;4.5;4.5;"Ray";@raysan5
models;models_heightmap;⭐️☆☆☆;1.8;3.5;"Ramon Santamaria";@raysan5
models;models_skybox;⭐️⭐️☆☆;1.8;4.0;"Ramon Santamaria";@raysan5
models;models_draw_cube_texture;⭐️⭐️☆☆;4.5;4.5;"Ramon Santamaria";@raysan5
models;models_gpu_skinning;⭐️⭐️⭐️☆;4.5;4.5;"Daniel Holden";@orangeduck
models;models_bone_socket;⭐️⭐️⭐️⭐️;4.5;4.5;"iP";@ipzaur
models;models_tesseract_view;⭐️⭐️☆☆;5.6-dev;5.6-dev;"Timothy van der Valk";@arceryz
shaders;shaders_basic_lighting;⭐️⭐️⭐️⭐️;3.0;4.2;"Chris Camacho";@chriscamacho
shaders;shaders_model_shader;⭐️⭐️☆☆;1.3;3.7;"Ray";@raysan5
shaders;shaders_shapes_textures;⭐️⭐️☆☆;1.7;3.7;"Ray";@raysan5
shaders;shaders_custom_uniform;⭐️⭐️☆☆;1.3;4.0;"Ray";@raysan5
shaders;shaders_postprocessing;⭐️⭐️⭐️☆;1.3;4.0;"Ray";@raysan5
shaders;shaders_model_shader;⭐️⭐️☆☆;1.3;3.7;"Ramon Santamaria";@raysan5
shaders;shaders_shapes_textures;⭐️⭐️☆☆;1.7;3.7;"Ramon Santamaria";@raysan5
shaders;shaders_custom_uniform;⭐️⭐️☆☆;1.3;4.0;"Ramon Santamaria";@raysan5
shaders;shaders_postprocessing;⭐️⭐️⭐️☆;1.3;4.0;"Ramon Santamaria";@raysan5
shaders;shaders_palette_switch;⭐️⭐️⭐️☆;2.5;3.7;"Marco Lizza";@MarcoLizza
shaders;shaders_raymarching;⭐️⭐️⭐️⭐️;2.0;4.2;"Ray";@raysan5
shaders;shaders_raymarching;⭐️⭐️⭐️⭐️;2.0;4.2;"Ramon Santamaria";@raysan5
shaders;shaders_texture_drawing;⭐️⭐️☆☆;2.0;3.7;"Michał Ciesielski";@ciessielski
shaders;shaders_texture_outline;⭐️⭐️⭐️☆;4.0;4.0;"Samuel Skiff";@GoldenThumbs
shaders;shaders_texture_waves;⭐️⭐️☆☆;2.5;3.7;"Anata";@anatagawa
@ -138,9 +138,9 @@ shaders;shaders_julia_set;⭐️⭐️⭐️☆;2.5;4.0;"Josh Colclough";@joshco
shaders;shaders_eratosthenes;⭐️⭐️⭐️☆;2.5;4.0;"ProfJski";@ProfJski
shaders;shaders_fog;⭐️⭐️⭐️☆;2.5;3.7;"Chris Camacho";@chriscamacho
shaders;shaders_simple_mask;⭐️⭐️☆☆;2.5;3.7;"Chris Camacho";@chriscamacho
shaders;shaders_hot_reloading;⭐️⭐️⭐️☆;3.0;3.5;"Ray";@raysan5
shaders;shaders_hot_reloading;⭐️⭐️⭐️☆;3.0;3.5;"Ramon Santamaria";@raysan5
shaders;shaders_mesh_instancing;⭐️⭐️⭐️⭐️;3.7;4.2;"seanpringle";@seanpringle
shaders;shaders_multi_sample2d;⭐️⭐️☆☆;3.5;3.5;"Ray";@raysan5
shaders;shaders_multi_sample2d;⭐️⭐️☆☆;3.5;3.5;"Ramon Santamaria";@raysan5
shaders;shaders_spotlight;⭐️⭐️☆☆;2.5;3.7;"Chris Camacho";@chriscamacho
shaders;shaders_deferred_render;⭐️⭐️⭐️⭐️;4.5;4.5;"Justin Andreas Lacoste";@27justin
shaders;shaders_hybrid_render;⭐️⭐️⭐️⭐️;4.2;4.2;"Buğra Alptekin Sarı";@BugraAlptekinSari
@ -152,17 +152,17 @@ shaders;shaders_basic_pbr;⭐️⭐️⭐️⭐️;5.0;5.1-dev;"Afan OLOVCIC";@_
shaders;shaders_lightmap;⭐️⭐️⭐️☆;4.5;4.5;"Jussi Viitala";@nullstare
shaders;shaders_rounded_rectangle;⭐️⭐️⭐️☆;5.5;5.5;"Anstro Pleuton";@anstropleuton
shaders;shaders_view_depth;⭐️⭐️⭐️☆;5.6-dev;5.6-dev;"Luís Almeida";@luis605
audio;audio_module_playing;⭐️☆☆☆;1.5;3.5;"Ray";@raysan5
audio;audio_music_stream;⭐️☆☆☆;1.3;4.2;"Ray";@raysan5
audio;audio_raw_stream;⭐️⭐️⭐️☆;1.6;4.2;"Ray";@raysan5
audio;audio_sound_loading;⭐️☆☆☆;1.1;3.5;"Ray";@raysan5
audio;audio_module_playing;⭐️☆☆☆;1.5;3.5;"Ramon Santamaria";@raysan5
audio;audio_music_stream;⭐️☆☆☆;1.3;4.2;"Ramon Santamaria";@raysan5
audio;audio_raw_stream;⭐️⭐️⭐️☆;1.6;4.2;"Ramon Santamaria";@raysan5
audio;audio_sound_loading;⭐️☆☆☆;1.1;3.5;"Ramon Santamaria";@raysan5
audio;audio_mixed_processor;⭐️⭐️⭐️⭐️;4.2;4.2;"hkc";@hatkidchan
audio;audio_stream_effects;⭐️⭐️⭐️⭐️;4.2;5.0;"Ray";@raysan5
audio;audio_stream_effects;⭐️⭐️⭐️⭐️;4.2;5.0;"Ramon Santamaria";@raysan5
audio;audio_sound_multi;⭐️⭐️☆☆;4.6;4.6;"Jeffery Myers";@JeffM2501
audio;audio_sound_positioning;⭐️⭐️☆☆;5.5;5.5;"Le Juez Victor";@Bigfoot71
others;rlgl_standalone;⭐️⭐️⭐️⭐️;1.6;4.0;"Ray";@raysan5
others;rlgl_standalone;⭐️⭐️⭐️⭐️;1.6;4.0;"Ramon Santamaria";@raysan5
others;rlgl_compute_shader;⭐️⭐️⭐️⭐️;4.0;4.0;"Teddy Astie";@tsnake41
others;easings_testbed;⭐️⭐️⭐️☆;2.5;3.0;"Juan Miguel López";@flashback-fx
others;raylib_opengl_interop;⭐️⭐️⭐️⭐️;3.8;4.0;"Stephan Soller";@arkanis
others;embedded_files_loading;⭐️⭐️☆☆;3.0;3.5;"Kristian Holmgren";@defutura
others;raymath_vector_angle;⭐️⭐️☆☆;1.0;4.6;"Ray";@raysan5
others;raymath_vector_angle;⭐️⭐️☆☆;1.0;4.6;"Ramon Santamaria";@raysan5

+ 27
- 21
src/rlgl.h Прегледај датотеку

@ -1157,16 +1157,16 @@ static const char *rlGetCompressedFormatName(int format); // Get compressed form
static int rlGetPixelDataSize(int width, int height, int format); // Get pixel data size in bytes (image or texture)
static Matrix rlMatrixIdentity(void); // Get identity matrix
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
// Auxiliar matrix math functions
typedef struct rl_float16 {
float v[16];
} rl_float16;
typedef struct rl_float16 { float v[16]; } rl_float16;
static rl_float16 rlMatrixToFloatV(Matrix mat); // Get float array of matrix data
#define rlMatrixToFloat(mat) (rlMatrixToFloatV(mat).v) // Get float vector for Matrix
static Matrix rlMatrixIdentity(void); // Get identity matrix
static Matrix rlMatrixMultiply(Matrix left, Matrix right); // Multiply two matrices
static Matrix rlMatrixTranspose(Matrix mat); // Transposes provided matrix
static Matrix rlMatrixInvert(Matrix mat); // Invert provided matrix
#endif
//----------------------------------------------------------------------------------
// Module Functions Definition - Matrix operations
@ -2571,9 +2571,9 @@ void rlLoadExtensions(void *loader)
TRACELOG(RL_LOG_INFO, " > Version: %s", glGetString(GL_VERSION));
TRACELOG(RL_LOG_INFO, " > GLSL: %s", glGetString(GL_SHADING_LANGUAGE_VERSION));
RLGL.loader = (rlglLoadProc)loader;
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
RLGL.loader = (rlglLoadProc)loader;
// NOTE: Anisotropy levels capability is an extension
#ifndef GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
@ -2632,8 +2632,13 @@ void rlLoadExtensions(void *loader)
}
// Get OpenGL procedure address
void *rlGetProcAddress(const char *procName) {
return RLGL.loader(procName);
void *rlGetProcAddress(const char *procName)
{
void *func = NULL;
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
func = RLGL.loader(procName);
#endif
return func;
}
// Get current OpenGL version
@ -5140,7 +5145,20 @@ static int rlGetPixelDataSize(int width, int height, int format)
}
// Auxiliar math functions
//-------------------------------------------------------------------------------
// Get identity matrix
static Matrix rlMatrixIdentity(void)
{
Matrix result = {
1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f
};
return result;
}
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
// Get float array of matrix data
static rl_float16 rlMatrixToFloatV(Matrix mat)
{
@ -5166,19 +5184,6 @@ static rl_float16 rlMatrixToFloatV(Matrix mat)
return result;
}
// Get identity matrix
static Matrix rlMatrixIdentity(void)
{
Matrix result = {
1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f
};
return result;
}
// Get two matrix multiplication
// NOTE: When multiplying matrices... the order matters!
static Matrix rlMatrixMultiply(Matrix left, Matrix right)
@ -5276,5 +5281,6 @@ static Matrix rlMatrixInvert(Matrix mat)
return result;
}
#endif
#endif // RLGL_IMPLEMENTATION

+ 180
- 0
tools/rexm/examples_report.md Прегледај датотеку

@ -0,0 +1,180 @@
# EXAMPLES COLLECTION REPORT
```
Example elements validated:
- [C] : Missing .c source file
- [CAT] : Not a recognized category
- [INFO] : Inconsistent example header info (stars, author...)
- [PNG] : Missing screenshot .png
- [WPNG] : Invalid png screenshot (using default one)
- [RES] : Missing resources listed in the code
- [MK] : Not listed in Makefile
- [MKWEB] : Not listed in Makefile.Web
- [VCX] : Missing Visual Studio project file
- [SOL] : Project not included in solution file
- [RDME] : Not listed in README.md
- [JS] : Not listed in Web (examples.js)
- [WOUT] : Missing Web build (.html/.data/.wasm/.js)
```
| **EXAMPLE NAME** | [C] | [CAT]| [INFO]|[PNG]|[WPNG]| [RES]| [MK] |[MKWEB]| [VCX]| [SOL]|[RDME]|[JS] | [WOUT]|
|:---------------------------------|:---:|:----:|:-----:|:---:|:----:|:----:|:----:|:-----:|:----:|:----:|:----:|:---:|:-----:|
| core_basic_window | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_input_keys | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_input_mouse | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_input_mouse_wheel | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_input_gamepad | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_input_multitouch | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_input_gestures | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_input_virtual_controls | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ |
| core_2d_camera | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_2d_camera_mouse_zoom | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_2d_camera_platformer | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_2d_camera_split_screen | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_3d_camera_mode | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_3d_camera_free | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_3d_camera_first_person | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_3d_camera_split_screen | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_3d_picking | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_world_screen | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_custom_logging | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_window_flags | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_window_letterbox | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_window_should_close | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_drop_files | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_random_values | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_storage_values | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_vr_simulator | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_loading_thread | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_scissor_test | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_basic_screen_manager | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_custom_frame_control | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_smooth_pixelperfect | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_random_sequence | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ |
| core_basic_window_web | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ✔ | ❌ | ❌ |
| core_input_gestures_web | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ✔ | ❌ | ✔ |
| core_automation_events | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| core_high_dpi | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ |
| shapes_basic_shapes | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shapes_bouncing_ball | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shapes_colors_palette | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shapes_logo_raylib | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shapes_logo_raylib_anim | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shapes_rectangle_scaling | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shapes_lines_bezier | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shapes_collision_area | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shapes_following_eyes | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shapes_easings_ball_anim | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shapes_easings_box_anim | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shapes_easings_rectangle_array | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shapes_draw_ring | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shapes_draw_circle_sector | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shapes_draw_rectangle_rounded | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shapes_top_down_lights | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shapes_rectangle_advanced | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ |
| shapes_splines_drawing | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shapes_digital_clock | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ✔ | ❌ | ❌ |
| shapes_double_pendulum | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ✔ | ❌ | ❌ |
| textures_logo_raylib | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_srcrec_dstrec | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_image_drawing | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_image_generation | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_image_loading | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_image_processing | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_image_text | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_to_image | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_raw_data | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_particles_blending | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_npatch_drawing | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_background_scrolling | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_sprite_anim | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_sprite_button | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_sprite_explosion | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_bunnymark | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_mouse_painting | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ |
| textures_blend_modes | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_draw_tiled | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_polygon | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_fog_of_war | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_gif_player | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| textures_image_kernel | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ✔ | ❌ | ✔ |
| textures_image_channel | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ✔ | ✔ | ✔ |
| textures_image_rotate | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ✔ | ❌ | ✔ |
| textures_textured_curve | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| text_raylib_fonts | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| text_font_spritefont | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| text_font_filters | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| text_font_loading | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| text_font_sdf | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| text_format_text | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| text_input_box | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| text_writing_anim | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| text_rectangle_bounds | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| text_unicode | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| text_draw_3d | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| text_codepoints_loading | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_animation | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_billboard | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_box_collisions | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_cubicmap | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_first_person_maze | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_geometric_shapes | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_mesh_generation | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_mesh_picking | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_loading | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_loading_gltf | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_loading_vox | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_loading_m3d | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_orthographic_projection | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_point_rendering | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ✔ | ✔ | ✔ |
| models_rlgl_solar_system | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_yaw_pitch_roll | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_waving_cubes | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_heightmap | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_skybox | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_draw_cube_texture | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_gpu_skinning | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_bone_socket | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| models_tesseract_view | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ✔ | ✔ | ✔ |
| shaders_basic_lighting | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_model_shader | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_shapes_textures | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_custom_uniform | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_postprocessing | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_palette_switch | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_raymarching | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_texture_drawing | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_texture_outline | ✔ | ✔ | ❌ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_texture_waves | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_julia_set | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_eratosthenes | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_fog | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_simple_mask | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_hot_reloading | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_mesh_instancing | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_multi_sample2d | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_spotlight | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_deferred_render | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_hybrid_render | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_texture_tiling | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_shadowmap | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ |
| shaders_vertex_displacement | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_write_depth | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| shaders_basic_pbr | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ✔ | ✔ | ✔ |
| shaders_lightmap | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ✔ | ✔ | ✔ |
| shaders_rounded_rectangle | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ |
| shaders_view_depth | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ |
| audio_module_playing | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| audio_music_stream | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| audio_raw_stream | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| audio_sound_loading | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| audio_mixed_processor | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| audio_stream_effects | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| audio_sound_multi | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| audio_sound_positioning | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ✔ | ❌ | ❌ |
| rlgl_standalone | ✔ | ❌ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ |
| rlgl_compute_shader | ✔ | ❌ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ❌ | ❌ |
| easings_testbed | ✔ | ❌ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ |
| raylib_opengl_interop | ✔ | ❌ | ❌ | ✔ | ✔ | ❌ | ✔ | ✔ | ❌ | ❌ | ✔ | ❌ | ❌ |
| embedded_files_loading | ✔ | ❌ | ❌ | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ |
| raymath_vector_angle | ✔ | ❌ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ✔ | ❌ | ❌ |

+ 185
- 98
tools/rexm/rexm.c Прегледај датотеку

@ -116,14 +116,11 @@ static const char *exCategories[REXM_MAX_EXAMPLE_CATEGORIES] = { "core", "shapes
// Paths required for examples management
// TODO: Avoid hardcoding path values...
static const char *exBasePath = "C:/GitHub/raylib/examples";
static const char *exWebPath = "C:/GitHub/raylib.com/examples";
static const char *exTemplateFilePath = "C:/GitHub/raylib/examples/examples_template.c";
static const char *exTemplateScreenshot = "C:/GitHub/raylib/examples/examples_template.png";
static const char *exCollectionFilePath = "C:/GitHub/raylib/examples/examples_list.txt";
//const char *exBasePath = getenv("REXM_EXAMPLES_PATH");
//if (!exBasePath) exBasePath = "default/path";
static const char *exBasePath = NULL; //"C:/GitHub/raylib/examples";
static const char *exWebPath = NULL; //"C:/GitHub/raylib.com/examples";
static const char *exTemplateFilePath = NULL; //"C:/GitHub/raylib/examples/examples_template.c";
static const char *exTemplateScreenshot = NULL; //"C:/GitHub/raylib/examples/examples_template.png";
static const char *exCollectionFilePath = NULL; //"C:/GitHub/raylib/examples/examples_list.txt";
//----------------------------------------------------------------------------------
// Module specific functions declaration
@ -150,8 +147,9 @@ static void UnloadExamplesData(rlExampleInfo *exInfo);
static char **LoadTextLines(const char *text, int *count);
static void UnloadTextLines(char **text);
// Get example info from file header
static rlExampleInfo *GetExampleInfo(const char *exFileName);
// Load example info from file header
static rlExampleInfo *LoadExampleInfo(const char *exFileName);
static void UnloadExampleInfo(rlExampleInfo *exInfo);
// raylib example line info parser
// Parses following line format: core/core_basic_window;;1.0;1.0;"Ray"/@raysan5
@ -172,6 +170,19 @@ static void ClearExampleResources(char **resPaths);
//------------------------------------------------------------------------------------
int main(int argc, char *argv[])
{
// Path values can be configured with environment variables
exBasePath = getenv("REXM_EXAMPLES_BASE_PATH");
exWebPath = getenv("REXM_EXAMPLES_WEB_PATH");
exTemplateFilePath = getenv("REXM_EXAMPLES_TEMPLATE_FILE_PATH");
exTemplateScreenshot = getenv("REXM_EXAMPLES_TEMPLATE_SCREENSHOT_PATH");
exCollectionFilePath = getenv("REXM_EXAMPLES_COLLECTION_FILE_PATH");
if (!exBasePath) exBasePath = "C:/GitHub/raylib/examples";
if (!exWebPath) exWebPath = "C:/GitHub/raylib.com/examples";
if (!exTemplateFilePath) exTemplateFilePath = "C:/GitHub/raylib/examples/examples_template.c";
if (!exTemplateScreenshot) exTemplateScreenshot = "C:/GitHub/raylib/examples/examples_template.png";
if (!exCollectionFilePath) exCollectionFilePath = "C:/GitHub/raylib/examples/examples_list.txt";
char inFileName[1024] = { 0 }; // Example input filename (to be added)
char exName[64] = { 0 }; // Example name, without extension: core_basic_window
@ -431,7 +442,7 @@ int main(int argc, char *argv[])
// Get required example info from example file header (if provided)
// NOTE: If no example info is provided (other than category/name), just using some default values
rlExampleInfo *exInfo = GetExampleInfo(TextFormat("%s/%s/%s.c", exBasePath, exCategory, exName));
rlExampleInfo *exInfo = LoadExampleInfo(TextFormat("%s/%s/%s.c", exBasePath, exCategory, exName));
// Get example difficulty stars
char starsText[16] = { 0 };
@ -460,7 +471,7 @@ int main(int argc, char *argv[])
memcpy(exCollectionListUpdated + categoryIndex + textWritenSize, exCollectionList + categoryIndex, strlen(exCollectionList) - categoryIndex);
}
RL_FREE(exInfo);
UnloadExampleInfo(exInfo);
SaveFileText(exCollectionFilePath, exCollectionListUpdated);
RL_FREE(exCollectionListUpdated);
@ -707,11 +718,11 @@ int main(int argc, char *argv[])
// Check all examples in collection [examples_list.txt] -> Source of truth!
int exCollectionCount = 0;
rlExampleInfo *exCollection = LoadExamplesData(exCollectionFilePath, "ALL", true, &exCollectionCount);
rlExampleInfo *exCollection = LoadExamplesData(exCollectionFilePath, "ALL", false, &exCollectionCount);
// TODO: Validate: Duplicate entries in collection list?
// Get status information for all examples, using "status" field in the struct
// Set status information for all examples, using "status" field in the struct
for (int i = 0; i < exCollectionCount; i++)
{
rlExampleInfo *exInfo = &exCollection[i];
@ -726,7 +737,8 @@ int main(int argc, char *argv[])
// Validate: example screenshot is not the template default one
Image imScreenshot = LoadImage(TextFormat("%s/%s/%s.png", exBasePath, exInfo->category, exInfo->name));
Image imTemplate = LoadImage(TextFormat("%s/examples_template.png", exBasePath));
if (memcmp(imScreenshot.data, imTemplate.data, GetPixelDataSize(imScreenshot.width, imScreenshot.height, imScreenshot.format)) != 0) exInfo->status |= VALID_INVALID_PNG;
if (memcmp(imScreenshot.data, imTemplate.data, GetPixelDataSize(imScreenshot.width, imScreenshot.height, imScreenshot.format)) == 0)
exInfo->status |= VALID_INVALID_PNG;
UnloadImage(imTemplate);
UnloadImage(imScreenshot);
@ -737,13 +749,13 @@ int main(int argc, char *argv[])
if (FileTextFind(TextFormat("%s/Makefile.Web", exBasePath), exInfo->name) == -1) exInfo->status |= VALID_NOT_IN_MAKEFILE_WEB;
// Validate: raylib/examples/README.md -> Example listed?
if (FileTextFind(TextFormat("%s/README.md", exBasePath), exInfo->name) == -1) exInfo->status |= VALID_NOT_IN_JS;
if (FileTextFind(TextFormat("%s/README.md", exBasePath), exInfo->name) == -1) exInfo->status |= VALID_NOT_IN_README;
// Validate: raylib.com/common/examples.js -> Example listed?
if (FileTextFind(TextFormat("%s/common/examples.js", exWebPath), exInfo->name) == -1) exInfo->status |= VALID_NOT_IN_README;
if (FileTextFind(TextFormat("%s/../common/examples.js", exWebPath), exInfo->name + TextFindIndex(exInfo->name, "_") + 1) == -1) exInfo->status |= VALID_NOT_IN_JS;
// Validate: raylib/projects/VS2022/examples/<category>_example_name.vcxproj -> File exists?
if (!FileExists(TextFormat("%s/../projects/VS2022/examples/%s.png", exBasePath, exInfo->name))) exInfo->status |= VALID_MISSING_VCXPROJ;
if (!FileExists(TextFormat("%s/../projects/VS2022/examples/%s.vcxproj", exBasePath, exInfo->name))) exInfo->status |= VALID_MISSING_VCXPROJ;
// Validate: raylib/projects/VS2022/raylib.sln -> Example listed?
if (FileTextFind(TextFormat("%s/../projects/VS2022/raylib.sln", exBasePath), exInfo->name) == -1) exInfo->status |= VALID_NOT_IN_VCXSOL;
@ -764,13 +776,22 @@ int main(int argc, char *argv[])
for (int v = 0; v < 3; v++)
{
char *resPathUpdated = TextReplace(resPaths[r], "glsl%i", TextFormat("glsl%i", glslVer[v]));
if (!FileExists(TextFormat("%s/%s/%s", exBasePath, exInfo->category, resPathUpdated))) exInfo->status |= VALID_MISSING_RESOURCES;
if (!FileExists(TextFormat("%s/%s/%s", exBasePath, exInfo->category, resPathUpdated)))
{
exInfo->status |= VALID_MISSING_RESOURCES;
// Logging missing resources for convenience
LOG("WARNING: [%s] Missing resource: %s\n", exInfo->name, resPathUpdated);
}
RL_FREE(resPathUpdated);
}
}
else
{
if (!FileExists(TextFormat("%s/%s/%s", exBasePath, exInfo->category, resPaths[r]))) exInfo->status |= VALID_MISSING_RESOURCES;
if (!FileExists(TextFormat("%s/%s/%s", exBasePath, exInfo->category, resPaths[r])))
{
exInfo->status |= VALID_MISSING_RESOURCES;
LOG("WARNING: [%s] Missing resource: %s\n", exInfo->name, resPaths[r]);
}
}
}
}
@ -780,21 +801,22 @@ int main(int argc, char *argv[])
// Validate: raylib.com/examples/<category>/<category>_example_name.data -> File exists?
// Validate: raylib.com/examples/<category>/<category>_example_name.wasm -> File exists?
// Validate: raylib.com/examples/<category>/<category>_example_name.js -> File exists?
if ((!FileExists(TextFormat("%s/examples/%s/%s.html", exWebPath, exInfo->category, exInfo->name))) ||
((exInfo->resCount > 0) && !FileExists(TextFormat("%s/examples/%s/%s.data", exWebPath, exInfo->category, exInfo->name))) ||
(!FileExists(TextFormat("%s/examples/%s/%s.wasm", exWebPath, exInfo->category, exInfo->name))) ||
(!FileExists(TextFormat("%s/examples/%s/%s.js", exWebPath, exInfo->category, exInfo->name)))) exInfo->status |= VALID_MISSING_WEB_OUTPUT;
if (!FileExists(TextFormat("%s/%s/%s.html", exWebPath, exInfo->category, exInfo->name)) ||
!FileExists(TextFormat("%s/%s/%s.wasm", exWebPath, exInfo->category, exInfo->name)) ||
!FileExists(TextFormat("%s/%s/%s.js", exWebPath, exInfo->category, exInfo->name)) ||
((exInfo->resCount > 0) && !FileExists(TextFormat("%s/%s/%s.data", exWebPath, exInfo->category, exInfo->name))))
exInfo->status |= VALID_MISSING_WEB_OUTPUT;
// NOTE: Additional validation elements
// Validate: Example naming conventions: <category>/<category>_example_name, valid category
if ((TextFindIndex(exInfo->name, exInfo->category) == -1) ||
(!TextIsEqual(exInfo->category, "core") || !TextIsEqual(exInfo->category, "shapes") ||
!TextIsEqual(exInfo->category, "textures") || !TextIsEqual(exInfo->category, "text") ||
!TextIsEqual(exInfo->category, "models") || !TextIsEqual(exInfo->category, "shaders") ||
!TextIsEqual(exInfo->category, "audio") || !TextIsEqual(exInfo->category, "others"))) exInfo->status |= VALID_INVALID_CATEGORY;
(!TextIsEqual(exInfo->category, "core") && !TextIsEqual(exInfo->category, "shapes") &&
!TextIsEqual(exInfo->category, "textures") && !TextIsEqual(exInfo->category, "text") &&
!TextIsEqual(exInfo->category, "models") && !TextIsEqual(exInfo->category, "shaders") &&
!TextIsEqual(exInfo->category, "audio") && !TextIsEqual(exInfo->category, "others"))) exInfo->status |= VALID_INVALID_CATEGORY;
// Validate: Example info (stars, author, github) missmatches with example header content
rlExampleInfo *exInfoHeader = GetExampleInfo(TextFormat("%s/%s/%s.c", exBasePath, exInfo->category, exInfo->name));
rlExampleInfo *exInfoHeader = LoadExampleInfo(TextFormat("%s/%s/%s.c", exBasePath, exInfo->category, exInfo->name));
if ((strcmp(exInfo->name, exInfoHeader->name) != 0) || // NOTE: Get it from example, not file
(strcmp(exInfo->category, exInfoHeader->category) != 0) ||
@ -804,62 +826,119 @@ int main(int argc, char *argv[])
(exInfo->verCreated != exInfoHeader->verCreated) ||
(exInfo->verUpdated != exInfoHeader->verUpdated)) exInfo->status |= VALID_INCONSISTENT_INFO;
RL_FREE(exInfoHeader);
UnloadExampleInfo(exInfoHeader);
}
// TODO: Generate validation report/table with results (.md)
/*
//Status Description
//OK Everything found
//MISSING One or more files are missing, some can be solved automatically
//ERROR Serious inconsistencies
Columns:
[C] VALID_MISSING_C // Missing .c source file
[PNG] VALID_MISSING_PNG // Missing screenshot .png
[WPNG] VALID_INVALID_PNG // Invalid png screenshot (using template one)
[RES] VALID_MISSING_RESOURCES // Missing resources listed in the code
[VCX] VALID_MISSING_VCXPROJ // Missing Visual Studio .vcxproj file
[SOL] VALID_NOT_IN_VCXSOL // Project not included in solution file
[MK] VALID_NOT_IN_MAKEFILE // Not listed in Makefile
[MKWEB] VALID_NOT_IN_MAKEFILE_WEB // Not listed in Makefile.Web
[RDME] VALID_NOT_IN_README // Not listed in README.md
[JS] VALID_NOT_IN_JS // Not listed in examples.js
[WOUT] VALID_MISSING_WEB_OUTPUT // Missing .html/.data/.wasm/.js
[INFO] VALID_INCONSISTENT_INFO // Inconsistent info between collection and example header (stars, author...)
[CAT] VALID_INVALID_CATEGORY // Not a recognized category
[STATUS] [CATEGORY] [NAME] [C] [PNG] [WPNG] [RES] [VCX] [SOL] [MK] [MKWEB] [RDME] [JS] [WOUT] [INFO] [CAT]
-----------------------------------------------------------------------------------------------------------------------
OK core basic_window
MISSING shapes colorful_lines
ERROR text broken_shader
*/
// Generate validation report/table with results (.md)
/*
Columns:
[C] VALID_MISSING_C // Missing .c source file
[PNG] VALID_MISSING_PNG // Missing screenshot .png
[WPNG] VALID_INVALID_PNG // Invalid png screenshot (using template one)
[RES] VALID_MISSING_RESOURCES // Missing resources listed in the code
[VCX] VALID_MISSING_VCXPROJ // Missing Visual Studio .vcxproj file
[SOL] VALID_NOT_IN_VCXSOL // Project not included in solution file
[MK] VALID_NOT_IN_MAKEFILE // Not listed in Makefile
[MKWEB] VALID_NOT_IN_MAKEFILE_WEB // Not listed in Makefile.Web
[RDME] VALID_NOT_IN_README // Not listed in README.md
[JS] VALID_NOT_IN_JS // Not listed in examples.js
[WOUT] VALID_MISSING_WEB_OUTPUT // Missing .html/.data/.wasm/.js
[INFO] VALID_INCONSISTENT_INFO // Inconsistent info between collection and example header (stars, author...)
[CAT] VALID_INVALID_CATEGORY // Not a recognized category
| [EXAMPLE NAME] | [C] |[CAT]|[INFO]|[PNG]|[WPNG]|[RES]|[MK] |[MKWEB]|[VCX]|[SOL]|[RDME]|[JS] |[WOUT]|
|:-----------------------------|:---:|:---:|:----:|:---:|:----:|:---:|:---:|:-----:|:---:|:---:|:----:|:---:|:----:|
| core_basic_window | | | | | | | | | | | | | |
| shapes_colors_palette | | | | | | | | | | | | | |
| text_format_text | | | | | | | | | | | | | |
*/
char *report = (char *)RL_CALLOC(REXM_MAX_BUFFER_SIZE, 1);
int repIndex = 0;
repIndex += sprintf(report + repIndex, "# EXAMPLES COLLECTION REPORT\n\n");
repIndex += sprintf(report + repIndex, "```\nExample elements validated:\n\n");
repIndex += sprintf(report + repIndex, " - [C] : Missing .c source file\n");
repIndex += sprintf(report + repIndex, " - [CAT] : Not a recognized category\n");
repIndex += sprintf(report + repIndex, " - [INFO] : Inconsistent example header info (stars, author...)\n");
repIndex += sprintf(report + repIndex, " - [PNG] : Missing screenshot .png\n");
repIndex += sprintf(report + repIndex, " - [WPNG] : Invalid png screenshot (using default one)\n");
repIndex += sprintf(report + repIndex, " - [RES] : Missing resources listed in the code\n");
repIndex += sprintf(report + repIndex, " - [MK] : Not listed in Makefile\n");
repIndex += sprintf(report + repIndex, " - [MKWEB] : Not listed in Makefile.Web\n");
repIndex += sprintf(report + repIndex, " - [VCX] : Missing Visual Studio project file\n");
repIndex += sprintf(report + repIndex, " - [SOL] : Project not included in solution file\n");
repIndex += sprintf(report + repIndex, " - [RDME] : Not listed in README.md\n");
repIndex += sprintf(report + repIndex, " - [JS] : Not listed in Web (examples.js)\n");
repIndex += sprintf(report + repIndex, " - [WOUT] : Missing Web build (.html/.data/.wasm/.js)\n```\n");
repIndex += sprintf(report + repIndex, "| **EXAMPLE NAME** | [C] | [CAT]| [INFO]|[PNG]|[WPNG]| [RES]| [MK] |[MKWEB]| [VCX]| [SOL]|[RDME]|[JS] | [WOUT]|\n");
repIndex += sprintf(report + repIndex, "|:---------------------------------|:---:|:----:|:-----:|:---:|:----:|:----:|:----:|:-----:|:----:|:----:|:----:|:---:|:-----:|\n");
for (int i = 0; i < exCollectionCount; i++)
{
repIndex += sprintf(report + repIndex, "| %-32s | %s | %s | %s | %s | %s | %s | %s | %s | %s | %s | %s | %s | %s |\n",
exCollection[i].name,
(exCollection[i].status & VALID_MISSING_C)? "" : "",
(exCollection[i].status & VALID_INVALID_CATEGORY)? "" : "",
(exCollection[i].status & VALID_INCONSISTENT_INFO)? "" : "",
(exCollection[i].status & VALID_MISSING_PNG)? "" : "",
(exCollection[i].status & VALID_INVALID_PNG)? "" : "",
(exCollection[i].status & VALID_MISSING_RESOURCES)? "" : "",
(exCollection[i].status & VALID_NOT_IN_MAKEFILE)? "" : "",
(exCollection[i].status & VALID_NOT_IN_MAKEFILE_WEB)? "" : "",
(exCollection[i].status & VALID_MISSING_VCXPROJ)? "" : "",
(exCollection[i].status & VALID_NOT_IN_VCXSOL)? "" : "",
(exCollection[i].status & VALID_NOT_IN_README)? "" : "",
(exCollection[i].status & VALID_NOT_IN_JS)? "" : "",
(exCollection[i].status & VALID_MISSING_WEB_OUTPUT)? "" : "");
}
UnloadExamplesData(exCollection);
//------------------------------------------------------------------------------------------------
SaveFileText(TextFormat("%s/../tools/rexm/%s", exBasePath, "examples_report.md"), report);
RL_FREE(report);
//UnloadExamplesData(exCollection); // Done at the end, it can be required for fixing
if (opCode == OP_UPDATE)
{
// Actions to be performed to fix/review anything possible
// Actions to fix/review anything possible from validation results
//------------------------------------------------------------------------------------------------
// TODO: Process validation results and take actions to
// correct everything possible to make collection consistent
// Check examples "status" information
for (int i = 0; i < exCollectionCount; i++)
{
rlExampleInfo *exInfo = &exCollection[i];
// Review: Add/Remove: raylib/projects/VS2022/examples/<category>_example_name.vcxproj
// Review: Add/remove: raylib/projects/VS2022/raylib.sln
if (exInfo->status & VALID_MISSING_C) LOG("WARNING: [%s] Missing code file\n", exInfo->name);
else
{
// NOTE: Some issues can not be automatically fixed, only logged
//if (exInfo->status & VALID_MISSING_PNG) LOG("WARNING: [%s] Missing screenshot file\n", exInfo->name);
//if (exInfo->status & VALID_INVALID_PNG) LOG("WARNING: [%s] Invalid screenshot file (using template)\n", exInfo->name);
//if (exInfo->status & VALID_MISSING_RESOURCES) LOG("WARNING: [%s] Missing resources detected\n", exInfo->name);
//if (exInfo->status & VALID_INCONSISTENT_INFO) LOG("WARNING: [%s] Inconsistent example header info\n", exInfo->name);
//if (exInfo->status & VALID_INVALID_CATEGORY) LOG("WARNING: [%s] Invalid example category\n", exInfo->name);
// Review: Add/Remove: raylib/projects/VS2022/examples/<category>_example_name.vcxproj
// Review: Add/remove: raylib/projects/VS2022/raylib.sln
// Solves: VALID_MISSING_VCXPROJ, VALID_NOT_IN_VCXSOL
// Review: Add/Remove: raylib.com/examples/<category>/<category>_example_name.html
// Review: Add/Remove: raylib.com/examples/<category>/<category>_example_name.data
// Review: Add/Remove: raylib.com/examples/<category>/<category>_example_name.wasm
// Review: Add/Remove: raylib.com/examples/<category>/<category>_example_name.js
// Solves: VALID_MISSING_WEB_OUTPUT
}
}
// Update files: Makefile, Makefile.Web, README.md, examples.js
UpdateRequiredFiles();
// Review examples
// Review: Add/Remove: raylib.com/examples/<category>/<category>_example_name.html
// Review: Add/Remove: raylib.com/examples/<category>/<category>_example_name.data
// Review: Add/Remove: raylib.com/examples/<category>/<category>_example_name.wasm
// Review: Add/Remove: raylib.com/examples/<category>/<category>_example_name.js
// Solves: VALID_NOT_IN_MAKEFILE, VALID_NOT_IN_MAKEFILE_WEB, VALID_NOT_IN_README, VALID_NOT_IN_JS
UpdateRequiredFiles();
//------------------------------------------------------------------------------------------------
}
UnloadExamplesData(exCollection);
//------------------------------------------------------------------------------------------------
} break;
default: // Help
@ -1414,7 +1493,7 @@ static void UnloadTextLines(char **lines)
}
// Get example info from file header
rlExampleInfo *GetExampleInfo(const char *exFileName)
rlExampleInfo *LoadExampleInfo(const char *exFileName)
{
rlExampleInfo *exInfo = (rlExampleInfo *)RL_CALLOC(1, sizeof(rlExampleInfo));
@ -1427,6 +1506,7 @@ rlExampleInfo *GetExampleInfo(const char *exFileName)
// Get example difficulty stars
// NOTE: Counting the unicode char occurrences:
// WARNING: The stars unicode in examples is not the same than in collection list!!!
int starsIndex = TextFindIndex(exText, "");
if (starsIndex > 0)
{
@ -1434,8 +1514,8 @@ rlExampleInfo *GetExampleInfo(const char *exFileName)
while (*starPtr)
{
if (((unsigned char)starPtr[0] == 0xe2) &&
((unsigned char)starPtr[1] == 0xad) &&
((unsigned char)starPtr[2] == 0x90))
((unsigned char)starPtr[1] == 0x98) &&
((unsigned char)starPtr[2] == 0x85))
{
exInfo->stars++;
starPtr += 3; // Advance past multibyte character
@ -1459,31 +1539,32 @@ rlExampleInfo *GetExampleInfo(const char *exFileName)
exInfo->verUpdated = TextToFloat(verUpdateText);
// Get example creator and github user
int authorIndex = TextFindIndex(exText, "Example contributed by "); // Author = index + 23
int authorGitIndex = TextFindIndex(exText, "(@"); // Author GitHub user = index + 2
if (authorIndex > 0)
// NOTE: Using copyright line instead of "Example contributed by " because
// most examples do not contain that line --> TODO: Review examples header formating?
// Expected format: Copyright (c) <year_created>-<year_updated> <user_name> (@<user_github>)
// Alternatives: Copyright (c) <year_created> <author_name> (@<user_github>) and <contrib_name> (@<contrib_user>)
int copyrightIndex = TextFindIndex(exText, "Copyright (c) ");
int yearStartIndex = copyrightIndex + 14;
int yearEndIndex = TextFindIndex(exText + yearStartIndex, " ");
int authorStartIndex = yearStartIndex + yearEndIndex + 1;
int authorEndIndex = TextFindIndex(exText + authorStartIndex, " (@");
if (authorEndIndex != -1) // Github user also available
{
int authorNameLen = 0;
if (authorGitIndex > 0) authorNameLen = (authorGitIndex - 1) - (authorIndex + 23);
else
{
int authorNameEndIndex = TextFindIndex(exText + authorIndex, " and reviewed by Ramon Santamaria");
if (authorNameEndIndex == -1) authorNameEndIndex = TextFindIndex(exText + authorIndex, "\n");
authorNameLen = authorNameEndIndex - (authorIndex + 23);
}
strncpy(exInfo->author, exText + authorIndex + 23, authorNameLen);
authorEndIndex += authorStartIndex;
strncpy(exInfo->author, exText + authorStartIndex, authorEndIndex - authorStartIndex);
// Get GitHub user
int userStartIndex = authorEndIndex + 3;
int userEndIndex = TextFindIndex(exText + userStartIndex, ")");
userEndIndex += userStartIndex;
strncpy(exInfo->authorGitHub, exText + userStartIndex, userEndIndex - userStartIndex);
}
else strcpy(exInfo->author, "<author_name>");
if (authorGitIndex > 0)
else // GitHub user not found to set end, using '\n'
{
int authorGitEndIndex = TextFindIndex(exText + authorGitIndex, ")");
if (authorGitEndIndex > 0) strncpy(exInfo->authorGitHub, exText + authorGitIndex + 2, authorGitEndIndex - (authorGitIndex + 2));
authorEndIndex = TextFindIndex(exText + authorStartIndex, "\n");
authorEndIndex += authorStartIndex;
strncpy(exInfo->author, exText + authorStartIndex, authorEndIndex - authorStartIndex);
}
else strcpy(exInfo->authorGitHub, "<user_github>");
// TODO: Verify copyright line
// Copyright (c) <year_created>-<year_updated> <user_name> (@<user_github>)
UnloadFileText(exText);
}
@ -1491,6 +1572,12 @@ rlExampleInfo *GetExampleInfo(const char *exFileName)
return exInfo;
}
// Unload example information
static void UnloadExampleInfo(rlExampleInfo *exInfo)
{
RL_FREE(exInfo);
}
// raylib example line info parser
// Parses following line format: core;core_basic_window;;1.0;1.0;"Ray";@raysan5
static int ParseExampleInfoLine(const char *line, rlExampleInfo *entry)
@ -1531,7 +1618,7 @@ static int ParseExampleInfoLine(const char *line, rlExampleInfo *entry)
if (tokens[5][0] == '"') tokens[5] += 1;
if (tokens[5][strlen(tokens[5]) - 1] == '"') tokens[5][strlen(tokens[5]) - 1] = '\0';
strcpy(entry->author, tokens[5]);
strcpy(entry->authorGitHub, tokens[6]);
strcpy(entry->authorGitHub, tokens[6] + 1); // Skip '@'
return 1;
}

Loading…
Откажи
Сачувај