From 948bbbddf79b623fc808d0399607c06b42c30839 Mon Sep 17 00:00:00 2001 From: giongto35 Date: Thu, 4 Apr 2019 02:10:29 +0800 Subject: [PATCH] Remove gl --- Dockerfile | 1 - ui/director.go | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 347ad6de..71b7cbbc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,3 @@ COPY . /go/src/github.com/giongto35/game-online/ # Install server dependencies RUN go get github.com/pions/webrtc -RUN go get github.com/go-gl/glfw/v3.2/glfw diff --git a/ui/director.go b/ui/director.go index a0e12316..08fcf3f2 100644 --- a/ui/director.go +++ b/ui/director.go @@ -39,13 +39,12 @@ func (d *Director) SetView(view View) { if d.view != nil { d.view.Enter() } - //d.timestamp = glfw.GetTime() - d.timestamp = float64(time.Now().Unix()) + d.timestamp = float64(time.Now().Nanosecond()) / float64(time.Second) } func (d *Director) Step() { //gl.Clear(gl.COLOR_BUFFER_BIT) - timestamp := float64(time.Now().Unix()) + timestamp := float64(time.Now().Nanosecond()) / float64(time.Second) fmt.Println("Time stamp", timestamp) dt := timestamp - d.timestamp fmt.Println("dt", dt) @@ -66,7 +65,6 @@ func (d *Director) Start(paths []string) { func (d *Director) Run() { for { d.Step() - //glfw.PollEvents() } d.SetView(nil) }