Author Topic: Texture Mapping  (Read 2278 times)

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Texture Mapping
« on: April 06, 2016, 09:14:00 am »
This isn't a jpct-specific question. I can understand if you don't want to answer it, Egon. But here it goes, anyway: how do I texture map a triangle? Put differently, let's say that I have a sphere and a texture map. How do I figure out which part of the texture map goes with each triangle?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Texture Mapping
« Reply #1 on: April 06, 2016, 09:36:29 am »
That highly depends on how you actually want your texture to be applied...spherical, projected...whatever. The ExtendedPrimitives class does support generated texture coordinates for spheres. I can upload the source code of that class if that would help.

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: Texture Mapping
« Reply #2 on: April 06, 2016, 10:40:58 am »
It would, thanks very much.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Texture Mapping
« Reply #3 on: April 07, 2016, 09:55:32 am »