mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
grahics: Reduce gl function calls
This commit is contained in:
parent
388dd835a6
commit
bddd3c9467
@ -150,8 +150,9 @@ func (p *programContext) begin() {
|
||||
p.state.lastModelviewMatrix = nil
|
||||
p.state.lastColorMatrix = nil
|
||||
p.state.lastColorMatrixTranslation = nil
|
||||
c.BindElementArrayBuffer(p.state.indexBufferQuads)
|
||||
c.UniformInt(p.program, "texture", 0)
|
||||
}
|
||||
c.BindElementArrayBuffer(p.state.indexBufferQuads)
|
||||
|
||||
if !areSameFloat32Array(p.state.lastProjectionMatrix, p.projectionMatrix) {
|
||||
c.UniformFloats(p.program, "projection_matrix", p.projectionMatrix)
|
||||
@ -181,8 +182,6 @@ func (p *programContext) begin() {
|
||||
copy(p.state.lastModelviewMatrix, modelviewMatrix)
|
||||
}
|
||||
|
||||
c.UniformInt(p.program, "texture", 0)
|
||||
|
||||
e := [4][5]float32{}
|
||||
for i := 0; i < 4; i++ {
|
||||
for j := 0; j < 5; j++ {
|
||||
@ -220,5 +219,4 @@ func (p *programContext) begin() {
|
||||
}
|
||||
|
||||
func (p *programContext) end() {
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user