Java 类com.badlogic.gdx.graphics.Texture.TextureWrap 实例源码

项目:exterminate    文件:Biome.java   
public void addTexture(String file) {
        Texture texture = new Texture(Gdx.files.internal(file), true);

        texture.setWrap(TextureWrap.Repeat, TextureWrap.Repeat);
        if(ExterminateGame.useGL3) {
            texture.setFilter(TextureFilter.MipMapLinearLinear, TextureFilter.Linear);
        }
        else {
            texture.setFilter(TextureFilter.MipMapLinearNearest, TextureFilter.Linear);             
        }

        if(ltid==0) {
            textureHerbe = texture;
        }
        else if(ltid==1) {
            textureSand = texture;
        }
        else if(ltid==2) {
            textureDirt = texture;
        }
        else if(ltid==3) {
            textureRock = texture;
        }

    ltid++;
}
项目:RavTech    文件:SpriteRenderer.java   
@Override
public void write (Json json) {
    super.write(json);
    json.writeValue("width", width);
    json.writeValue("height", height);
    json.writeValue("texture", texturePath);
    if (regionName != null)
        json.writeValue(regionName);
    json.writeValue("srcX", srcX);
    json.writeValue("srcY", srcY);
    json.writeValue("srcWidth", srcWidth);
    json.writeValue("srcHeight", srcHeight);
    json.writeValue("originX", originX);
    json.writeValue("originY", originY);
    json.writeValue("minFilter", minFilter == TextureFilter.Linear ? "Linear" : "Nearest");
    json.writeValue("magFilter", magFilter == TextureFilter.Linear ? "Linear" : "Nearest");
    JsonUtil.writeColorToJson(json, color, "tint");
    json.writeValue("uWrap",
        uWrap == TextureWrap.ClampToEdge ? "ClampToEdge" : uWrap == TextureWrap.Repeat ? "Repeat" : "MirroredRepeat");
    json.writeValue("vWrap",
        vWrap == TextureWrap.ClampToEdge ? "ClampToEdge" : vWrap == TextureWrap.Repeat ? "Repeat" : "MirroredRepeat");
}
项目:DoubleHelix    文件:PowerLUT.java   
/** W power will be in luminance, and H power will be in alpha**/
public PowerLUT(float powerW, float intensityW, float powerH, float intensityH, int width, int height){

    Pixmap pixmap = new Pixmap(width, height, Format.RGBA8888);
    for (int i=0; i<width; i++){
        float valueW = (float)Math.pow((float)i/width, powerW) * intensityW;
           for (int j = 0; j < height; j++) {
               float valueH = (float)Math.pow((float)j/height, powerH) * intensityH;
               pixmap.setColor(valueW, valueH, 1.0f, 1.0f);
               pixmap.drawPixel(i, j);
           }
    }

    PixmapTextureData data = new PixmapTextureData(pixmap, Format.RGBA8888, false, false, true);

    texture = new Texture(data);
    texture.setWrap(TextureWrap.ClampToEdge, TextureWrap.ClampToEdge);
    texture.setFilter(TextureFilter.Linear, TextureFilter.Linear);
}
项目:swampmachine    文件:OrthogonalTiledMapRendererWithObjects.java   
public OrthogonalTiledMapRendererWithObjects(TiledMap map) {
    super(map);


    this.occlusionFbo = new FrameBuffer(Format.RGBA8888, Gdx.graphics.getWidth() / 2, Gdx.graphics.getHeight() / 2, false);
    this.shadowmapFbo = new FrameBuffer(Format.RGBA8888, Gdx.graphics.getWidth() / 2, 1, false);

    this.shadowmapTex = shadowmapFbo.getColorBufferTexture();
    this.shadowmapTex.setFilter(TextureFilter.Linear, TextureFilter.Linear);
    this.shadowmapTex.setWrap(TextureWrap.Repeat, TextureWrap.Repeat);

    //this.orthoCam = new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
    //this.orthoCam.setToOrtho(Y_DOWN);

    this.lights = new ArrayList<Light>();
    this.mouseLight = new Light(0, 0, Color.WHITE);
}
项目:Crazy-Driver-VideoGame    文件:SpriteManager.java   
public SpriteManager(CrazyDriver game){
    //poner donde empieza el coche en 150 x y en 0 y
    car = new Car(ResourceManager.getAtlas("imagenes")
               .findRegion("car_up"), 150, 0);
    //instancia los arrays de amigos y enemigos 
    enemies=new Array<Enemy>();
    friends=new Array<Friend>();
    objetos=new Array<Objetos>();
    //esto es para que el fondo de mueva
    texture = new Texture(Gdx.files.internal("suelo/tunnel_road.jpg"));
    texture.setWrap(TextureWrap.Repeat,TextureWrap.Repeat);
    sprite = new Sprite(texture, 0, 0, 512, 512);
    //genero aleatoriamente peatones
    //generarPersonas();
    generarObjetos();
    this.game = game;

}
项目:RuinsOfRevenge    文件:PostProcessor.java   
public PostProcessor( int fboWidth, int fboHeight, boolean useDepth, boolean useAlphaChannel, boolean use32Bits,
        TextureWrap u, TextureWrap v ) {
    if( use32Bits ) {
        if( useAlphaChannel ) {
            fbFormat = Format.RGBA8888;
        } else {
            fbFormat = Format.RGB888;
        }
    } else {
        if( useAlphaChannel ) {
            fbFormat = Format.RGBA4444;
        } else {
            fbFormat = Format.RGB565;
        }
    }

    composite = newPingPongBuffer( fboWidth, fboHeight, fbFormat, useDepth );
    setBufferTextureWrap( u, v );

    pipelineState = new PipelineState();

    capturing = false;
    hasCaptured = false;
    enabled = true;
    this.useDepth = useDepth;
}
项目:ingress-indonesia-dev    文件:bo.java   
public static void b()
{
  try
  {
    aj.a("PlayerCompassVisuals.createResources");
    boolean bool = f.b();
    if (!bool)
      return;
    c.a("CreateXmpRingMesh", c.e("scanner/emp_ring.obj"), new bp());
    c.a("CreatePlayerCompassTexture", c.b("scanner/compass_ring.png", true), Texture.TextureFilter.MipMapNearestLinear, Texture.TextureFilter.Linear, Texture.TextureWrap.Repeat, Texture.TextureWrap.ClampToEdge, new bq());
    ad.a("CreatePlayerCompassShader", "attribute vec4 a_position;\nattribute vec2 a_texCoord0;\nuniform mat4 u_modelViewProject;\nuniform vec2 u_uvScale;\nuniform vec3 u_bearing;\nuniform vec2 u_bearingThreshold;\nuniform vec4 u_color;\nuniform vec4 u_bearingColor;\nvarying vec2 v_texCoord0;\nvarying vec4 v_bearingColor;\nvoid main() {\n   v_texCoord0 = u_uvScale * a_texCoord0;\n   vec3 normalizedPos = normalize(a_position.xyz);\n   float bearingDot = dot(normalizedPos, u_bearing);   float bearingStrength = (bearingDot - u_bearingThreshold.x) * u_bearingThreshold.y;   v_bearingColor = mix(u_color, u_bearingColor, clamp(bearingStrength, 0.0, 1.0));\n   gl_Position = u_modelViewProject * a_position;\n}\n", "#ifdef GL_ES\nprecision mediump float;\n#endif\nuniform sampler2D u_texture;\nvarying vec4 v_bearingColor;\nvarying vec2 v_texCoord0;\nvoid main() {\n  gl_FragColor = v_bearingColor + texture2D(u_texture, v_texCoord0);\n}\n", new br());
    f.c();
    return;
  }
  finally
  {
    aj.b();
  }
}
项目:ingress-indonesia-dev    文件:aw.java   
public static void a(boolean paramBoolean)
{
  try
  {
    aj.a("InterferenceVisuals.createResources");
    boolean bool = i.a(paramBoolean);
    if (!bool)
      return;
    VertexAttribute[] arrayOfVertexAttribute = new VertexAttribute[1];
    arrayOfVertexAttribute[0] = new VertexAttribute(0, 2, "a_position");
    c.a("CreateInterferenceMesh", a.a(c, d, null, arrayOfVertexAttribute), new ax());
    c.a("CreateInterferenceTexture", c.b("scanner/zeroxm_static.png", false), Texture.TextureFilter.Linear, Texture.TextureFilter.Linear, Texture.TextureWrap.Repeat, Texture.TextureWrap.Repeat, new ay());
    c.a("CreateInterferenceNoiseTexture", c.b("scanner/zeroxm_static_noise.png", false), Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest, Texture.TextureWrap.Repeat, Texture.TextureWrap.Repeat, new az());
    ad.a("CreateInterferenceShader", "attribute vec2 a_position;\nuniform vec2 u_uvBias;\nvarying vec2 v_texCoord0;\nvarying vec2 v_texCoord1;\nvarying vec2 v_texCoord2;\nvoid main() {\n  v_texCoord0 = a_position.xy;\n  v_texCoord1 = u_uvBias + a_position.xy;\n  v_texCoord2 = u_uvBias - a_position.xy;\n  gl_Position = vec4(a_position.xy * 2.0 - 1.0, 1, 1);\n}\n", "#ifdef GL_ES\nprecision mediump float;\n#endif\nuniform sampler2D u_texture;\nuniform sampler2D u_textureNoise;\nuniform float u_rampTarget;\nuniform vec3 u_noiseColor;\nvarying vec2 v_texCoord0;\nvarying vec2 v_texCoord1;\nvarying vec2 v_texCoord2;\nvoid main() {\n  vec4 scans = texture2D(u_texture, v_texCoord0);\n  vec4 noise_down = texture2D(u_textureNoise, v_texCoord1);\n  vec4 noise_up = texture2D(u_textureNoise, v_texCoord2);\n  float flicker_alpha = abs(noise_down.a - u_rampTarget);  flicker_alpha = flicker_alpha < 0.15 ? 0.0 : flicker_alpha * 0.6;\n  gl_FragColor = vec4(mix(scans.aaa, noise_up.aaa, 0.5) * u_noiseColor, flicker_alpha);\n}\n", new ba());
    i.c();
    return;
  }
  finally
  {
    aj.b();
  }
}
项目:gdx-gfx    文件:BouncingBuffer.java   
public BouncingBuffer(Format format, int width, int height, boolean hasDepth) {
    buffer1 = new BouncyBuffer(format, width, height, hasDepth);
    buffer2 = new BouncyBuffer(format, width, height, hasDepth);
    current = buffer1;

    this.width = this.buffer1.getWidth();
    this.height = this.buffer1.getHeight();

    this.uWrap = TextureWrap.ClampToEdge;
    this.vWrap = TextureWrap.ClampToEdge;

    rebind();
}
项目:gdx-gfx    文件:BouncingBuffer.java   
public void setTextureWrap(TextureWrap u, TextureWrap v) {
    this.uWrap = u;
    this.vWrap = v;

    texture1.setWrap(u, v);
    texture2.setWrap(u, v);
}
项目:exterminate    文件:PostProcessor.java   
/** Construct a new PostProcessor with the given parameters and the specified texture wrap mode */
public PostProcessor (int fboWidth, int fboHeight, boolean useDepth, boolean fsaa, boolean useAlphaChannel, boolean use32Bits,
    TextureWrap u, TextureWrap v) {
    if (use32Bits) {
        if (useAlphaChannel) {
            fbFormat = Format.RGBA8888;
        } else {
            fbFormat = Format.RGB888;
        }
    } else {
        if (useAlphaChannel) {
            fbFormat = Format.RGBA4444;
        } else {
            fbFormat = Format.RGB565;
        }
    }

    composite = newPingPongBuffer(fboWidth, fboHeight, fbFormat, useDepth, fsaa);
    setBufferTextureWrap(u, v);

    pipelineState = new PipelineState();

    capturing = false;
    hasCaptured = false;
    enabled = true;
    this.useDepth = useDepth;
    if (useDepth) {
        clearBits |= GL20.GL_DEPTH_BUFFER_BIT;
    }

    setViewport(null);
}
项目:exterminate    文件:PostProcessor.java   
public void setBufferTextureWrap (TextureWrap u, TextureWrap v) {
    compositeWrapU = u;
    compositeWrapV = v;

    composite.texture1.setWrap(compositeWrapU, compositeWrapV);
    composite.texture2.setWrap(compositeWrapU, compositeWrapV);
}
项目:cachebox3.0    文件:TexturePacker_Base.java   
private String getRepeatValue() {
    if (settings.wrapX == TextureWrap.Repeat && settings.wrapY == TextureWrap.Repeat)
        return "xy";
    if (settings.wrapX == TextureWrap.Repeat && settings.wrapY == TextureWrap.ClampToEdge)
        return "x";
    if (settings.wrapX == TextureWrap.ClampToEdge && settings.wrapY == TextureWrap.Repeat)
        return "y";
    return "none";
}
项目:RavTech    文件:SpriteRenderer.java   
@Override
public void read (Json json, JsonValue jsonData) {
    super.read(json, jsonData);
    if (jsonData.has("width"))
        width = jsonData.getFloat("width");
    if (jsonData.has("height"))
        height = jsonData.getFloat("height");
    if (jsonData.has("texture"))
        texturePath = jsonData.getString("texture");
    if (jsonData.has("srcX")) {
        useCustomSrc = true;
        srcX = jsonData.getInt("srcX");
    }
    if (jsonData.has("srcY"))
        srcY = jsonData.getInt("srcY");
    if (jsonData.has("srcWidth"))
        srcWidth = jsonData.getInt("srcWidth");
    if (jsonData.has("srcHeight"))
        srcHeight = jsonData.getInt("srcHeight");
    if (jsonData.has("originX"))
        originX = jsonData.getFloat("originX");
    if (jsonData.has("originY"))
        originY = jsonData.getFloat("originY");
    if (jsonData.has("minFilter"))
        minFilter = jsonData.getString("minFilter").equals("Linear") ? TextureFilter.Linear : TextureFilter.Nearest;
    if (jsonData.has("magFilter"))
        magFilter = jsonData.getString("magFilter").equals("Linear") ? TextureFilter.Linear : TextureFilter.Nearest;
    if (jsonData.has("tint"))
        setColor(JsonUtil.readColorFromJson(jsonData, "tint"));
    if (jsonData.has("uWrap")) {
        String uWrapStrings = jsonData.getString("uWrap");
        uWrap = uWrapStrings.equals("ClampToEdge") ? TextureWrap.ClampToEdge
            : uWrapStrings.equals("Repeat") ? TextureWrap.Repeat : TextureWrap.MirroredRepeat;
    }
    if (jsonData.has("vWrap")) {
        String vWrapStrings = jsonData.getString("vWrap");
        vWrap = vWrapStrings.equals("ClampToEdge") ? TextureWrap.ClampToEdge
            : vWrapStrings.equals("Repeat") ? TextureWrap.Repeat : TextureWrap.MirroredRepeat;
    }
}
项目:inari-firefly-libGDX    文件:GdxGraphicsImpl.java   
private TextureWrap getLibGDXTextureWrap( int glConst ) {
    for ( TextureWrap tw : TextureWrap.values() ) {
        if ( tw.getGLEnum() == glConst ) {
            return tw;
        }
    }

    return TextureWrap.Repeat;
}
项目:Crazy-Car-Race    文件:GameScreen.java   
@Override
public void create() {
    // set game speed
    int sh = Gdx.graphics.getHeight();
    if(MainGame.level == 1 && MainGame.debug){
        speed = sh / 200;
    }
    else if(MainGame.level == 2 && MainGame.debug){
        speed = sh / 80;
    }
    else if(MainGame.level == 3 && MainGame.debug){
        speed = sh / 30;
    }
    else if(MainGame.level == 1){
        speed = sh / 100;
    }else if(MainGame.level == 2){
        speed = sh / 80;
    }else if(MainGame.level == 3){
        speed = sh / 60;
    }

    //set user score
    MainGame.scoreCurrent = 0;
    if (MainGame.scoreHigh == null) MainGame.scoreHigh = 0;

    camera = new OrthoCamera();
    entityManager = new EntityManager();

    //For background img
    px = new Pixmap(Gdx.files.internal("background.png"));
    backgroundImg1 = new Texture(px);
    backgroundImg1.setWrap(TextureWrap.Repeat, TextureWrap.Repeat);
    backgroundImg2 = backgroundImg1;

}
项目:braingdx    文件:PostProcessor.java   
/**
 * Construct a new PostProcessor with the given parameters and the specified texture wrap mode
 */
