You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running "$ go run main.go" in examples/glh/textureatlas, you get the following errors:
command-line-arguments
./main.go:49: not enough arguments in call to atlas.Bind
./main.go:60: not enough arguments in call to atlas.Unbind
./main.go:112: not enough arguments in call to a.Commit
It can be fixed with the following patch:
From 84adce516b2c5108dcc4c422509e0ac41771fea6 Mon Sep 1700:00:002001
From: Andrew Appleby <andy.appleby83@gmail.com>
Date: Sat, 15 Dec 201217:18:51+0100
Subject: [PATCH] Fixes textureatlas example
---
glh/textureatlas/main.go | 6+++---1file changed, 3insertions(+), 3deletions(-)
diff--git a/glh/textureatlas/main.go b/glh/textureatlas/main.goindex68d4df4..a0f4e7a 100644---a/glh/textureatlas/main.go+++b/glh/textureatlas/main.go@@-46,7+46,7@@funcmain() {
gl.Clear(gl.COLOR_BUFFER_BIT)
// Bind the atlas texture and render a quad with it.
- atlas.Bind()
+ atlas.Bind(gl.TEXTURE_2D)
gl.Begin(gl.QUADS)
gl.TexCoord2f(0, 0)
gl.Vertex2f(0, 0)
@@-57,7+57,7@@funcmain() {
gl.TexCoord2f(0, 1)
gl.Vertex2f(0, AtlasSize)
gl.End()
- atlas.Unbind()
+ atlas.Unbind(gl.TEXTURE_2D)
glfw.SwapBuffers()
}
@@-109,7+109,7@@funcfillAtlas(a*glh.TextureAtlas) {
//atlas.Save("atlas.png")
// This creates the texture from the atlas pixel data.
-a.Commit()
+a.Commit(gl.TEXTURE_2D)
}
// initGL initializes GLFW and OpenGL.
--1.7.9.5
The text was updated successfully, but these errors were encountered:
When running "$ go run main.go" in examples/glh/textureatlas, you get the following errors:
command-line-arguments
./main.go:49: not enough arguments in call to atlas.Bind
./main.go:60: not enough arguments in call to atlas.Unbind
./main.go:112: not enough arguments in call to a.Commit
It can be fixed with the following patch:
The text was updated successfully, but these errors were encountered: