mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
graphicsdriver/opengl: Remove println and add error messages
This commit is contained in:
parent
fc50f9b0be
commit
9bf24ba545
@ -15,6 +15,8 @@
|
||||
package opengl
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hajimehoshi/ebiten/internal/driver"
|
||||
"github.com/hajimehoshi/ebiten/internal/shaderir"
|
||||
)
|
||||
@ -50,17 +52,16 @@ func (s *Shader) Dispose() {
|
||||
|
||||
func (s *Shader) compile() error {
|
||||
vssrc, fssrc := s.ir.Glsl()
|
||||
println(vssrc, fssrc)
|
||||
|
||||
vs, err := s.graphics.context.newShader(vertexShader, vssrc)
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("opengl: vertex shader compile error: %v, source:\n%s", vssrc)
|
||||
}
|
||||
defer s.graphics.context.deleteShader(vs)
|
||||
|
||||
fs, err := s.graphics.context.newShader(fragmentShader, fssrc)
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("opengl: fragment shader compile error: %v, source:\n%s", fssrc)
|
||||
}
|
||||
defer s.graphics.context.deleteShader(fs)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user