public PostProcessor(int fboWidth, int fboHeight, boolean useDepth, boolean useAlphaChannel, boolean use32Bits,
      TextureWrap u, TextureWrap v) {
   if (use32Bits) {
      if (useAlphaChannel) {
         fbFormat = Format.RGBA8888;
      } else {
         fbFormat = Format.RGB888;
      }
   } else {
      if (useAlphaChannel) {
         fbFormat = Format.RGBA4444;
      } else {
         fbFormat = Format.RGB565;
      }
   }

   composite = newPingPongBuffer(fboWidth, fboHeight, fbFormat, useDepth);
   setBufferTextureWrap(u, v);

   pipelineState = new PipelineState();

   capturing = false;
   hasCaptured = false;
   enabled = true;
   this.useDepth = useDepth;
   if (useDepth) {
      clearBits |= GL20.GL_DEPTH_BUFFER_BIT;
   }

   setViewport(null);
}
项目:braingdx    文件:PostProcessor.java   
public void setBufferTextureWrap(TextureWrap u, TextureWrap v) {
   compositeWrapU = u;
   compositeWrapV = v;

   composite.texture1.setWrap(compositeWrapU, compositeWrapV);
   composite.texture2.setWrap(compositeWrapU, compositeWrapV);
}
项目:taloonerrl    文件:SpriteMapper.java   
private Texture loadTexture(final String fileName) {
    final Texture texture = new Texture(Gdx.files.internal(fileName), false);
    texture.setFilter(TextureFilter.Nearest, TextureFilter.Nearest);
    texture.setWrap(TextureWrap.ClampToEdge, TextureWrap.ClampToEdge);
    toDispose.add(texture);
    return texture;
}
项目:nvlist    文件:GdxTextureUtil.java   
/**
 * Converts {@link GLTilingMode} to its equivalent {@link TextureWrap}.
 */
