Update FrameBuffer
to handle multiple color attachments
#227
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FrameBuffer
The previous
FrameBuffer
implementation allowed only a single color attachment and assumed you were using it directly. The new implementation will allow a list of a new objectColorAttachment
which takes the original parameters.Old
This way can still be used. No breaking changes regarding usage.
New
colorAttachments
will default to a single color attachmentlistOf(ColorAttachment())
.FrameBuffer.textures
is a list that will contain the textures for each color attachment on the FBO.GL
Added the
GL.drawBuffers(size: Int, buffers: IntBuffer)
functionAdded the
GL.clearBuffer[fuiv]()
functionsShaders
Updated
GlslGenerator
to support the use ofgl_FragData[n]
inside fragment shaders. This will generate the correct out variables if using GLSL 3.0+ if thegl_FragColor
orgl_FragData[n]
is referenced anyway in the shader code.Added support for
GL_EXT_DrawBuffers
for version GLES 2.0