chore: resource loading textures examples
This commit is contained in:
parent
391a2dc8cb
commit
14a268cd7c
|
|
@ -1,6 +0,0 @@
|
||||||
module(name = "raylib_examples")
|
|
||||||
|
|
||||||
bazel_dep(name = "rules_cc", version = "0.0.9")
|
|
||||||
bazel_dep(name = "platforms", version = "0.0.10")
|
|
||||||
bazel_dep(name = "raylib")
|
|
||||||
local_path_override(module_name = "raylib", path = "..")
|
|
||||||
3
examples/core/MODULE.bazel
Normal file
3
examples/core/MODULE.bazel
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
bazel_dep(name = "rules_cc", version = "0.0.9")
|
||||||
|
bazel_dep(name = "raylib")
|
||||||
|
local_path_override(module_name = "raylib", path = "../..")
|
||||||
3
examples/shapes/MODULE.bazel
Normal file
3
examples/shapes/MODULE.bazel
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
bazel_dep(name = "rules_cc", version = "0.0.9")
|
||||||
|
bazel_dep(name = "raylib")
|
||||||
|
local_path_override(module_name = "raylib", path = "../..")
|
||||||
1
examples/textures/.bazelrc
Normal file
1
examples/textures/.bazelrc
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
common --enable_runfiles
|
||||||
|
|
@ -1,28 +1,39 @@
|
||||||
load("@rules_cc//cc:defs.bzl", "cc_binary")
|
load("@rules_cc//cc:defs.bzl", "cc_binary")
|
||||||
|
|
||||||
# NOTE: cc_binary runs in a different location meaning these examples cannot
|
|
||||||
# find the resources to run. Instead you must manually execute the built
|
|
||||||
# executable.
|
|
||||||
|
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_background_scrolling",
|
name = "textures_background_scrolling",
|
||||||
srcs = ["textures_background_scrolling.c"],
|
srcs = ["textures_background_scrolling.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/cyberpunk_street_background.png",
|
||||||
|
"resources/cyberpunk_street_midground.png",
|
||||||
|
"resources/cyberpunk_street_foreground.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_blend_modes",
|
name = "textures_blend_modes",
|
||||||
srcs = ["textures_blend_modes.c"],
|
srcs = ["textures_blend_modes.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/cyberpunk_street_background.png",
|
||||||
|
"resources/cyberpunk_street_foreground.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_bunnymark",
|
name = "textures_bunnymark",
|
||||||
srcs = ["textures_bunnymark.c"],
|
srcs = ["textures_bunnymark.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/wabbit_alpha.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_draw_tiled",
|
name = "textures_draw_tiled",
|
||||||
srcs = ["textures_draw_tiled.c"],
|
srcs = ["textures_draw_tiled.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/patterns.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_fog_of_war",
|
name = "textures_fog_of_war",
|
||||||
|
|
@ -33,11 +44,19 @@ cc_binary(
|
||||||
name = "textures_gif_player",
|
name = "textures_gif_player",
|
||||||
srcs = ["textures_gif_player.c"],
|
srcs = ["textures_gif_player.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/scarfy_run.gif",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_image_drawing",
|
name = "textures_image_drawing",
|
||||||
srcs = ["textures_image_drawing.c"],
|
srcs = ["textures_image_drawing.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/cat.png",
|
||||||
|
"resources/parrots.png",
|
||||||
|
"resources/custom_jupiter_crash.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_image_generation",
|
name = "textures_image_generation",
|
||||||
|
|
@ -48,26 +67,42 @@ cc_binary(
|
||||||
name = "textures_image_loading",
|
name = "textures_image_loading",
|
||||||
srcs = ["textures_image_loading.c"],
|
srcs = ["textures_image_loading.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/raylib_logo.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_image_processing",
|
name = "textures_image_processing",
|
||||||
srcs = ["textures_image_processing.c"],
|
srcs = ["textures_image_processing.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/parrots.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_image_rotate",
|
name = "textures_image_rotate",
|
||||||
srcs = ["textures_image_rotate.c"],
|
srcs = ["textures_image_rotate.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/raylib_logo.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_image_text",
|
name = "textures_image_text",
|
||||||
srcs = ["textures_image_text.c"],
|
srcs = ["textures_image_text.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/parrots.png",
|
||||||
|
"resources/KAISG.ttf",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_logo_raylib",
|
name = "textures_logo_raylib",
|
||||||
srcs = ["textures_logo_raylib.c"],
|
srcs = ["textures_logo_raylib.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/raylib_logo.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_mouse_painting",
|
name = "textures_mouse_painting",
|
||||||
|
|
@ -78,54 +113,89 @@ cc_binary(
|
||||||
name = "textures_npatch_drawing",
|
name = "textures_npatch_drawing",
|
||||||
srcs = ["textures_npatch_drawing.c"],
|
srcs = ["textures_npatch_drawing.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/ninepatch_button.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_particles_blending",
|
name = "textures_particles_blending",
|
||||||
srcs = ["textures_particles_blending.c"],
|
srcs = ["textures_particles_blending.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/spark_flame.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_polygon",
|
name = "textures_polygon",
|
||||||
srcs = ["textures_polygon.c"],
|
srcs = ["textures_polygon.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/cat.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_raw_data",
|
name = "textures_raw_data",
|
||||||
srcs = ["textures_raw_data.c"],
|
srcs = ["textures_raw_data.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/fudesumi.raw",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_sprite_anim",
|
name = "textures_sprite_anim",
|
||||||
srcs = ["textures_sprite_anim.c"],
|
srcs = ["textures_sprite_anim.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/scarfy.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_sprite_button",
|
name = "textures_sprite_button",
|
||||||
srcs = ["textures_sprite_button.c"],
|
srcs = ["textures_sprite_button.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/buttonfx.wav",
|
||||||
|
"resources/button.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_sprite_explosion",
|
name = "textures_sprite_explosion",
|
||||||
srcs = ["textures_sprite_explosion.c"],
|
srcs = ["textures_sprite_explosion.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/boom.wav",
|
||||||
|
"resources/explosion.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_srcrec_dstrec",
|
name = "textures_srcrec_dstrec",
|
||||||
srcs = ["textures_srcrec_dstrec.c"],
|
srcs = ["textures_srcrec_dstrec.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/scarfy.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_svg_loading",
|
name = "textures_svg_loading",
|
||||||
srcs = ["textures_svg_loading.c"],
|
srcs = ["textures_svg_loading.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/test.svg",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_textured_curve",
|
name = "textures_textured_curve",
|
||||||
srcs = ["textures_textured_curve.c"],
|
srcs = ["textures_textured_curve.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/road.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "textures_to_image",
|
name = "textures_to_image",
|
||||||
srcs = ["textures_to_image.c"],
|
srcs = ["textures_to_image.c"],
|
||||||
deps = ["@raylib"],
|
deps = ["@raylib"],
|
||||||
|
data = [
|
||||||
|
"resources/raylib_logo.png",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|
|
||||||
3
examples/textures/MODULE.bazel
Normal file
3
examples/textures/MODULE.bazel
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
bazel_dep(name = "rules_cc", version = "0.0.9")
|
||||||
|
bazel_dep(name = "raylib")
|
||||||
|
local_path_override(module_name = "raylib", path = "../..")
|
||||||
Loading…
Reference in New Issue
Block a user