public static TextureWrap toGdxWrap(GLTilingMode mode) {
    switch (mode) {
    case CLAMP: return TextureWrap.ClampToEdge;
    case REPEAT: return TextureWrap.Repeat;
    }

    throw new IllegalArgumentException("Unsupported tiling mode: " + mode);
}
项目:nvlist    文件:GdxTextureStoreTest.java   
/**
 * Check that the generated {@link TextureParameter} matches the corresponding {@link IImageDefinition}
 * settings for that texture.
 */
@Test
public void testLoadParams() {
    FilePath imagePath = FilePath.of("img/loadparams/loadparams.png");

    Texture tex = texStore.get(imagePath).get();
    Assert.assertNotNull(tex);

    Assert.assertEquals(TextureFilter.MipMapLinearLinear, tex.getMinFilter());
    Assert.assertEquals(TextureFilter.Nearest, tex.getMagFilter());
    Assert.assertEquals(TextureWrap.ClampToEdge, tex.getUWrap());
    Assert.assertEquals(TextureWrap.Repeat, tex.getVWrap());
}
项目:GoingUnder    文件:DesktopRunner.java   
private static void createAtlasWidgets() {
    Settings settings = new Settings();
    settings.minHeight = 512;
    settings.minWidth = 512;
    settings.maxHeight = 512;
    settings.maxWidth = 512;
    settings.paddingY = 2;
    settings.paddingX = 2;
    settings.wrapY = TextureWrap.Repeat;
    TexturePacker2.process(settings, 
            //"D:\\gamepictures\\widgets\\",
            "D:\\gamepictures\\widgets\\redjavolak",                
            "D:/MySelf/Android/Workspace/HgRepo/GoingUnder/assets/atlases", "widgets");
}
项目:GoingUnder    文件:DesktopRunner.java   
private static void createAtlas() {
    Settings settings = new Settings();
    settings.minHeight = 512;
    settings.minWidth = 512;
    settings.maxHeight = 512;
    settings.maxWidth = 512;
    settings.paddingY = 2;
    settings.paddingX = 2;
    settings.wrapY = TextureWrap.Repeat;
    TexturePacker2.process(settings, 
            "D:\\gamepictures\\2\\",
            "D:/MySelf/Android/Workspace/HgRepo/GoingUnder/assets/atlases", "game");
}
项目:libgdxcn    文件:FloatFrameBuffer.java   
/** Override this method in a derived class to set up the backing texture as you like. */
protected void setupTexture () {
    FloatTextureData data = new FloatTextureData(width, height);
    colorTexture = new Texture(data);
    if (Gdx.app.getType() == ApplicationType.Desktop || Gdx.app.getType() == ApplicationType.Applet)
        colorTexture.setFilter(TextureFilter.Linear, TextureFilter.Linear);
    else
        // no filtering for float textures in OpenGL ES
        colorTexture.setFilter(TextureFilter.Nearest, TextureFilter.Nearest);
    colorTexture.setWrap(TextureWrap.ClampToEdge, TextureWrap.ClampToEdge);
}
项目:libgdxcn    文件:TextureAtlas.java   
public Page (FileHandle handle, float width, float height, boolean useMipMaps, Format format, TextureFilter minFilter,
    TextureFilter magFilter, TextureWrap uWrap, TextureWrap vWrap) {
    this.width = width;
    this.height = height;
    this.textureFile = handle;
    this.useMipMaps = useMipMaps;
    this.format = format;
    this.minFilter = minFilter;
    this.magFilter = magFilter;
    this.uWrap = uWrap;
    this.vWrap = vWrap;
}
项目:libgdxcn    文件:GLTexture.java   
/** Sets the {@link TextureWrap} for this texture on the u and v axis. Assumes the texture is bound and active!
 * @param u the u wrap
 * @param v the v wrap
 * @param force True to always set the values, even if they are the same as the current values. */
