Skip to content

Wrong Buffer allocation on non-JS OpenGL ES targets #1322

@rcstuber

Description

@rcstuber

var vertexCountAllocated = #if js Std.int( MAX_BUFFER_ELEMENTS * 4 / p.bufferFormat.stride ) #else hxd.Math.imin( hxd.Math.nextPOT( vertexCount ), maxVertexCount ) #end;

Apparently the size of the allocated buffer on Android needs to be the same as on JS targets. Thus this is likely related to OpenGL ES?
I so far tested this only on Android, not on iOS.
Is there a suitable preprocessor flag to catch this for other non-JS targets? Like maybe #if glES ?

Here's the error Android throws when not having #js set:

 ValidateProgramUniformBlockBindings: Bound buffer is too small (Bound buffer is 16384 bytes, 65520 bytes expected)
DrawElements: ValidateState() failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions