Exemplo n.º 1
0
static VALUE Window_get_depthBits(VALUE vSelf) {
	// Get C++ object pointer from vSelf
	Window *pSelf;
	Data_Get_Struct(vSelf, Window, pSelf);
	return INT2FIX(pSelf->GetDepthBits());
}
Exemplo n.º 2
0
static VALUE Window_to_s(VALUE vSelf) {
	// Get C++ object pointer from vSelf
	Window *pSelf;
	Data_Get_Struct(vSelf, Window, pSelf);
	char szBuffer[256];
	sprintf(szBuffer, "Height: %d, Width: %d, Depth Bits: %d, Stencil Bits: %d", pSelf->GetWidth(), pSelf->GetHeight(), pSelf->GetDepthBits(), pSelf->GetStencilBits());
	return rb_str_new2(szBuffer);
}