mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-13 20:42:07 +01:00
opengl: Remove unused casts
This commit is contained in:
parent
2936ea5080
commit
1154fcf470
@ -276,7 +276,7 @@ func (c *Context) NewShader(shaderType ShaderType, source string) (Shader, error
|
|||||||
log := gl.GetShaderInfoLog(s)
|
log := gl.GetShaderInfoLog(s)
|
||||||
return nil, fmt.Errorf("opengl: shader compile failed: %s", log)
|
return nil, fmt.Errorf("opengl: shader compile failed: %s", log)
|
||||||
}
|
}
|
||||||
return Shader(s), nil
|
return s, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Context) DeleteShader(s Shader) {
|
func (c *Context) DeleteShader(s Shader) {
|
||||||
@ -300,7 +300,7 @@ func (c *Context) NewProgram(shaders []Shader) (Program, error) {
|
|||||||
if !gl.GetProgramParameterb(p, gl.LINK_STATUS) {
|
if !gl.GetProgramParameterb(p, gl.LINK_STATUS) {
|
||||||
return nil, errors.New("opengl: program error")
|
return nil, errors.New("opengl: program error")
|
||||||
}
|
}
|
||||||
return Program(p), nil
|
return p, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Context) UseProgram(p Program) {
|
func (c *Context) UseProgram(p Program) {
|
||||||
@ -318,7 +318,7 @@ func (c *Context) DeleteProgram(p Program) {
|
|||||||
|
|
||||||
func (c *Context) getUniformLocationImpl(p Program, location string) uniformLocation {
|
func (c *Context) getUniformLocationImpl(p Program, location string) uniformLocation {
|
||||||
gl := c.gl
|
gl := c.gl
|
||||||
return uniformLocation(gl.GetUniformLocation(p.(*js.Object), location))
|
return gl.GetUniformLocation(p.(*js.Object), location)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Context) UniformInt(p Program, location string, v int) {
|
func (c *Context) UniformInt(p Program, location string, v int) {
|
||||||
@ -370,7 +370,7 @@ func (c *Context) NewArrayBuffer(size int) Buffer {
|
|||||||
b := gl.CreateBuffer()
|
b := gl.CreateBuffer()
|
||||||
gl.BindBuffer(int(ArrayBuffer), b)
|
gl.BindBuffer(int(ArrayBuffer), b)
|
||||||
gl.BufferData(int(ArrayBuffer), size, int(DynamicDraw))
|
gl.BufferData(int(ArrayBuffer), size, int(DynamicDraw))
|
||||||
return Buffer(b)
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Context) NewElementArrayBuffer(indices []uint16) Buffer {
|
func (c *Context) NewElementArrayBuffer(indices []uint16) Buffer {
|
||||||
@ -378,7 +378,7 @@ func (c *Context) NewElementArrayBuffer(indices []uint16) Buffer {
|
|||||||
b := gl.CreateBuffer()
|
b := gl.CreateBuffer()
|
||||||
gl.BindBuffer(int(ElementArrayBuffer), b)
|
gl.BindBuffer(int(ElementArrayBuffer), b)
|
||||||
gl.BufferData(int(ElementArrayBuffer), indices, int(StaticDraw))
|
gl.BufferData(int(ElementArrayBuffer), indices, int(StaticDraw))
|
||||||
return Buffer(b)
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Context) BindElementArrayBuffer(b Buffer) {
|
func (c *Context) BindElementArrayBuffer(b Buffer) {
|
||||||
|
Loading…
Reference in New Issue
Block a user