Tool/software: Linux
Hi:
we are now succeed to render the AVM( around view monitor) with 4 camera via the sgxfrmcpy plugin,
then we try to render the car model by using DevIL to decode the JPG and load into OpenGL, sample code as following,
For glBindTexture, which target should we use GL_TEXTURE_2D or GL_TEXTURE_EXTERNAL_OES.
when go through the TI source code, GL_TEXTURE_2D is chosen, but in my case, it doesn't show the picture.
Any help is appciated!
/* Convert image to RGBA */
ilConvertImage(IL_RGBA, IL_UNSIGNED_BYTE);
/* Create and load textures to OpenGL */
glBindTexture(GL_TEXTURE_2D, textureIds[i]);
eglCheckGlError("glBindTexture");
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, ilGetInteger(IL_IMAGE_WIDTH),
ilGetInteger(IL_IMAGE_HEIGHT), 0, GL_RGBA, GL_UNSIGNED_BYTE,
ilGetData());
eglCheckGlError("glTexImage2D");