public void unsafeSetWrap (TextureWrap u, TextureWrap v, boolean force) {
    if (u != null && (force || uWrap != u)) {
        Gdx.gl.glTexParameterf(glTarget, GL20.GL_TEXTURE_WRAP_S, u.getGLEnum());
        uWrap = u;
    }
    if (v != null && (force || vWrap != v)) {
        Gdx.gl.glTexParameterf(glTarget, GL20.GL_TEXTURE_WRAP_T, v.getGLEnum());
        vWrap = v;
    }
}
项目:libgdxcn    文件:GLTexture.java   
/** Sets the {@link TextureWrap} for this texture on the u and v axis. This will bind this texture!
 * @param u the u wrap
 * @param v the v wrap */
public void setWrap (TextureWrap u, TextureWrap v) {
    this.uWrap = u;
    this.vWrap = v;
    bind();
    Gdx.gl.glTexParameterf(glTarget, GL20.GL_TEXTURE_WRAP_S, u.getGLEnum());
    Gdx.gl.glTexParameterf(glTarget, GL20.GL_TEXTURE_WRAP_T, v.getGLEnum());
}
项目:libgdxcn    文件:Cubemap.java   
/** Construct a Cubemap with the specified {@link TextureData}'s for the sides */
public Cubemap (TextureData positiveX, TextureData negativeX, TextureData positiveY, TextureData negativeY,
    TextureData positiveZ, TextureData negativeZ) {
    super(GL20.GL_TEXTURE_CUBE_MAP);
    minFilter = TextureFilter.Nearest;
    magFilter = TextureFilter.Nearest;
    uWrap = TextureWrap.ClampToEdge;
    vWrap = TextureWrap.ClampToEdge;
    data = new FacedCubemapData(positiveX, negativeX, positiveY, negativeY, positiveZ, negativeZ);
    load(data);
}
项目:ShapeOfThingsThatWere    文件:DiplomacyRenderSystem.java   
public DiplomacyRenderSystem(OrthographicCamera camera, SpriteBatch batch) {
  super(with(Diplomacy.class), camera, batch);

  arrow = new Texture("textures/arrow.png");
  arrow.setWrap(TextureWrap.Repeat, TextureWrap.ClampToEdge);

  textureRatio = arrow.getHeight() / ARROW_HEIGHT;
}
项目:gaiasky    文件:ControlsWindow.java   
public ControlsWindow(String title, Skin skin, Stage ui) {
    super(title, skin);
    this.setName(title);
    this.skin = skin;
    this.ui = ui;

    /** Global resources **/
    TextureRegion septexreg = ((TextureRegionDrawable) skin.newDrawable("separator")).getRegion();
    septexreg.getTexture().setWrap(TextureWrap.Repeat, TextureWrap.ClampToEdge);
    this.separator = new TiledDrawable(septexreg);

    EventManager.instance.subscribe(this, Events.TOGGLE_TIME_CMD, Events.GUI_SCROLL_POSITION_CMD, Events.GUI_FOLD_CMD, Events.GUI_MOVE_CMD, Events.RECALCULATE_OPTIONS_SIZE);
}
项目:gaiasky    文件:VolumeCloudsRenderSystem.java   
public VolumeCloudsRenderSystem(int priority, float[] alphas) {
    super(null, priority, alphas);
    ShaderLoader.BasePath = "shaders/";
    shaderProgram = ShaderLoader.fromFile("screenspace", "volumeclouds");
    quad = new FullscreenQuad();

    staticTex = new Texture(Gdx.files.internal("img/static.jpg"));
    staticTex.setFilter(TextureFilter.Linear, TextureFilter.Linear);
    staticTex.setWrap(TextureWrap.Repeat, TextureWrap.Repeat);

    camPos = new Vector3();
    camDir = new Vector3();
    camUp = new Vector3();

    initime = TimeUtils.millis();
    opacity = 1.0f;

    // Init uniforms
    shaderProgram.begin();
    shaderProgram.setUniformi("u_texture0", 0);
    shaderProgram.setUniformf("u_iterations", 100f);
    shaderProgram.setUniformf("u_cloudDensity", 0.5f);
    shaderProgram.setUniformf("u_viewDistance", 6.0f);
    shaderProgram.setUniformf("u_cloudColor", 1.0f, 1.0f, 1.0f);
    shaderProgram.setUniformf("u_skyColor", 0.0f, 0.0f, 0.0f);
    shaderProgram.end();
}
项目:Escape-of-the-Ninja    文件:Background.java   
public Background() {
    super();
    setX(0);
    setY(0);
    text = new Texture(Gdx.files.internal("earth.png"));

    text.setWrap(TextureWrap.Repeat, TextureWrap.Repeat);
}
项目:mario-game    文件:WorldRenderer.java   
private Texture loadBackground() {
    String name = (String) world.getMap().getLayers().get("background").getObjects().get("background_image")
            .getProperties().get("src");

    Texture texture = new Texture("data/backgrounds/" + name + ".png");

    texture.setWrap(TextureWrap.Repeat, TextureWrap.ClampToEdge);
    texture.setFilter(TextureFilter.Nearest, TextureFilter.Nearest);
    return texture;
}
项目:vis-editor    文件:PickerCommons.java   
private void createPixmap () {
    Pixmap whitePixmap = new Pixmap(2, 2, Format.RGB888);
    whitePixmap.setColor(Color.WHITE);
    whitePixmap.drawRectangle(0, 0, 2, 2);
    whiteTexture = new Texture(whitePixmap);
    whiteTexture.setWrap(TextureWrap.Repeat, TextureWrap.Repeat);
    whitePixmap.dispose();
}
项目:c2d-engine    文件:PolygonActor.java   
public PolygonActor(Texture texture,List<Vector2[]> vertices,float offsetX,float offsetY){
    shader = createDefaultShader();
    this.offsetX = offsetX;
    this.offsetY = offsetY;
    this.texture = texture;
    this.verticesBak = vertices;
    this.texture.setWrap(TextureWrap.Repeat, TextureWrap.Repeat);
    u = ((float) 1 / texture.getWidth());
    v = ((float) 1 / texture.getHeight());

    int pointNumer = vertices.size()*3;
    mesh = new Mesh(false, pointNumer, pointNumer, 
            new VertexAttribute(Usage.Position, 3, ShaderProgram.POSITION_ATTRIBUTE), 
            new VertexAttribute(Usage.ColorPacked, 4, ShaderProgram.COLOR_ATTRIBUTE),
            new VertexAttribute(Usage.TextureCoordinates, 2, ShaderProgram.TEXCOORD_ATTRIBUTE+"0"));

    short[] indices = new short[pointNumer];
    for (int i = 0; i < pointNumer; i++) {
        indices[i] = (short) i;
    }
    mesh.setIndices(indices);

    this.vertices = new float[pointNumer*9];

    updateVertices();

}
项目:c2d-engine    文件:CurveSurfaces.java   
/**the main build method , we build the mesh and the texture and also the physical object
 */
