glfw3 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/ext/glfw3/glfw3.c +9 -16
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04b115183cc1105a01afe479ae7484675afdecb9
4
- data.tar.gz: e84131bf7f2bbcd94704f13301b152313a7a3f51
3
+ metadata.gz: 2ca96e29004915535c49657610b02fedcc61f4a0
4
+ data.tar.gz: e2222b2228777afb9fb154c3897e936548ed428e
5
5
  SHA512:
6
- metadata.gz: 58fd7abf15e3f9a3faf99a9596d5e3e3c4a469d62fe1512214d9382bac596f4166cc5dba2afc54b790603dfd9a6c415890db3426a073f62475839dc26ebcb03d
7
- data.tar.gz: 3aa6ef8343bfb8cc1de0a9f31796522baf44f61a0ff68073e2fdd06c9d9cb9ca4d611b441984d2f6d856f642482c872f453cf010248d0dd754d4fbec03d238eb
6
+ metadata.gz: bbab447b1a922f4ff24dcdcb7e7267329d7c904ec0253aa08e209da8dd236633bc0e4751a33ddc9c3646f0be7b98462b25f7622a34b418b55fe9ee98dcc32b37
7
+ data.tar.gz: e7619f4b7269cc011c612b563f85f320dd3431b797f9f2ca285e887dc208b56d4b0f8d1674040488daeab82c0184b7c03985255b55439268913938d43ef8f803
data/ext/glfw3/glfw3.c CHANGED
@@ -2,13 +2,6 @@
2
2
  #include <GLFW/glfw3.h>
3
3
 
4
4
 
5
- typedef struct s_rb_glfw_error
6
- {
7
- VALUE error_code; // mark
8
- VALUE description; // mark
9
- } rb_glfw_error_t;
10
-
11
-
12
5
  static const char *kRB_IVAR_WINDOW_INTERNAL_NAME = "@__internal_window";
13
6
  static const char *kRB_IVAR_WINDOW_KEY_CALLBACK_NAME = "@__key_callback";
14
7
  static const char *kRB_IVAR_WINDOW_CHAR_CALLBACK_NAME = "@__char_callback";
@@ -571,13 +564,13 @@ static VALUE rb_window_window_hint(VALUE self, VALUE target, VALUE hint)
571
564
  }
572
565
 
573
566
 
574
- // Auxiliary function for extracting a Glfw::Window object from a GLFWwindow.
567
+ /* Auxiliary function for extracting a Glfw::Window object from a GLFWwindow. */
575
568
  static VALUE rb_lookup_window(GLFWwindow *window)
576
569
  {
577
570
  return (VALUE)glfwGetWindowUserPointer(window);
578
571
  }
579
572
 
580
- // And the opposite of rb_lookup_window
573
+ /* And the opposite of rb_lookup_window */
581
574
  static GLFWwindow *rb_get_window(VALUE rb_window)
582
575
  {
583
576
  GLFWwindow *window = NULL;
@@ -616,7 +609,7 @@ static VALUE rb_window_new(int argc, VALUE *argv, VALUE self)
616
609
  GLFWmonitor *monitor = NULL;
617
610
  GLFWwindow *share = NULL;
618
611
 
619
- // Grab arguments
612
+ /* Grab arguments */
620
613
  rb_scan_args(argc, argv, "23", &rb_width, &rb_height, &rb_title, &rb_monitor, &rb_share);
621
614
 
622
615
  width = NUM2INT(rb_width);
@@ -638,17 +631,17 @@ static VALUE rb_window_new(int argc, VALUE *argv, VALUE self)
638
631
  Data_Get_Struct(rb_shared_window, GLFWwindow, share);
639
632
  }
640
633
 
641
- // Create GLFW window
634
+ /* Create GLFW window */
642
635
  window = glfwCreateWindow(width, height, title, monitor, share);
643
636
  if (window == NULL) {
644
637
  return Qnil;
645
638
  }
646
639
 
647
- // Allocate the window wrapper (only used to store the window pointer)
640
+ /* Allocate the window wrapper (only used to store the window pointer) */
648
641
  rb_window_data = Data_Wrap_Struct(s_glfw_window_internal_klass, 0, 0, window);
649
642
  rb_obj_call_init(rb_window_data, 0, 0);
650
643
 
651
- // Allocate the window
644
+ /* Allocate the window */
652
645
  rb_window = rb_obj_alloc(s_glfw_window_klass);
653
646
 
654
647
  rb_ivar_set(rb_window, ivar_window, rb_window_data);
@@ -669,7 +662,7 @@ static VALUE rb_window_new(int argc, VALUE *argv, VALUE self)
669
662
  glfwSetWindowUserPointer(window, (void *)rb_window);
670
663
  rb_obj_call_init(rb_window, 0, 0);
671
664
 
672
- // Store the window so it can't go out of scope until explicitly destroyed.
665
+ /* Store the window so it can't go out of scope until explicitly destroyed. */
673
666
  rb_windows = rb_cvar_get(self, kRB_CVAR_WINDOW_WINDOWS);
674
667
  rb_hash_aset(rb_windows, INT2FIX((int)window), rb_window);
675
668
 
@@ -903,7 +896,7 @@ static VALUE rb_window_get_monitor(VALUE self)
903
896
  GLFWmonitor *monitor = glfwGetWindowMonitor(rb_get_window(self));
904
897
  VALUE rb_monitor = Qnil;
905
898
  if (monitor != NULL) {
906
- // windowed mode
899
+ /* windowed mode */
907
900
  Data_Wrap_Struct(s_glfw_monitor_klass, 0, 0, monitor);
908
901
  rb_obj_call_init(rb_monitor, 0, 0);
909
902
  }
@@ -1581,7 +1574,7 @@ void Init_glfw3(void)
1581
1574
  rb_define_singleton_method(s_glfw_module, "swap_interval=", rb_glfw_swap_interval, 1);
1582
1575
  rb_define_singleton_method(s_glfw_module, "extension_supported?", rb_glfw_extension_supported, 1);
1583
1576
 
1584
- // DEFINE ALL THE THINGS
1577
+ /* DEFINE ALL THE THINGS */
1585
1578
  rb_const_set(s_glfw_module, rb_intern("VERSION_MAJOR"), INT2FIX(GLFW_VERSION_MAJOR));
1586
1579
  rb_const_set(s_glfw_module, rb_intern("VERSION_MINOR"), INT2FIX(GLFW_VERSION_MINOR));
1587
1580
  rb_const_set(s_glfw_module, rb_intern("VERSION_REVISION"), INT2FIX(GLFW_VERSION_REVISION));
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glfw3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noel Raymond Cower
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-16 00:00:00.000000000 Z
11
+ date: 2013-07-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: GLFW 3 bindings for Ruby 2.x
14
14
  email: ncower@gmail.com
@@ -35,7 +35,7 @@ metadata: {}
35
35
  post_install_message:
36
36
  rdoc_options:
37
37
  - --title
38
- - core-opengl -- OpenGL Core Profile Bindings
38
+ - GLFW 3 Bindings
39
39
  - --main
40
40
  - README.md
41
41
  - --line-numbers