mirror of
https://github.com/bloeys/nmage.git
synced 2025-12-29 13:28:20 +00:00
Disable vsync+default ambient to 0.1+ignore imgui.ini
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -13,4 +13,5 @@
|
|||||||
|
|
||||||
# Dependency directories (remove the comment below to include it)
|
# Dependency directories (remove the comment below to include it)
|
||||||
vendor/
|
vendor/
|
||||||
.vscode/
|
.vscode/
|
||||||
|
imgui.ini
|
||||||
8
go.mod
8
go.mod
@ -7,11 +7,9 @@ require github.com/veandco/go-sdl2 v0.4.10
|
|||||||
require github.com/go-gl/gl v0.0.0-20211025173605-bda47ffaa784
|
require github.com/go-gl/gl v0.0.0-20211025173605-bda47ffaa784
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/bloeys/gglm v0.2.6
|
github.com/bloeys/assimp-go v0.2.0
|
||||||
|
github.com/bloeys/gglm v0.3.0
|
||||||
github.com/inkyblackness/imgui-go/v4 v4.3.0
|
github.com/inkyblackness/imgui-go/v4 v4.3.0
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require github.com/inkyblackness/imgui-go v1.12.0 // indirect
|
||||||
github.com/bloeys/assimp-go v0.2.0 // indirect
|
|
||||||
github.com/inkyblackness/imgui-go v1.12.0 // indirect
|
|
||||||
)
|
|
||||||
|
|||||||
2
go.sum
2
go.sum
@ -8,6 +8,8 @@ github.com/bloeys/gglm v0.2.5 h1:ESCk+zSeun3ogm6IEJ+CwPSf6PunszWSkRw3MmG4OCk=
|
|||||||
github.com/bloeys/gglm v0.2.5/go.mod h1:qwJQ0WzV191wAMwlGicbfbChbKoSedMk7gFFX6GnyOk=
|
github.com/bloeys/gglm v0.2.5/go.mod h1:qwJQ0WzV191wAMwlGicbfbChbKoSedMk7gFFX6GnyOk=
|
||||||
github.com/bloeys/gglm v0.2.6 h1:+6m+GZuabU9GRhtEfqz7NS3fewO1xMcjJEenKVPRosM=
|
github.com/bloeys/gglm v0.2.6 h1:+6m+GZuabU9GRhtEfqz7NS3fewO1xMcjJEenKVPRosM=
|
||||||
github.com/bloeys/gglm v0.2.6/go.mod h1:qwJQ0WzV191wAMwlGicbfbChbKoSedMk7gFFX6GnyOk=
|
github.com/bloeys/gglm v0.2.6/go.mod h1:qwJQ0WzV191wAMwlGicbfbChbKoSedMk7gFFX6GnyOk=
|
||||||
|
github.com/bloeys/gglm v0.3.0 h1:5meoMRquQZgkV4h+Li11SD5S89wML+yMcLAIqR75wkQ=
|
||||||
|
github.com/bloeys/gglm v0.3.0/go.mod h1:qwJQ0WzV191wAMwlGicbfbChbKoSedMk7gFFX6GnyOk=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/go-gl/gl v0.0.0-20210905235341-f7a045908259 h1:8q7+xl2D2qHPLTII1t4vSMNP2VKwDcn+Avf2WXvdB1A=
|
github.com/go-gl/gl v0.0.0-20210905235341-f7a045908259 h1:8q7+xl2D2qHPLTII1t4vSMNP2VKwDcn+Avf2WXvdB1A=
|
||||||
github.com/go-gl/gl v0.0.0-20210905235341-f7a045908259/go.mod h1:wjpnOv6ONl2SuJSxqCPVaPZibGFdSci9HFocT9qtVYM=
|
github.com/go-gl/gl v0.0.0-20210905235341-f7a045908259/go.mod h1:wjpnOv6ONl2SuJSxqCPVaPZibGFdSci9HFocT9qtVYM=
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
[Window][Debug##Default]
|
[Window][Debug##Default]
|
||||||
Pos=893,32
|
Pos=951,18
|
||||||
Size=378,371
|
Size=347,356
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
|
|
||||||
|
|||||||
6
main.go
6
main.go
@ -83,6 +83,9 @@ func main() {
|
|||||||
logging.ErrLog.Fatalln(err)
|
logging.ErrLog.Fatalln(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Set vsync
|
||||||
|
sdl.GLSetSwapInterval(0)
|
||||||
|
|
||||||
loadShaders()
|
loadShaders()
|
||||||
loadBuffers()
|
loadBuffers()
|
||||||
initImGUI()
|
initImGUI()
|
||||||
@ -125,6 +128,7 @@ func main() {
|
|||||||
|
|
||||||
handleInputs()
|
handleInputs()
|
||||||
runGameLogic()
|
runGameLogic()
|
||||||
|
|
||||||
draw()
|
draw()
|
||||||
|
|
||||||
timing.FrameEnded()
|
timing.FrameEnded()
|
||||||
@ -442,7 +446,7 @@ var time uint64 = 0
|
|||||||
var name string = ""
|
var name string = ""
|
||||||
|
|
||||||
var ambientColor gglm.Vec3 = *gglm.NewVec3(1, 1, 1)
|
var ambientColor gglm.Vec3 = *gglm.NewVec3(1, 1, 1)
|
||||||
var ambientColorStrength float32 = 1
|
var ambientColorStrength float32 = 0.1
|
||||||
|
|
||||||
var lightPos1 gglm.Vec3 = *gglm.NewVec3(2, 2, 0)
|
var lightPos1 gglm.Vec3 = *gglm.NewVec3(2, 2, 0)
|
||||||
var lightColor1 gglm.Vec3 = *gglm.NewVec3(1, 1, 1)
|
var lightColor1 gglm.Vec3 = *gglm.NewVec3(1, 1, 1)
|
||||||
|
|||||||
@ -6,7 +6,7 @@ in vec3 fragPos;
|
|||||||
|
|
||||||
out vec4 fragColor;
|
out vec4 fragColor;
|
||||||
|
|
||||||
uniform float ambientStrength = 1;
|
uniform float ambientStrength = 0.1;
|
||||||
uniform vec3 ambientLightColor = vec3(1, 1, 1);
|
uniform vec3 ambientLightColor = vec3(1, 1, 1);
|
||||||
|
|
||||||
uniform vec3 lightPos1;
|
uniform vec3 lightPos1;
|
||||||
|
|||||||
Reference in New Issue
Block a user