Package nu3a.material.texture

Examples of nu3a.material.texture.N3Texture2D


  /**
   * Recalcula la multitextura generando la textura en el render indicado.
   */
  protected void calculeMultitexture(N3Render render) {
    if (!textures.isEmpty()) {
      N3Texture2D texture = (N3Texture2D) textures.elementAt(0);
      byte[] data = texture.getData();
      for (int i = 0; i < textures.size(); i++) {
        N3Texture2D texture2 = (N3Texture2D) textures.elementAt(i);
        blend(data, texture2.getData(), texture2.getAlpha());
      }
      try {
        texture_calc = new N3Texture2D(scene, name + "_multitext");
        texture_calc.genTexture(data, texture.getDataFormat(),
            texture.getWidth(), texture.getHeight(), render);
        active_texture = texture_calc;
      } catch (N3NameException ne) {
        System.out
View Full Code Here


    material = new N3Material(scene, "mat1");

    InputStream is = new FileInputStream("files/nu3a.png");

    N3JDKImageLoader loader = new N3JDKImageLoader(is);
    N3Texture2D texture = new N3Texture2D(scene, "textura1");
    texture.genTexture(loader, render);
    material.addTexture(texture);
    material.setAmbientColor(new N3ColorRGBA(1, 1, 1));
    material.setDiffuseColor(new N3ColorRGBA(1, 1, 1));
    material.setSpecularColor(new N3ColorRGBA(0.2f, 0.2f, 0.2f), 0.5f);
    material.applyMaterial(true);
View Full Code Here

TOP

Related Classes of nu3a.material.texture.N3Texture2D

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.