public final void build(){
    texture = Engine.resource(data.texture,Texture.class);
    if(null!=this.texture){
        this.texture.setWrap(TextureWrap.Repeat, TextureWrap.Repeat);
        this.texture.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
    }
    if(data.points.size>2 && this.texture !=null)this.doBuild();
}
项目:GLXY    文件:Universe.java   
public void resize() {
    float w = Gdx.graphics.getWidth(), h = Gdx.graphics.getHeight();

    camera.setToOrtho(true, w, h);
    camera.position.set(w / 2f, h / 2f, 0);

    ImageCache.load();
    texture = ImageCache.getTexture("circle").getTexture();
    texture.setFilter(TextureFilter.Nearest, TextureFilter.Nearest);
    trailParticles = new TrailParticleManager(maxTrails, texture);

    bg = new Texture(Gdx.files.internal("data/bg.png"));
    bg.setWrap(TextureWrap.MirroredRepeat, TextureWrap.MirroredRepeat);
}
项目:RuinsOfRevenge    文件:PostProcessor.java   
public void setBufferTextureWrap( TextureWrap u, TextureWrap v ) {
    compositeWrapU = u;
    compositeWrapV = v;

    composite.texture1.setWrap( compositeWrapU, compositeWrapV );
    composite.texture2.setWrap( compositeWrapU, compositeWrapV );
}
项目:ingress-indonesia-dev    文件:TextureAtlas$TextureAtlasData$Page.java   
public TextureAtlas$TextureAtlasData$Page(FileHandle paramFileHandle, boolean paramBoolean, Pixmap.Format paramFormat, Texture.TextureFilter paramTextureFilter1, Texture.TextureFilter paramTextureFilter2, Texture.TextureWrap paramTextureWrap1, Texture.TextureWrap paramTextureWrap2)
{
  this.textureFile = paramFileHandle;
  this.useMipMaps = paramBoolean;
  this.format = paramFormat;
  this.minFilter = paramTextureFilter1;
  this.magFilter = paramTextureFilter2;
  this.uWrap = paramTextureWrap1;
  this.vWrap = paramTextureWrap2;
}
项目:ingress-indonesia-dev    文件:c.java   
public static void a(String paramString, com.nianticproject.ingress.common.j.c paramc, o<ai> paramo)
{
  if (paramc == null)
    return;
  b localb = paramc.e;
  Object localObject;
  if (localb == null)
    localObject = null;
  while (true)
  {
    com.nianticproject.ingress.common.x.i.a().a(new i(paramString, paramo, paramc, (ab)localObject));
    return;
    if (localb.a.equals("opaque"));
    for (ah localah = new ah(paramString); ; localah = null)
    {
      if (localah != null)
        break label108;
      aa localaa = a;
      Object[] arrayOfObject = new Object[2];
      arrayOfObject[0] = localb.a;
      arrayOfObject[1] = paramString;
      localaa.c("Material name not found: %s. While loading %s", arrayOfObject);
      localObject = null;
      break;
    }
    label108: ad.a(localb.b, new g(localah));
    if (localb.c != null)
      for (int i = 0; i < localb.c.length; i++)
      {
        String str = localb.c[i];
        Texture.TextureFilter localTextureFilter1 = Texture.TextureFilter.MipMapLinearLinear;
        Texture.TextureFilter localTextureFilter2 = Texture.TextureFilter.Linear;
        Texture.TextureWrap localTextureWrap1 = Texture.TextureWrap.Repeat;
        Texture.TextureWrap localTextureWrap2 = Texture.TextureWrap.Repeat;
        c.a(str, new e(str, localTextureFilter1, localTextureFilter2, localTextureWrap1, localTextureWrap2));
        com.nianticproject.ingress.common.x.i.a().a(new h(paramString, localb, i, localah));
      }
    localObject = localah;
  }
}