Skip to content

ofVboMesh / ofMesh drawing w/ texture coords fails (updated) #42

Closed

Description

@bakercp

terminate called after throwing an instance of 'Poco::SystemException'
what(): System exception
Aborted

---- above fixed with with #63
---- issues with vbo remain (see below)

Activity

  1. bakercp commented on Dec 4, 2012

    @bakercp
    MemberAuthor

    This original exception was happening because easycam (which uses events) was failing. Easycam is now fixed, but the VBO is still failing.

  2. bakercp commented on Dec 4, 2012

    @bakercp
    MemberAuthor

    The program compiles and runs, but no mesh is visible in either ofMesh or ofVBOMesh mode. To get the program to run, I had to change skip = 1 to skip = 20.

  3. kalwalt commented on Jan 3, 2013

    @kalwalt

    hi @bakercp , if you set in draw() ofBackground(120); and comment out

    img.bind()
    img.unbind()

    you can see the geometry rendered (all black because without texture). but you have to move a bit the camera...
    i think the problem now is the texture binded. but i reserve to do other test with a light source to see how is rendered.

    tested with the latest commits and GLES2.

  4. bakercp commented on Jan 9, 2013

    @bakercp
    MemberAuthor

    @kalwalt I just confirmed your findings regarding img.bind() / img.unbind() on the RPi. I'm going to write some simple tests to check texture binding. I'll post results here.

  5. bakercp commented on Jan 9, 2013

    @bakercp
    MemberAuthor

    Greets all. I tested ofVboMesh and ofMesh using simple examples (a single triangle) and was unable to bind an image, even after adding the tex coords to the mesh, etc. I also tried throwing some light on it with ofLight in GLES1 mode. When the textures were unbound, the mesh was illuminated correctly. When the texture was bound, just black.

    Thus, I'm thinking that there may be some gles implementation problem in the of mesh code?

  6. kalwalt commented on Jan 9, 2013

    @kalwalt

    yes but ofBoxExample(and the multilightexample) works instead. Also this example has:

    ofLogo.bind() ;
    ofBox(boxSize);
    ofLogo.unbind();

    why this works good?

  7. bakercp commented on Jan 9, 2013

    @bakercp
    MemberAuthor

    @kalwalt that is a wonderful question :)

  8. arturoc commented on Jan 10, 2013

    @arturoc

    i guess you are not using normalized tex coordinates? gles doesn't support arb textures so you need to use 0..1 tex coords. ofBox detects gles and does that. i guess all the examples that use textures will need some ifdefs

  9. bakercp commented on Jan 10, 2013

    @bakercp
    MemberAuthor

    @arturoc you're brilliant.

    Fixed with 2ccffce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions