stbimage 0.1.2 → 0.2.0

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/lib/stbimage.rb +10 -7
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69c08cb285862a8e9966b52a8af3c9f12d60c09e9554153f94a50793e8a94809
4
- data.tar.gz: b1b05a5a93b1305b89b2e987fefc460cf7c5210fcdd8b1ee7b0d5b24bc63c45e
3
+ metadata.gz: cd2fac88ebb74d0fbcd77f9c8023b3e7069d1fc959e8e81bbeffb6781dede3e7
4
+ data.tar.gz: 0fff22ec0287d01a33191db63938d50eb902c58ec1eeb5785ac1ea844633f9c2
5
5
  SHA512:
6
- metadata.gz: 1edc452c7dd5c83825ad0e20e6c049624bffa11532ff2d52ecbf34fc5677492f16bdc87b3cb2b4d8aaef28f8c33cd343d3928c7ceffb3dcf2e4a7a33822f64e0
7
- data.tar.gz: 703eb7853e6564251e83f478a85c0a51879f838b2cba9f6a65282c96d0f09684859e89630b7084013cb102be7209b7fd7a405267808de5044690015212121e79
6
+ metadata.gz: 85bd11a5b36083ccb9d15b0bd8b13cb544456c043aaaffb0ff2b725093ce80f917696d1f5d33f157570339da2b15778a0932839c4e195d72555279319334ebab
7
+ data.tar.gz: 6b36b4ec6d9711f68348c63890a494b00dc6ed008f3dccdbec891f92d69549e61549a877d7205af83f2fea7ba2add5aa8245ac8a218a862327b946ede7b41295
@@ -31,10 +31,18 @@ module STBIMAGE
31
31
 
32
32
  @@glfw_import_done = false
33
33
 
34
- # Load native library.
34
+ =begin
35
+ Load native dll libary
36
+ - lib = the name of the file
37
+ - path = route to the file
38
+ =end
35
39
  def self.load_lib(lib = nil, path = nil, output_error = false)
36
40
  if lib == nil && path == nil
37
- lib, path = 'stbDLL.dll', Dir.pwd
41
+ if RUBY_PLATFORM == "x64-mswin64_140" || RUBY_PLATFORM == "x64-mingw32"
42
+ lib, path = 'stbDLL_x64.dll', '../dlls'
43
+ elsif RUBY_PLATFORM == "x86-mingw32"
44
+ lib, path = 'stbDLL_x86.dll', '../dlls'
45
+ end
38
46
  end
39
47
 
40
48
  if path
@@ -45,11 +53,6 @@ module STBIMAGE
45
53
  import_symbols(output_error) unless @@glfw_import_done
46
54
  end
47
55
 
48
- def self.load_dll(lib = nil, path = nil)
49
- puts "Warning STBIMAGE.load_dll is deprecated, use GLFW.load_lib instead"
50
- self.load_lib(lib, path)
51
- end
52
-
53
56
  @@lib_signature = [
54
57
  'void stbi_convert_iphone_png_to_rgb(int)',
55
58
  'const char *stbi_failure_reason(void)',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stbimage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Keresztes
@@ -10,9 +10,9 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2021-01-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: |-
14
- Beta Version!!! Will be developed! So far compatible with: stbi_load, stbi_set_flip_vertically_on_load(). For an easier
15
- soulution, I choose fiddle as function importer from the dll (You should give the dll libary with the .load_lib(lib, path) function (Only works with windows so far!!!!!). PLEASE CHECK OUT THE HOMEPAGE FOR MORE INFO AND EXAMPLE
13
+ description: "!Beta Version! Will be developed! So far compatible with: stbi_load,
14
+ stbi_set_flip_vertically_on_load(). Only works with windows so far!!!!!. PLEASE
15
+ CHECK OUT THE HOMEPAGE FOR MORE INFO AND EXAMPLE"
16
16
  email: ''
17
17
  executables: []
18
18
  extensions: []