Class: GLFWimage

Inherits:
Object
  • Object
show all
Defined in:
ext/glfw/glfw.c

Instance Method Summary collapse

Instance Method Details

#BytesPerPixelObject

Returns number of bytes per pixel for the image



618
619
620
621
622
623
# File 'ext/glfw/glfw.c', line 618

static VALUE GLFWimage_BPP(VALUE obj)
{
	GLFWimage *img;
	Data_Get_Struct(obj,GLFWimage,img);
	return INT2NUM(img->BytesPerPixel);
}

#FormatObject

Returns OpenGL format of the image (GL_RGB, GL_LUMINANCE etc.)



610
611
612
613
614
615
# File 'ext/glfw/glfw.c', line 610

static VALUE GLFWimage_format(VALUE obj)
{
	GLFWimage *img;
	Data_Get_Struct(obj,GLFWimage,img);
	return INT2NUM(img->Format);
}

#HeightObject

Returns height of the image



602
603
604
605
606
607
# File 'ext/glfw/glfw.c', line 602

static VALUE GLFWimage_height(VALUE obj)
{
	GLFWimage *img;
	Data_Get_Struct(obj,GLFWimage,img);
	return INT2NUM(img->Height);
}

#WidthObject

Returns width of the image



594
595
596
597
598
599
# File 'ext/glfw/glfw.c', line 594

static VALUE GLFWimage_width(VALUE obj)
{
	GLFWimage *img;
	Data_Get_Struct(obj,GLFWimage,img);
	return INT2NUM(img->Width);
}