devil 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -1
- data/Rakefile +1 -1
- data/ext/devil/ruby_il.c +11 -5
- data/lib/devil.rb +1 -1
- metadata +1 -1
data/README
CHANGED
data/Rakefile
CHANGED
data/ext/devil/ruby_il.c
CHANGED
@@ -117,7 +117,9 @@ static VALUE il_TexImage(VALUE obj, VALUE rb_width, VALUE rb_height,
|
|
117
117
|
ILubyte bpp = NUM2INT(rb_bpp);
|
118
118
|
ILenum format = NUM2INT(rb_format);
|
119
119
|
ILenum type = NUM2INT(rb_type);
|
120
|
-
|
120
|
+
|
121
|
+
/* from ILvoid */
|
122
|
+
void* data = ImageData2Arr(rb_data);
|
121
123
|
|
122
124
|
ILboolean flag = ilTexImage(width, height, depth,
|
123
125
|
bpp, format, type, data);
|
@@ -130,7 +132,8 @@ static VALUE il_GetData(VALUE obj) {
|
|
130
132
|
}
|
131
133
|
|
132
134
|
ILuint ilCopyPixels(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width,
|
133
|
-
|
135
|
+
/* changed from ILvoid */
|
136
|
+
ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void
|
134
137
|
*Data);
|
135
138
|
|
136
139
|
static VALUE il_CopyPixels(VALUE obj, VALUE rb_XOff, VALUE rb_YOff, VALUE rb_ZOff,
|
@@ -144,14 +147,16 @@ static VALUE il_CopyPixels(VALUE obj, VALUE rb_XOff, VALUE rb_YOff, VALUE rb_ZOf
|
|
144
147
|
ILuint Depth = NUM2INT(rb_Depth);
|
145
148
|
ILenum Format = NUM2INT(rb_Format);
|
146
149
|
ILenum Type = NUM2INT(rb_Type);
|
147
|
-
ILvoid
|
150
|
+
/* ILvoid */
|
151
|
+
void* data = ImageData2Arr(rb_data);
|
148
152
|
|
149
153
|
ILuint uint = ilCopyPixels(XOff, YOff, ZOff, Width, Height, Depth, Format, Type, data);
|
150
154
|
return INT2FIX(uint);
|
151
155
|
}
|
152
156
|
|
153
157
|
static VALUE il_SetData(VALUE obj, VALUE rb_Data) {
|
154
|
-
ILvoid
|
158
|
+
/* ILvoid */
|
159
|
+
void* data = ImageData2Arr(rb_Data);
|
155
160
|
ILboolean flag = ilSetData(data);
|
156
161
|
return flag ? Qtrue : Qfalse;
|
157
162
|
}
|
@@ -167,7 +172,8 @@ static VALUE il_SetPixels(VALUE obj, VALUE rb_XOff, VALUE rb_YOff, VALUE rb_ZOff
|
|
167
172
|
ILuint Depth = NUM2INT(rb_Depth);
|
168
173
|
ILenum Format = NUM2INT(rb_Format);
|
169
174
|
ILenum Type = NUM2INT(rb_Type);
|
170
|
-
ILvoid
|
175
|
+
/* ILvoid */
|
176
|
+
void* data = ImageData2Arr(rb_data);
|
171
177
|
|
172
178
|
ilSetPixels(XOff, YOff, ZOff, Width, Height, Depth, Format, Type, data);
|
173
179
|
return Qnil;
|
data/lib/devil.rb
CHANGED
@@ -14,7 +14,7 @@ end
|
|
14
14
|
|
15
15
|
# Provides a high level wrapper for the low-level DevIL Ruby bindings
|
16
16
|
module Devil
|
17
|
-
VERSION = '0.1.
|
17
|
+
VERSION = '0.1.2'
|
18
18
|
|
19
19
|
# loads +file+ and returns a new image
|
20
20
|
# Optionally accepts a block and yields the newly created image to the block.
|