示例#1
0
func (app *Application) resize(width int, height int) {
	// Resize viewport
	app.cam.SetNodeParamI(horde3d.Camera_ViewportXI, 0)
	app.cam.SetNodeParamI(horde3d.Camera_ViewportYI, 0)
	app.cam.SetNodeParamI(horde3d.Camera_ViewportWidthI, width)
	app.cam.SetNodeParamI(horde3d.Camera_ViewportHeightI, height)

	// Set virtual camera parameters
	horde3d.SetupCameraView(app.cam, 45.0, float32(width)/float32(height), 0.1, 1000.0)
	horde3d.ResizePipelineBuffers(app.hdrPipeRes, width, height)
	horde3d.ResizePipelineBuffers(app.forwardPipeRes, width, height)
}
示例#2
0
文件: glfw.go 项目: floffel03/gohorde
func onResize(w, h int) {
	if h == 0 {
		h = 1
	}

	cam.SetNodeParamI(horde3d.Camera_ViewportXI, 0)
	cam.SetNodeParamI(horde3d.Camera_ViewportYI, 0)
	cam.SetNodeParamI(horde3d.Camera_ViewportWidthI, w)
	cam.SetNodeParamI(horde3d.Camera_ViewportHeightI, h)

	horde3d.SetupCameraView(cam, 45.0, float32(w)/float32(h), 0.1, 1000.0)
	horde3d.ResizePipelineBuffers(pipeRes, w, h)

}