Closed Techiesplash closed 6 months ago
Hey, this looks quite good, thank you! Few small thoughts:
foster_renderer_opengl.c
; ideally these would be left to match the rest of the project.I put in obsolete-marked redirects for Easers. Indenting seems to be fixed... There's shenanigans going on with the IDE when it comes to indents.
Awesome, this looks really great, thanks for all the fixes and additions! :)
Hmm I'm getting a GL (ERROR:HIGH) GL_INVALID_OPERATION error generated. <texture> is not the name of an existing texture.
sometimes when I try to create a Target (Framebuffer) now in a side project of mine. Investigating, not sure if it was from these changes or something else.
Yeah the error seems to occur if I create a Target, dispose it immediately, and then create another one. It re-uses the GL ID and something bad happens in fgl.glFramebufferTexture2D(GL_FRAMEBUFFER, tex->glAttachment, GL_TEXTURE_2D, tex->id, 0);
. Looking into it.
Fixed this - it was an issue with deleting a texture while it was bound to a slot, and now that the slot stuff is actually caching properly, it broke. Pushing a fix!
Changes:
App
now allows passing a preferred renderer as an optional argument, defaults to Renderers.NoneBatcher.Text()
no longer starts a new batch every whitespace character (caused many extra draw calls)ShaderDefaults
has been changed to use verbatim text (multiline) literals to improve maintainabilityEase
:In
,Out
, andInOut
variants of an Easer based on one or two provided, also accepts the others being specifiedQuartic
easer (t = t^4)stateTextureSlots
to not be updated (thus causing a rebind of the texture every time)ARRAY_BUFFER
and does not rebind if matching (reduces rebind calls notably)ELEMENT_ARRAY_BUFFER
and does not rebind if matching (reduces rebind calls notably)DEBUGPROC
arguments now aligned with source argumentcase
statements now consistently have an indenti ++
changed toi++
for consistencyAdditions
Content
: Read-only file access API with default impl, virtualWritableContent
: derives from Readable, allows writing to files, also with default impl, virtualUserStorage
(static class): Accepts a WritableContent global (Creates default one atApp.UserPath
). This allows it to reuse working API, still allows overriding it for specialized accessAPI change/addition examples:
Ease:
Content:
Effect on draw calls:
Benchmark details:
Release
configuration and linked to the benchmark viaProjectReference