Method: IL.SetPixels

Defined in:
ext/devil/ruby_il.c

.SetPixels(rb_XOff, rb_YOff, rb_ZOff, rb_Width, rb_Height, rb_Depth, rb_Format, rb_Type, rb_data) ⇒ Object



170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'ext/devil/ruby_il.c', line 170

static VALUE il_SetPixels(VALUE obj, VALUE rb_XOff, VALUE rb_YOff, VALUE rb_ZOff,
                          VALUE rb_Width, VALUE rb_Height, VALUE rb_Depth, VALUE rb_Format,
                          VALUE rb_Type, VALUE rb_data) {
    ILuint XOff = NUM2INT(rb_XOff);
    ILuint YOff = NUM2INT(rb_YOff);
    ILuint ZOff = NUM2INT(rb_ZOff);
    ILuint Width = NUM2INT(rb_Width);
    ILuint Height = NUM2INT(rb_Height);
    ILuint Depth = NUM2INT(rb_Depth);
    ILenum Format = NUM2INT(rb_Format);
    ILenum Type = NUM2INT(rb_Type);
    /* ILvoid */
    void* data = ImageData2Arr(rb_data);

    ilSetPixels(XOff, YOff, ZOff, Width, Height, Depth, Format, Type, data);
    return Qnil;
}