This is how I added an image instead of color in RenderBox

+3 votes
asked Jul 28, 2017 by defos931 (220 points)
  1. Copy the HelloARVideo/VideoRenderer to RenderBox(change the class name etc..)
  2. Add GLKIt : #import <GLKit/GLKit.h>
  3. Add a GLKTextureInfo to implementation:   GLKTextureInfo *textureInfo;
  4. Remove the texture_id code and add:
    •     NSString *path = [[NSBundle mainBundle]pathForResource:@"argame00" ofType:@"jpg"];

          textureInfo = [GLKTextureLoader textureWithContentsOfFile:path options:nil error:nil];

          glBindTexture(GL_TEXTURE_2D, textureInfo.name);

  5. Replace the texture_id in the render function:

    • glBindTexture(GL_TEXTURE_2D, textureInfo.name);

Please log in or register to answer this question.

Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...