/** Binds this texture. The texture will be bound to the currently active texture unit specified via * {@link GL20#glActiveTexture(int)}. */ public void bind () { Gdx.gl.glBindTexture(glTarget, glHandle); }
/** Binds this texture. The texture will be bound to the currently active texture unit specified via * {@link GL20#glActiveTexture(int)}. */ public void bind () { Gdx.gl.glBindTexture(glTarget, glHandle); }
@Override public void glBindTexture (int target, int texture) { textureBindings++; calls++; gl20.glBindTexture(target, texture); check(); }
@Override public void glBindTexture (int target, int texture) { textureBindings++; calls++; gl20.glBindTexture(target, texture); check(); }
/** Binds the texture to the given texture unit. Sets the currently active texture unit via {@link GL20#glActiveTexture(int)}. * @param unit the unit (0 to MAX_TEXTURE_UNITS). */ public void bind (int unit) { Gdx.gl.glActiveTexture(GL20.GL_TEXTURE0 + unit); Gdx.gl.glBindTexture(glTarget, glHandle); }
/** Binds the texture to the given texture unit. Sets the currently active texture unit via {@link GL20#glActiveTexture(int)}. * @param unit the unit (0 to MAX_TEXTURE_UNITS). */ public void bind (int unit) { Gdx.gl.glActiveTexture(GL20.GL_TEXTURE0 + unit); Gdx.gl.glBindTexture(glTarget, glHandle); }
/** Sets the sides of this cubemap to the specified {@link CubemapData}. */ public void load (CubemapData data) { if (!data.isPrepared()) data.prepare(); bind(); unsafeSetFilter(minFilter, magFilter, true); unsafeSetWrap(uWrap, vWrap, true); data.consumeCubemapData(); Gdx.gl.glBindTexture(glTarget, 0); }
/** Sets the sides of this cubemap to the specified {@link CubemapData}. */ public void load (CubemapData data) { if (!data.isPrepared()) data.prepare(); bind(); unsafeSetFilter(minFilter, magFilter, true); unsafeSetWrap(uWrap, vWrap, true); data.consumeCubemapData(); Gdx.gl.glBindTexture(glTarget, 0); }
public void load (TextureData data) { if (this.data != null && data.isManaged() != this.data.isManaged()) throw new GdxRuntimeException("New data must have the same managed status as the old data"); this.data = data; if (!data.isPrepared()) data.prepare(); bind(); uploadImageData(GL20.GL_TEXTURE_2D, data); unsafeSetFilter(minFilter, magFilter, true); unsafeSetWrap(uWrap, vWrap, true); Gdx.gl.glBindTexture(glTarget, 0); }
public void load (TextureData data) { if (this.data != null && data.isManaged() != this.data.isManaged()) throw new GdxRuntimeException("New data must have the same managed status as the old data"); this.data = data; if (!data.isPrepared()) data.prepare(); bind(); uploadImageData(GL20.GL_TEXTURE_2D, data); unsafeSetFilter(minFilter, magFilter, true); unsafeSetWrap(uWrap, vWrap, true); Gdx.gl.glBindTexture(glTarget, 0); }
private void load (TextureArrayData data) { if (this.data != null && data.isManaged() != this.data.isManaged()) throw new GdxRuntimeException("New data must have the same managed status as the old data"); this.data = data; bind(); Gdx.gl30.glTexImage3D(GL30.GL_TEXTURE_2D_ARRAY, 0, data.getInternalFormat(), data.getWidth(), data.getHeight(), data.getDepth(), 0, data.getInternalFormat(), data.getGLType(), null); if (!data.isPrepared()) data.prepare(); data.consumeTextureArrayData(); setFilter(minFilter, magFilter); setWrap(uWrap, vWrap); Gdx.gl.glBindTexture(glTarget, 0); }
private void load (TextureArrayData data) { if (this.data != null && data.isManaged() != this.data.isManaged()) throw new GdxRuntimeException("New data must have the same managed status as the old data"); this.data = data; bind(); Gdx.gl30.glTexImage3D(GL30.GL_TEXTURE_2D_ARRAY, 0, data.getInternalFormat(), data.getWidth(), data.getHeight(), data.getDepth(), 0, data.getInternalFormat(), data.getGLType(), null); if (!data.isPrepared()) data.prepare(); data.consumeTextureArrayData(); setFilter(minFilter, magFilter); setWrap(uWrap, vWrap); Gdx.gl.glBindTexture(glTarget, 0); }
T texture = createTexture(bufferBuilder.textureAttachmentSpecs.first()); textureAttachments.add(texture); gl.glBindTexture(texture.glTarget, texture.getTextureObjectHandle()); gl.glBindTexture(texture.glTarget, 0);
T texture = createTexture(bufferBuilder.textureAttachmentSpecs.first()); textureAttachments.add(texture); gl.glBindTexture(texture.glTarget, texture.getTextureObjectHandle()); gl.glBindTexture(texture.glTarget, 0);
/** Binds this texture. The texture will be bound to the currently active texture unit specified via * {@link GL20#glActiveTexture(int)}. */ public void bind () { Gdx.gl.glBindTexture(glTarget, glHandle); }
/** Binds the texture to the given texture unit. Sets the currently active texture unit via {@link GL20#glActiveTexture(int)}. * @param unit the unit (0 to MAX_TEXTURE_UNITS). */ public void bind (int unit) { Gdx.gl.glActiveTexture(GL20.GL_TEXTURE0 + unit); Gdx.gl.glBindTexture(glTarget, glHandle); }
public void bind() { if (id == -1){ generate(); } if (id != bound_id) { Gdx.gl.glBindTexture( GL20.GL_TEXTURE_2D, id ); bound_id = id; } }
/** Sets the sides of this cubemap to the specified {@link CubemapData}. */ public void load (CubemapData data) { if (!data.isPrepared()) data.prepare(); bind(); unsafeSetFilter(minFilter, magFilter, true); unsafeSetWrap(uWrap, vWrap, true); data.consumeCubemapData(); Gdx.gl.glBindTexture(glTarget, 0); }
public void load (TextureData data) { if (this.data != null && data.isManaged() != this.data.isManaged()) throw new GdxRuntimeException("New data must have the same managed status as the old data"); this.data = data; if (!data.isPrepared()) data.prepare(); bind(); uploadImageData(GL20.GL_TEXTURE_2D, data); unsafeSetFilter(minFilter, magFilter, true); unsafeSetWrap(uWrap, vWrap, true); Gdx.gl.glBindTexture(glTarget, 0); }
private void load (TextureArrayData data) { if (this.data != null && data.isManaged() != this.data.isManaged()) throw new GdxRuntimeException("New data must have the same managed status as the old data"); this.data = data; bind(); Gdx.gl30.glTexImage3D(GL30.GL_TEXTURE_2D_ARRAY, 0, data.getInternalFormat(), data.getWidth(), data.getHeight(), data.getDepth(), 0, data.getInternalFormat(), data.getGLType(), null); if (!data.isPrepared()) data.prepare(); data.consumeTextureArrayData(); setFilter(minFilter, magFilter); setWrap(uWrap, vWrap); Gdx.gl.glBindTexture(glTarget, 0); }