tiny_gltf 1.0.0 → 2.5.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,6 +7,7 @@
7
7
  #endif
8
8
 
9
9
  #include <time.h> // work around C++/C linkage error on some platforms
10
+ #include "ruby.h"
10
11
 
11
12
  #if __cplusplus
12
13
  #include <algorithm>
@@ -15,8 +16,6 @@
15
16
  extern "C" {
16
17
  #endif
17
18
 
18
- #include "ruby.h"
19
-
20
19
  void Init_tiny_gltf(void);
21
20
  VALUE rb_tgltf_load(int argc, VALUE *argv, VALUE self);
22
21
 
@@ -11,7 +11,7 @@ VALUE rMesh_new(const Mesh *mesh, VALUE rmodel) {
11
11
 
12
12
  VALUE rweights = rb_ary_new();
13
13
  for (size_t i = 0; i < mesh->weights.size(); i++) {
14
- rb_ary_push(rprimitives, DBL2NUM(mesh->weights[i]));
14
+ rb_ary_push(rweights, DBL2NUM(mesh->weights[i]));
15
15
  }
16
16
 
17
17
  rb_ivar_set(rmesh, rb_intern("@model"), rmodel);
@@ -10,7 +10,9 @@ VALUE rSampler_new(const Sampler *sampler, VALUE rmodel) {
10
10
  rb_ivar_set(rsampler, rb_intern("@mag_filter"), texture_filter_to_sym(sampler->magFilter));
11
11
  rb_ivar_set(rsampler, rb_intern("@wrap_s"), texture_wrap_to_sym(sampler->wrapS));
12
12
  rb_ivar_set(rsampler, rb_intern("@wrap_t"), texture_wrap_to_sym(sampler->wrapT));
13
- rb_ivar_set(rsampler, rb_intern("@wrap_r"), texture_wrap_to_sym(sampler->wrapR));
13
+ // removed from tiny_gltf until a spec or extension actually calls for it
14
+ // https://github.com/syoyo/tinygltf/issues/287
15
+ // rb_ivar_set(rsampler, rb_intern("@wrap_r"), texture_wrap_to_sym(sampler->wrapR));
14
16
  rb_ivar_set(rsampler, rb_intern("@extras"), rValue_new(&sampler->extras, rmodel));
15
17
 
16
18
  return rsampler;
@@ -15,8 +15,7 @@
15
15
  .function = {
16
16
  .dmark = NULL,
17
17
  .dfree = Model_free,
18
- .dsize = Model_size,
19
- .reserved = { 0, 0 }
18
+ .dsize = Model_size
20
19
  },
21
20
  .parent = NULL,
22
21
  .data = NULL,
@@ -49,8 +48,7 @@
49
48
  .function = { \
50
49
  .dmark = NULL, \
51
50
  .dfree = klass ## _free, \
52
- .dsize = klass ## _size, \
53
- .reserved = { 0, 0 } \
51
+ .dsize = klass ## _size \
54
52
  }, \
55
53
  .parent = NULL, \
56
54
  .data = NULL, \