www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: guillaume on November 24, 2011, 05:03:20 am

Title: newbie to opengl 3d and jpct-ae, about texture mapping
Post by: guillaume on November 24, 2011, 05:03:20 am
hi,
     I am working a opengl demo using jpct-AE, and I am new to opengl and jpct-ae.
can somebody show me some code about how to do texture mapping in jpct-ae ?
just simply setTexture of a Object3D seems can not get a good looking. help please.
thanks.
Title: Re: newbie to opengl 3d and jpct-ae, about texture mapping
Post by: EgonOlsen on November 24, 2011, 07:03:27 am
"not good looking" is a bit vague. You need a good texture and proper texture coordinates for your object (the objects from Primitives don't have them...like the docs state) and a setTexture() is sufficient. Unless you work with the emulator, which renders everything ugly.
Title: Re: newbie to opengl 3d and jpct-ae, about texture mapping
Post by: guillaume on November 25, 2011, 01:00:07 am
Thanks, Egon, I know what's the problem now.
It's because the texture coordinates didn't  set properly. :D