Author Topic: newbie to opengl 3d and jpct-ae, about texture mapping  (Read 1409 times)

Offline guillaume

  • int
  • **
  • Posts: 67
    • View Profile
newbie to opengl 3d and jpct-ae, about texture mapping
« 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11970
    • View Profile
    • http://www.jpct.net
Re: newbie to opengl 3d and jpct-ae, about texture mapping
« Reply #1 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.

Offline guillaume

  • int
  • **
  • Posts: 67
    • View Profile
Re: newbie to opengl 3d and jpct-ae, about texture mapping
« Reply #2 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