Examples of TextureData


Examples of com.sun.opengl.util.texture.TextureData

      throws IOException {
    BufferedImage img = ImageIO.read(file);
    if (img == null) {
      return null;
    }
    return new TextureData(internalFormat, pixelFormat, mipmap, img);
  }
View Full Code Here

Examples of com.sun.opengl.util.texture.TextureData

      throws IOException {
    BufferedImage img = ImageIO.read(stream);
    if (img == null) {
      return null;
    }
    return new TextureData(internalFormat, pixelFormat, mipmap, img);
  }
View Full Code Here

Examples of org.osm2world.core.target.common.TextureData

 
  private void writeMaterial(Material material, String name) {

    for (int i = 0; i < max(1, material.getNumTextureLayers()); i++) {
     
      TextureData textureData = null;
      if (material.getNumTextureLayers() > 0) {
        textureData = material.getTextureDataList().get(i);
      }
   
      mtlStream.println("newmtl " + name + "_" + i);
View Full Code Here

Examples of org.osm2world.core.target.common.TextureData

      appendMaterial(material);
      append("#end\n\n");
     
      if (material.getNumTextureLayers() == 1) {
       
        TextureData td = material.getTextureDataList().get(0);
       
        if (!td.colorable) {
          textureNames.put(td, uniqueName);
        }
       
View Full Code Here

Examples of org.osm2world.core.target.common.TextureData

        } else {
          gl.glDisable(GL.GL_BLEND);
          gl.glDisable(GL_ALPHA_TEST);
        }
       
        TextureData textureData = material.getTextureDataList().get(i);
       
        Texture texture = textureManager.getTextureForFile(textureData.file);
            texture.enable(gl); //TODO: should this be called every time?
            texture.bind(gl);
           
View Full Code Here

Examples of org.osm2world.core.target.common.TextureData

     
      return emptyList();
     
    } else if (textureDataList.size() == 1) {
     
      TextureData textureData = textureDataList.get(0);
      TexCoordFunction coordFunction = textureData.coordFunction;
      if (coordFunction == null) { coordFunction = defaultCoordFunction; }
     
      return singletonList(coordFunction.apply(vs, textureData));
     
View Full Code Here

Examples of org.osm2world.core.target.common.TextureData

              if (coordFunctionString != null) {
                coordFunction = NamedTexCoordFunction.valueOf(
                    coordFunctionString.toUpperCase());
              }
             
              TextureData textureData = new TextureData(
                  file, width, height, wrap, coordFunction, colorable);
              textureDataList.add(textureData);
             
            }
           
View Full Code Here

Examples of org.osm2world.core.target.common.TextureData

       
        /* add texture coordinates */
       
        for (int texLayer = 0; texLayer < textureDataList.size(); texLayer ++) {
         
          TextureData textureData = textureDataList.get(texLayer);
          List<VectorXZ> texCoordList = mainWallTexCoordLists.get(texLayer);
         
          double s, lowerT, middleT;
         
          // determine s (width dimension) coordinate
View Full Code Here

Examples of org.terasology.rendering.assets.texture.TextureData

                noiseValues.put((byte) 0x0);
            }

            noiseValues.flip();

            texture = Assets.generateAsset(new AssetUri(AssetType.TEXTURE, "engine:ssaoNoise"), new TextureData(SSAO_NOISE_SIZE, SSAO_NOISE_SIZE,
                    new ByteBuffer[]{noiseValues}, Texture.WrapMode.REPEAT, Texture.FilterMode.NEAREST), Texture.class);
        }
        return texture;
    }
View Full Code Here

Examples of org.terasology.rendering.assets.texture.TextureData

    }

    private Texture createTexture(int width, int height, ByteBuffer buf) {
        ByteBuffer[] data = new ByteBuffer[]{buf};
        AssetUri uri = new AssetUri(AssetType.TEXTURE, "engine:terrainPreview");
        TextureData texData = new TextureData(width, height, data, Texture.WrapMode.CLAMP, Texture.FilterMode.LINEAR);

        return Assets.generateAsset(uri, texData, Texture.class);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.