Log in or register to post comments

How to render different 3d models for different targets

June 20, 2013 - 8:35pm #1

How to render different 3d model for different targets, i mean for example

stones -> teapot

chips -> cube

tarmac -> something else

How to render different 3d models for different targets

June 20, 2013 - 10:49pm #2

Hi, the relevant code is in the renderFrame() function in ImageTargets.cpp;

if you look at the existing code, you will see that we switch texture (see the textureIndex variable) based on the name of the target ("stones", "chips", etc...);

similarly, you can rearrange the same code so that it renders a different model;

the code to render the model is there, see the lines starting with glVertexAttribPointer() and following lines until glDrawElements().

You may also find this article useful for the details about how to render a specific 3D model in Vuforia with OpenGL:

 https://developer.vuforia.com/forum/faq/android-how-do-i-replace-teapot

 

Log in or register to post comments