Author Topic: texture not shown  (Read 2304 times)

Offline mmcrosb

  • Just dropped in
  • Posts: 6
    • View Profile
    • Email
texture not shown
« on: 01. April 2015, 08:45:29 PM »
Code: [Select]
Box bz = new Box(0,0,0.2f, 0.1f, 0.1f, 0.1f, new Colorf(0,0,1));
        bg.addChild(bz);
        bz.getAppearance().setMaterial(new Material());
        bz.getAppearance().getMaterial().setAmbientColor(1,1,1);
        bz.getAppearance().getMaterial().setEmissiveColor(1,1,1);
        bz.getAppearance().getMaterial().setLightingEnabled(true);
        bz.getAppearance().getMaterial().setDiffuseColor(1,1,1);
        bz.getAppearance().getMaterial().setSpecularColor(1,1,1);
        bz.getAppearance().getMaterial().setShininess(1);
        bz.getAppearance().getMaterial().setNormalizeNormals(true);
        bz.getAppearance().setTexture("public/suelo_agrietado.png");
        bz.getAppearance().setTextureAttributes(new TextureAttributes());
        bz.getAppearance().getTextureAttributes().setTextureMode(TextureMode.REPLACE);
        bz.getAppearance().setTexCoordGeneration(
                new TexCoordGeneration(
                        TexCoordGenMode.OBJECT_LINEAR,
                        TexCoordGeneration.CoordMode.TEXTURE_COORDINATES_2,
                        new Vector4f(1,0,0,0),
                        new Vector4f(0,0,1,0)
                    )
            );


do I forgot anything?

Offline lonesomeStranger

  • Administrator
  • Becoming dependent
  • *****
  • Posts: 139
    • View Profile
Re: texture not shown
« Reply #1 on: 02. April 2015, 11:43:34 AM »
Hi mmcrosb,

Is your problem urgent?

Sorry about delaying you but I'm busy now a little. I'll try to answer soon.
Well, let's choose the thread for your problem. I suppose this thread.

Your jumping from one thread to another slightly resembles me the Messi's dribbling. :)
 
Anton

Offline lonesomeStranger

  • Administrator
  • Becoming dependent
  • *****
  • Posts: 139
    • View Profile
Re: texture not shown
« Reply #2 on: 02. April 2015, 12:05:40 PM »
be a great idea to start the environment and loop, not static, and multi-threading available

First I recommend you to read http://xith.org/downloads/docs/xin/xin-3rd-edition.pdf.
Anton

Offline Sethe

  • Just dropped in
  • Posts: 1
    • View Profile
Re: texture not shown
« Reply #3 on: 03. January 2017, 07:35:05 AM »
be a great idea to start the environment and loop, not static, and multi-threading available

First I recommend you to read http://xith.org/downloads/docs/xin/xin-3rd-edition.pdf.

That link is dead I think.