Package com.badlogic.gdx.graphics.g3d.attributes

Examples of com.badlogic.gdx.graphics.g3d.attributes.BlendingAttribute


      assetManager.load(DEFAULT_SKIN, Skin.class);
      assetManager.load(DEFAULT_TEMPLATE_PFX, ParticleEffect.class, params);
     
      assetManager.finishLoading();
      assetManager.setLoader(ParticleEffect.class, new ParticleEffectLoader(new AbsoluteFileHandleResolver()));
      assetManager.get(DEFAULT_MODEL_PARTICLE, Model.class).materials.get(0).set(new BlendingAttribute(GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA, 1));
     
      //Ui
      stringBuilder = new StringBuilder();
      Skin skin = assetManager.get(DEFAULT_SKIN, Skin.class);
      ui = new Stage();
View Full Code Here


        qx, qy, qz, qw,
        scale, scale, scale);
      if(hasColor){
        int colorOffset = i*renderData.colorChannel.strideSize;
        ColorAttribute colorAttribute = (ColorAttribute)instance.materials.get(0).get(ColorAttribute.Diffuse);
        BlendingAttribute blendingAttribute = (BlendingAttribute)instance.materials.get(0).get(BlendingAttribute.Type);
        colorAttribute.color.r = renderData.colorChannel.data[colorOffset +ParticleChannels.RedOffset];
        colorAttribute.color.g = renderData.colorChannel.data[colorOffset +ParticleChannels.GreenOffset];
        colorAttribute.color.b = renderData.colorChannel.data[colorOffset +ParticleChannels.BlueOffset];
        if(blendingAttribute != null)
          blendingAttribute.opacity  = renderData.colorChannel.data[colorOffset +ParticleChannels.AlphaOffset];
View Full Code Here

  }
 
  @Override
  public void render (final Renderable renderable) {
    if (renderable.material.has(BlendingAttribute.Type)) {
      final BlendingAttribute blending = (BlendingAttribute)renderable.material.get(BlendingAttribute.Type);
      renderable.material.remove(BlendingAttribute.Type);
      final boolean hasAlphaTest = renderable.material.has(FloatAttribute.AlphaTest);
      if (!hasAlphaTest)
        renderable.material.set(alphaTestAttribute);
      if (blending.opacity >= ((FloatAttribute)renderable.material.get(FloatAttribute.AlphaTest)).value)
View Full Code Here

  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));
    renderable.mesh = new Mesh(false, MAX_VERTICES_PER_MESH, MAX_PARTICLES_PER_MESH*6, currentAttributes);
    renderable.mesh.setIndices(indices);
    renderable.shader = shader;
View Full Code Here

 
  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.attributes.BlendingAttribute

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.