projects
/
demo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
52e22c0
)
no clue :) just to push it
foo
master
author
Eleni Maria Stea
<estea@igalia.com>
Thu, 21 Mar 2019 21:00:14 +0000
(23:00 +0200)
committer
Eleni Maria Stea
<estea@igalia.com>
Thu, 21 Mar 2019 21:00:14 +0000
(23:00 +0200)
src/main.cc
patch
|
blob
|
history
diff --git
a/src/main.cc
b/src/main.cc
index
affeff7
..
aeb57a6
100644
(file)
--- a/
src/main.cc
+++ b/
src/main.cc
@@
-72,6
+72,7
@@
static TerrainParams p;
static Texture *skybox_tex;
static Texture *irradiance_tex;
static Texture *terrain_tex;
static Texture *skybox_tex;
static Texture *irradiance_tex;
static Texture *terrain_tex;
+static Texture *dirt_tex;
static Material terrain_mat;
static Renderer *terrain_rend;
static Material terrain_mat;
static Renderer *terrain_rend;
@@
-136,7
+137,13
@@
static bool init(Gfx_API api)
terrain_tex = gfx_create_texture();
if(!terrain_tex->load("data/grass.jpeg")) {
terrain_tex = gfx_create_texture();
if(!terrain_tex->load("data/grass.jpeg")) {
- fprintf(stderr, "Failed to load ground texture.\n");
+ fprintf(stderr, "Failed to load ground grass texture.\n");
+ return false;
+ }
+
+ dirt_tex = gfx_create_texture();
+ if(!dirt_tex->load("data/dirt.jpg")) {
+ fprintf(stderr, "Failed to load ground dirt texture.\n");
return false;
}
return false;
}