go-gl-legacy / glfw

Go bindings for libglfw 2.x
http://www.glfw.org
BSD 3-Clause "New" or "Revised" License
73 stars 8 forks source link

nehe 08 example #13

Closed 0xfaded closed 12 years ago

0xfaded commented 12 years ago

Maybe it changed at some point, however glfw.LoadTexture2D returns true on success, not false. Therefore,

if glfw.LoadTexture2D(texturefile, glfw.BuildMipmapsBit) {
    return errors.New("Failed to load texture: " + texturefile)
}

Should read in nehe_08 example code. This issue may also exist elsewhere

if ! glfw.LoadTexture2D(texturefile, glfw.BuildMipmapsBit) {
    return errors.New("Failed to load texture: " + texturefile)
}
ghost commented 12 years ago

Thanks for spotting that.

This is the result of patch 2fac458785b0b21379c786971e56b1cd45b81c90 It seems I forgot to fix the examples along with it. Should be fixed now through patch 4fdcd5fa4bb9cf982dbfe52942308e8d0c7fd8fb.

0xfaded commented 12 years ago

thanks for the bindings :)