www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: D4NM4N on February 06, 2011, 11:01:20 pm

Title: Hello world without envmap?
Post by: D4NM4N 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?
Title: Re: Hello world without envmap?
Post by: EgonOlsen 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.
Title: Re: Hello world without envmap?
Post by: D4NM4N 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.
Title: Re: Hello world without envmap?
Post by: EgonOlsen 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.