mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Add comments
This commit is contained in:
parent
79f76ab7c8
commit
936942a28d
@ -45,6 +45,7 @@ func (c *graphicsContext) preUpdate() error {
|
||||
}
|
||||
|
||||
func (c *graphicsContext) postUpdate() error {
|
||||
// TODO: In WebGL, we don't need to clear the image here.
|
||||
if err := c.defaultRenderTarget.Clear(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -160,7 +160,6 @@ func (c *Context) DeleteFramebuffer(f Framebuffer) {
|
||||
func (c *Context) NewShader(shaderType ShaderType, source string) (Shader, error) {
|
||||
s := gl.CreateShader(uint32(shaderType))
|
||||
if s == 0 {
|
||||
println(gl.GetError())
|
||||
return 0, errors.New("glCreateShader failed")
|
||||
}
|
||||
|
||||
|
@ -243,6 +243,7 @@ func (u *userInterface) start(width, height, scale int, title string) (actualSca
|
||||
func (*userInterface) size() (width, height int) {
|
||||
a := canvas.Get("dataset").Get("ebitenActualScale").Int()
|
||||
if a == 0 {
|
||||
// a == 0 only on the initial state.
|
||||
return
|
||||
}
|
||||
width = canvas.Get("width").Int() / a
|
||||
|
Loading…
Reference in New Issue
Block a user