projects
/
vrtris
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mesh loading
[vrtris]
/
src
/
gamescr.c
diff --git
a/src/gamescr.c
b/src/gamescr.c
index
de314ae
..
52db999
100644
(file)
--- a/
src/gamescr.c
+++ b/
src/gamescr.c
@@
-1,4
+1,5
@@
#include "screen.h"
#include "screen.h"
+#include "cmesh.h"
static int init(void);
static void cleanup(void);
static int init(void);
static void cleanup(void);
@@
-29,14
+30,23
@@
struct game_screen game_screen = {
wheel
};
wheel
};
+static struct cmesh *blkmesh;
static int init(void)
{
static int init(void)
{
+ if(!(blkmesh = cmesh_alloc())) {
+ return -1;
+ }
+ if(cmesh_load(blkmesh, "data/noisecube.obj") == -1) {
+ fprintf(stderr, "failed to load block model\n");
+ return -1;
+ }
return 0;
}
static void cleanup(void)
{
return 0;
}
static void cleanup(void)
{
+ cmesh_free(blkmesh);
}
static void start(void)
}
static void start(void)