Package com.badlogic.gdx.graphics.g3d

Examples of com.badlogic.gdx.graphics.g3d.Renderable


    vertices = new float[currentVertexSize*4*capacity];
    allocRenderables(capacity);
  }

  protected Renderable allocRenderable(){
    Renderable renderable = new Renderable();
    renderable.primitiveType = GL20.GL_TRIANGLES;
    renderable.meshPartOffset = 0;
    renderable.material = new Materialnew BlendingAttribute(GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA, 1f),
      new DepthTestAttribute(GL20.GL_LEQUAL, false),
      TextureAttribute.createDiffuse(texture));
View Full Code Here


    shader.init();
    return shader;
  }
 
  private void allocShader () {
    Renderable newRenderable = allocRenderable();
    shader = newRenderable.shader = getShader(newRenderable);
    renderablePool.free(newRenderable);
  }
View Full Code Here

  }
 
  private void clearRenderablesPool(){
    renderablePool.freeAll(renderables);
    for(int i=0, free = renderablePool.getFree(); i < free; ++i){
      Renderable renderable = renderablePool.obtain();
      renderable.mesh.dispose();
    }
    renderables.clear();
  }
View Full Code Here

 
  public void setTexture(Texture texture){
    renderablePool.freeAll(renderables);
    renderables.clear();
    for(int i=0, free = renderablePool.getFree(); i < free; ++i){
      Renderable renderable = renderablePool.obtain();
      TextureAttribute attribute = (TextureAttribute) renderable.material.get(TextureAttribute.Diffuse);
      attribute.textureDescription.texture = texture;
    }
    this.texture = texture;
  }
View Full Code Here

    //send vertices to meshes
    int addedVertexCount = 0;
    int vCount = bufferedParticlesCount*4;
    for(int v = 0; v < vCount; v += addedVertexCount){
      addedVertexCount = Math.min(vCount-v, MAX_VERTICES_PER_MESH);
      Renderable renderable = renderablePool.obtain();
      renderable.meshPartSize = (addedVertexCount/4)*6;
      renderable.mesh.setVertices(vertices, currentVertexSize *v, currentVertexSize * addedVertexCount);
      renderables.add(renderable);
    }
  }
 
View Full Code Here

      renderable.mesh.dispose();
    renderable.mesh = new Mesh(false, capacity, 0, CPU_ATTRIBUTES);
  }
 
  protected void allocRenderable(){
    renderable = new Renderable();
    renderable.primitiveType = GL20.GL_POINTS;
    renderable.meshPartOffset = 0;
    renderable.material = new Materialnew BlendingAttribute(GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA, 1f),
      new DepthTestAttribute(GL20.GL_LEQUAL, false),
      TextureAttribute.createDiffuse(null));
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.graphics.g3d.Renderable

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.