blob: 7d629dca71a5a31687c9e63a9173db2440404428 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
cmake_minimum_required(VERSION 3.0)
include(cmake/shader.txt)
add_subdirectory(contrib/cgltf)
add_subdirectory(contrib/cgltf-tangents)
add_subdirectory(contrib/stb)
project(gfx)
add_shader_library(shaders
shaders/brdf_integration_map.frag
shaders/cook_torrance.frag
shaders/cook_torrance.vert
shaders/cubemap_filtering.vert
shaders/debug3d.frag
shaders/debug3d.vert
shaders/immediate_mode.frag
shaders/immediate_mode.vert
shaders/irradiance_map.frag
shaders/prefiltered_environment_map.frag
shaders/quad.vert
shaders/skyquad.frag
shaders/skyquad.vert
shaders/view_normal_mapped_normals.frag
shaders/view_normal_mapped_normals.vert
shaders/view_normals.frag
shaders/view_normals.vert
shaders/view_tangents.frag
shaders/view_tangents.vert
shaders/view_texture.frag
shaders/view_texture.vert)
add_library(gfx SHARED
src/asset/asset_cache.c
src/asset/model.c
src/asset/texture.c
src/core/buffer.c
src/core/core.c
src/core/framebuffer.c
src/core/geometry.c
src/core/renderbuffer.c
src/core/shader_program.c
src/core/shader.c
src/core/texture.c
src/renderer/imm_renderer.c
src/renderer/renderer.c
src/scene/animation.c
src/scene/camera.c
src/scene/light.c
src/scene/material.c
src/scene/mesh.c
src/scene/model.c
src/scene/node.c
src/scene/object.c
src/scene/scene.c
src/scene/scene_memory.c
src/gfx.c
src/util/geometry.c
src/util/ibl.c
src/util/shader.c
src/util/skyquad.c)
target_include_directories(gfx PUBLIC
include)
target_include_directories(gfx PRIVATE
src)
target_compile_options(gfx PRIVATE -std=gnu11 -Wall -Wextra -Wpedantic)
target_link_libraries(gfx PUBLIC
cstring
math)
target_link_libraries(gfx PRIVATE
cassert
cgltf
cgltf-tangents
error
gfx-app
log
mempool
shaders
stb
# System libraries.
GL
# Required to initialize GLAD.
-ldl)
|