111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
# File 'ext/devil/ruby_il.c', line 111
static VALUE il_TexImage(VALUE obj, VALUE rb_width, VALUE rb_height,
VALUE rb_depth, VALUE rb_bpp, VALUE rb_format, VALUE rb_type,
VALUE rb_data) {
ILuint width = NUM2INT(rb_width);
ILuint height = NUM2INT(rb_height);
ILuint depth = NUM2INT(rb_depth);
ILubyte bpp = NUM2INT(rb_bpp);
ILenum format = NUM2INT(rb_format);
ILenum type = NUM2INT(rb_type);
ILboolean flag;
/* from ILvoid */
void * data = NULL;
if(NIL_P(rb_data))
data = NULL;
else
data = ImageData2Arr(rb_data);
flag = ilTexImage(width, height, depth,
bpp, format, type, data);
return flag ? Qtrue : Qfalse;
}
|