Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go routine adjustment in main #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions azul3d_debug_camera/azul3d_debug_camera.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,28 +187,32 @@ func gfxLoopWindow2(w window.Window, d gfx.Device) {
}

func main() {
// Routine for the Main Camera
go func() {
// Create our windows.
props := window.NewProps()
props.SetTitle("Main camera {FPS}")
props.SetPos(0, 0)
props.SetPos(0, 100)
props.SetSize(640, 400)
w, r, err := window.New(props)
if err != nil {
log.Fatal(err)
}

props = window.NewProps()
gfxLoopWindow1(w, r)
}()

// Routine for the Observer Camera
go func() {
props := window.NewProps()
props.SetTitle("Observer {FPS}")
props.SetPos(640, 0)
props.SetPos(640, 100)
props.SetSize(640, 400)
w2, r2, err := window.New(props)
if err != nil {
log.Fatal(err)
}

go gfxLoopWindow1(w, r)
go gfxLoopWindow2(w2, r2)
gfxLoopWindow2(w2, r2)
}()

// Enter the main loop.
Expand Down