Crash in glDrawArrays when drawing mesh in OpenFramworks

Home Forums Syphon Syphon Development – Developer Crash in glDrawArrays when drawing mesh in OpenFramworks

This topic contains 2 replies, has 2 voices, and was last updated by  vade 2 months, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #59308

    timistof
    Participant

    Hi Everyone,

    Not really the best place to be asking these questions but I though I’d give it a try anyway.
    I recently added Box2D to my Syphon-enabled OpenFrameworks drawing app, and since then it’s crashing in glDrawArrays. But *only* when Syphon is enabled. The problem I have is similar to another user on the Openframeworks forum here. I’m not sure if syphon is actually to blame, but maybe this rings a bell somewhere with anyone. Any help is greatly appreciated!

    #59309

    timistof
    Participant

    Ah well I’ve solved it. There was something going wrong with ofMesh::draw(). With ofPolyLine::draw() it doesn’t happen.

    #59321

    vade
    Keymaster

    Hi

    So, this is likely some GL state being enabled by ofMesh which once used, doesnt disable that state to whatever it was previously, and Syphon’s draw code dislikes the ‘leaked’ state of ofMesh.

    Typically, for middle ware like Syphon, one really wants to have set, known state prior to your code, and then middle ware returns it to that state.

    I suspect something similar is happening. Look at the source of ofMesh and investigate the state changes in GL, and ensure you set things back to disabled, or prior state.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.