opengl: Remove BeforeSwapping

I couldn't machines that requre this any longer. Perhaps a bound
framebuffer is always the screen framebuffer before swapping now.
This commit is contained in:
Hajime Hoshi 2018-11-05 02:14:54 +09:00
parent 2c7017534f
commit 00f28dd896
4 changed files with 0 additions and 19 deletions

View File

@ -198,13 +198,6 @@ func (q *commandQueue) Flush() {
q.nindices = 0 q.nindices = 0
q.tmpNumIndices = 0 q.tmpNumIndices = 0
q.nextIndex = 0 q.nextIndex = 0
// The bound framebuffer must be the original screen framebuffer before swapping buffers.
// Note that swapping might not happen after this function. BeforeSwapping should not be
// harmful in any cases.
//
// TODO: Confirm which machine requires this. Probably BungBungame Photon 2?
opengl.GetContext().BeforeSwapping()
} }
// Error returns an OpenGL error for the last command. // Error returns an OpenGL error for the last command.

View File

@ -218,10 +218,6 @@ func (c *Context) texSubImage2D(t textureNative, p []byte, x, y, width, height i
}) })
} }
func (c *Context) BeforeSwapping() {
c.bindFramebuffer(c.screenFramebuffer)
}
func (c *Context) newFramebuffer(texture textureNative) (framebufferNative, error) { func (c *Context) newFramebuffer(texture textureNative) (framebufferNative, error) {
var framebuffer framebufferNative var framebuffer framebufferNative
var f uint32 var f uint32

View File

@ -506,7 +506,3 @@ func (c *Context) RestoreContext() {
c.loseContext.Call("restoreContext") c.loseContext.Call("restoreContext")
} }
} }
func (c *Context) BeforeSwapping() {
// Do nothing
}

View File

@ -400,7 +400,3 @@ func (c *Context) Flush() {
gl := c.gl gl := c.gl
gl.Flush() gl.Flush()
} }
func (c *Context) BeforeSwapping() {
// Do nothing
}