コード例 #1
0
ファイル: gltest.go プロジェクト: pwaller/go-gl-testutils
// This should be used to resize the window during tests, to ensure that it is
// correctly resized before execution continues.
// Causes buffers to swap.
func SetWindowSize(width, height int) {
	glfw.SetWindowSize(width, height)
	// Need to wait for the reshape event, otherwise it happens at an arbitrary
	// point in the future (some unknown number of SwapBuffers())
	//glfw.PollEvents() // Doesn't work
	//glfw.WaitEvents() // might be racy (ideally, we'd need to send an event)
	time.Sleep(10 * time.Millisecond)
	glfw.SwapBuffers()
}
コード例 #2
0
ファイル: ng-window.go プロジェクト: Raven67854/go-ngine
func (me *WindowOptions) SetSize(width, height int) {
	if me.width, me.height = width, height; me.Created() {
		glfw.SetWindowSize(width, height)
	}
}
コード例 #3
0
ファイル: window.go プロジェクト: LonelyPale/go-ngine
func (me *window) SetSize(width, height int) {
	glfw.SetWindowSize(width, height)
}