Skip to content

[rlgl] Unsupported APIs do not trigger warnings or errors, making it difficult to detect incompatible code paths #5479

@zet23t

Description

@zet23t

Please, before submitting a new issue verify and check:

  • I tested it on latest raylib version from master branch
  • I checked there is no similar issue already reported
  • I checked the documentation on the wiki
  • My code has no errors or misuse of raylib

Issue description

I recently used the rlBlitFramebuffer in my code for optimization purposes. When (at a much later point) testing the web builds, it took some time to trace the error down to the blit function not being supported on WebGL ES2 since the function simply does nothing.

I believe it would be beneficial if this was improved somehow, either through producing visible TraceLog warnings, compilation errors (or warnings) or providing a viable fallback solution.

Environment

Cross platform development: Desktop / Web

The code that caused the frustration:

// Blit active framebuffer to main framebuffer
void rlBlitFramebuffer(int srcX, int srcY, int srcWidth, int srcHeight, int dstX, int dstY, int dstWidth, int dstHeight, int bufferMask)
{
#if (defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES3)) && defined(RLGL_RENDER_TEXTURES_HINT)
    glBlitFramebuffer(srcX, srcY, srcWidth, srcHeight, dstX, dstY, dstWidth, dstHeight, bufferMask, GL_NEAREST);
#endif
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions