Esempio n. 1
0
func NewRenderWindowDefault(mode VideoMode, title string) RenderWindow {
	style := StyleDefaultStyle
	ctitle := C.CString(title)
	ref := C.sfRenderWindow_create(*mode.Cref, ctitle, C.sfUint32(style), nil)

	return RenderWindow{ref}
}
Esempio n. 2
0
// \brief Construct a new render window
//
// \param mode     Video mode to use
// \param title    Title of the window
// \param style    Window style
// \param settings Creation settings (pass NULL to use default values)
//
// sfRenderWindow* sfRenderWindow_create(sfVideoMode mode, const char* title, sfUint32 style, const sfContextSettings* settings);
func NewRenderWindow(mode VideoMode, title string, style uint32, settings ContextSettings) RenderWindow {
	ctitle := C.CString(title)
	defer C.free(unsafe.Pointer(ctitle))
	ref := C.sfRenderWindow_create(*mode.Cref, ctitle, C.sfUint32(style), settings.Cref)
	return RenderWindow{ref}
}