Skip to content

SDL2 primitive shapes don't render when SDL_ttf text is rendered #16223

@Tam

Description

@Tam

Version of emscripten/emsdk:

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.3 (c06156773675b2cb437e41459c12d44bd9a8f235)
clang version 14.0.0 (https://github.com/llvm/llvm-project d8f929a567083a6b90264193f1e4476f6b77c5fe)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /Users/tam/Developer/emsdk/upstream/bin

When text is rendered to the screen (viaTTF_RenderText_Blended, SDL_CreateTextureFromSurface, and SDL_RenderCopy) all calls to SDL's primitive shapes (i.e. SDL_RenderDrawRect) no longer appear and the following warning is logged to the console:

WebGL warning: drawArraysInstanced: Vertex fetch requires 96, but attribs only supply 6.

This isn't an issue when building to a native platform, and has no impact on rendering textures from image surfaces.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions