GPU_DrawElements

Discussion in '3DS - Homebrew Development and Emulators' started by elhobbs, Aug 13, 2015.

  1. elhobbs
    OP

    elhobbs GBAtemp Advanced Fan

    Member
    5
    Jul 28, 2008
    United States
    I have been trying to use GPU_DrawElements similar to the usage in portal3ds. The difference is that I am trying to use GPU_TRIANGLES instead of GPU_UNKPRIM. The issue that I am experiencing is that only half of the triangles are rendering. I am using the most current ctrulib (from git) and devkitarm. Has anyone else run into this issue?
     
  2. neobrain

    neobrain -

    Member
    5
    Apr 25, 2014
    Sounds like you've got your triangle order wrong. Try disabling backface culling.
     
  3. elhobbs
    OP

    elhobbs GBAtemp Advanced Fan

    Member
    5
    Jul 28, 2008
    United States
    Forgot to mention I already did that. If I offset the index buffer by 3 then it renders the alternate triangles.
     
  4. Jim_e

    Jim_e Advanced Member

    Newcomer
    3
    Nov 13, 2007
    United States
    That sounds like you setup the vertex attributes incorrectly, namely the number of attributes per vertex.

    It would be helpful to see some code.
     
  5. elhobbs
    OP

    elhobbs GBAtemp Advanced Fan

    Member
    5
    Jul 28, 2008
    United States
    I will post some code tonight when I get home from work.
     
  6. cebolleto

    cebolleto GBAtemp Regular

    Member
    4
    Mar 5, 2010
    GPU_DrawElements has only worked for me with GPU_UNKPRIM
     
  7. elhobbs
    OP

    elhobbs GBAtemp Advanced Fan

    Member
    5
    Jul 28, 2008
    United States
    That was it thanks. It had tried that before but I think it was while I had the build of ctrulib with the update that was reverted.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice