By KCS_Mobile
on Mon, 03/11/2013 - 11:01
I am making two view in cloudreco.cpp
glGenTextures(1, &(productTexture->mTextureID));glBindTexture(GL_TEXTURE_2D, productTexture->mTextureID);glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);// We create an empty power of two texture and upload a sub image.glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texturewidth,texureheight, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); glTexSubImage2D(GL_TEXTURE_2D, 0,0, 0, productTexture->mWidth,productTexture->mHeight, GL_RGBA, GL_UNSIGNED_BYTE,(GLvoid*) productTexture->mData);glGenTextures(1, &(bookTexture->mTextureID));glBindTexture(GL_TEXTURE_2D, bookTexture->mTextureID);glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);// We create an empty power of two texture and upload a sub image.glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texturewidth,texureheight, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); glTexSubImage2D(GL_TEXTURE_2D, 0,0, 0, bookTexture->mWidth,bookTexture->mHeight, GL_RGBA, GL_UNSIGNED_BYTE,(GLvoid*) bookTexture->mData); and I want to do when object render on Target than productTexture display otherwise bookTexture display so is it possible? how to integrate in Android?Advance in thanks
How to create multiple texture in CloudRecognize sample app?
Hi, to render a specific texture you simply need to bind that texture (in your rendering code) using the texture ID: