Author Topic: Hello world without envmap?  (Read 2740 times)

Offline D4NM4N

  • byte
  • *
  • Posts: 15
    • View Profile
Hello world without envmap?
« on: February 06, 2011, 11:01:20 pm »
I cannot seem to get settexture working without an environment map :S
Using the hello world example, if i turn off (comment out) the environment map line all i get is a grey cube.
Are there any examples anywhere of texturing?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Hello world without envmap?
« Reply #1 on: February 06, 2011, 11:07:43 pm »
That's because the cube used in HelloWorld has no texture coordinates. You can create some dirty ones using the calcTextureWrap...methods in Object3D. Or have a look at the advanced example in the wiki.

Offline D4NM4N

  • byte
  • *
  • Posts: 15
    • View Profile
Re: Hello world without envmap?
« Reply #2 on: February 06, 2011, 11:54:03 pm »
Gotcha so the UVs are not set for any primitives correct?
I had a sneaky feeling it was something along those lines.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Hello world without envmap?
« Reply #3 on: February 07, 2011, 06:52:07 am »
No primitive (except for the plane) has texture coordinates. They are meant to be used as quick and dirty placeholders only.