@Override public StateRecord createStateRecord(final ContextCapabilities caps) { return new TextureStateRecord(); }
texRecord = record.getTextureRecord(textureIdInteger, texture.getType()); if (!record.isValid()) { record.validate();
public static void deleteTextureIds(final Collection<Integer> ids) { // ask for the current state record final RenderContext context = ContextManager.getCurrentContext(); final TextureStateRecord record = (TextureStateRecord) context.getStateRecord(StateType.Texture); final IntBuffer idBuffer = BufferUtils.createIntBuffer(ids.size()); idBuffer.clear(); for (final Integer i : ids) { if (i != null) { idBuffer.put(i); record.removeTextureRecord(i); } } idBuffer.flip(); if (idBuffer.remaining() > 0) { GL11.glDeleteTextures(idBuffer); } }
final TextureRecord texRecord = record.getTextureRecord(textureId, tex.getType()); LwjglTextureStateUtil.applyFilter(tex, texRecord, 0, record, context.getCapabilities()); LwjglTextureStateUtil.applyWrap(tex, texRecord, 0, record, context.getCapabilities());
record.prepPlane(texture.getEnvPlaneS(), TextureStateRecord.DEFAULT_S_PLANE); GL11.glTexGen(GL11.GL_S, GL11.GL_EYE_PLANE, record.plane); record.prepPlane(texture.getEnvPlaneT(), TextureStateRecord.DEFAULT_T_PLANE); GL11.glTexGen(GL11.GL_T, GL11.GL_EYE_PLANE, record.plane); record.prepPlane(texture.getEnvPlaneR(), TextureStateRecord.DEFAULT_R_PLANE); GL11.glTexGen(GL11.GL_R, GL11.GL_EYE_PLANE, record.plane); record.prepPlane(texture.getEnvPlaneQ(), TextureStateRecord.DEFAULT_Q_PLANE); GL11.glTexGen(GL11.GL_Q, GL11.GL_EYE_PLANE, record.plane); record.prepPlane(texture.getEnvPlaneS(), TextureStateRecord.DEFAULT_S_PLANE); GL11.glTexGen(GL11.GL_S, GL11.GL_OBJECT_PLANE, record.plane); record.prepPlane(texture.getEnvPlaneT(), TextureStateRecord.DEFAULT_T_PLANE); GL11.glTexGen(GL11.GL_T, GL11.GL_OBJECT_PLANE, record.plane); record.prepPlane(texture.getEnvPlaneR(), TextureStateRecord.DEFAULT_R_PLANE); GL11.glTexGen(GL11.GL_R, GL11.GL_OBJECT_PLANE, record.plane); record.prepPlane(texture.getEnvPlaneQ(), TextureStateRecord.DEFAULT_Q_PLANE); GL11.glTexGen(GL11.GL_Q, GL11.GL_OBJECT_PLANE, record.plane);
if (!record.isValid() || record.hint != glHint) { texRecord = record.getTextureRecord(textureIdInteger, texture.getType()); if (!record.isValid()) { record.validate();
public static void deleteTexture(final Texture texture) { // ask for the current state record final RenderContext context = ContextManager.getCurrentContext(); final TextureStateRecord record = (TextureStateRecord) context.getStateRecord(StateType.Texture); final Integer id = texture.getTextureIdForContextAsInteger(context); if (id.intValue() == 0) { // Not on card... return. return; } final IntBuffer idBuffer = BufferUtils.createIntBuffer(1); idBuffer.clear(); idBuffer.put(id.intValue()); idBuffer.rewind(); GL11C.glDeleteTextures(idBuffer); record.removeTextureRecord(id); texture.removeFromIdCache(context); }
final TextureRecord texRecord = record.getTextureRecord(textureId, tex.getType()); JoglTextureStateUtil.applyFilter(tex, texRecord, 0, record, context.getCapabilities()); JoglTextureStateUtil.applyWrap(tex, texRecord, 0, record, context.getCapabilities());
record.prepPlane(texture.getEnvPlaneS(), TextureStateRecord.DEFAULT_S_PLANE); gl.getGL2ES1().glTexGenfv(GL2.GL_S, GL2.GL_EYE_PLANE, record.plane); record.prepPlane(texture.getEnvPlaneT(), TextureStateRecord.DEFAULT_T_PLANE); gl.getGL2ES1().glTexGenfv(GL2.GL_T, GL2.GL_EYE_PLANE, record.plane); record.prepPlane(texture.getEnvPlaneR(), TextureStateRecord.DEFAULT_R_PLANE); gl.getGL2ES1().glTexGenfv(GL2.GL_R, GL2.GL_EYE_PLANE, record.plane); record.prepPlane(texture.getEnvPlaneQ(), TextureStateRecord.DEFAULT_Q_PLANE); gl.getGL2ES1().glTexGenfv(GL2.GL_Q, GL2.GL_EYE_PLANE, record.plane); record.prepPlane(texture.getEnvPlaneS(), TextureStateRecord.DEFAULT_S_PLANE); gl.getGL2ES1().glTexGenfv(GL2.GL_S, GL2.GL_OBJECT_PLANE, record.plane); record.prepPlane(texture.getEnvPlaneT(), TextureStateRecord.DEFAULT_T_PLANE); gl.getGL2ES1().glTexGenfv(GL2.GL_T, GL2.GL_OBJECT_PLANE, record.plane); record.prepPlane(texture.getEnvPlaneR(), TextureStateRecord.DEFAULT_R_PLANE); gl.getGL2ES1().glTexGenfv(GL2.GL_R, GL2.GL_OBJECT_PLANE, record.plane); record.prepPlane(texture.getEnvPlaneQ(), TextureStateRecord.DEFAULT_Q_PLANE); gl.getGL2ES1().glTexGenfv(GL2.GL_Q, GL2.GL_OBJECT_PLANE, record.plane);
if (!record.isValid() || record.hint != glHint) { texRecord = record.getTextureRecord(textureIdInteger, texture.getType()); if (!record.isValid()) { record.validate();
public static void deleteTextureIds(final Collection<Integer> ids) { // ask for the current state record final RenderContext context = ContextManager.getCurrentContext(); final TextureStateRecord record = (TextureStateRecord) context.getStateRecord(StateType.Texture); final IntBuffer idBuffer = BufferUtils.createIntBuffer(ids.size()); idBuffer.clear(); for (final Integer i : ids) { if (i != null) { idBuffer.put(i); record.removeTextureRecord(i); } } idBuffer.flip(); if (idBuffer.remaining() > 0) { GL11C.glDeleteTextures(idBuffer); } }
final TextureRecord texRecord = record.getTextureRecord(textureId, tex.getType()); Lwjgl3TextureStateUtil.applyFilter(tex, texRecord, 0, record, context.getCapabilities()); Lwjgl3TextureStateUtil.applyWrap(tex, texRecord, 0, record, context.getCapabilities());
@Override public StateRecord createStateRecord(final ContextCapabilities caps) { return new TextureStateRecord(); }
public static void deleteTexture(final Texture texture) { // ask for the current state record final RenderContext context = ContextManager.getCurrentContext(); final TextureStateRecord record = (TextureStateRecord) context.getStateRecord(StateType.Texture); final Integer id = texture.getTextureIdForContextAsInteger(context.getGlContextRep()); if (id.intValue() == 0) { // Not on card... return. return; } final IntBuffer idBuffer = BufferUtils.createIntBuffer(1); idBuffer.clear(); idBuffer.put(id.intValue()); idBuffer.rewind(); GL11.glDeleteTextures(idBuffer); record.removeTextureRecord(id); texture.removeFromIdCache(context.getGlContextRep()); }
final TextureRecord texRecord = record.getTextureRecord(textureId, tex.getType()); LwjglTextureStateUtil.applyFilter(tex, texRecord, 0, record, context.getCapabilities()); LwjglTextureStateUtil.applyWrap(tex, texRecord, 0, record, context.getCapabilities());
public static void deleteTextureIds(final Collection<Integer> ids) { final GL gl = GLContext.getCurrentGL(); // ask for the current state record final RenderContext context = ContextManager.getCurrentContext(); final TextureStateRecord record = (TextureStateRecord) context.getStateRecord(StateType.Texture); final IntBuffer idBuffer = BufferUtils.createIntBuffer(ids.size()); idBuffer.clear(); for (final Integer i : ids) { if (i != null) { idBuffer.put(i); record.removeTextureRecord(i); } } idBuffer.flip(); if (idBuffer.remaining() > 0) { gl.glDeleteTextures(idBuffer.remaining(), idBuffer); } }
final TextureRecord texRecord = record.getTextureRecord(textureId, tex.getType()); JoglTextureStateUtil.applyFilter(tex, texRecord, 0, record, context.getCapabilities()); JoglTextureStateUtil.applyWrap(tex, texRecord, 0, record, context.getCapabilities());
public static void deleteTexture(final Texture texture) { final GL gl = GLContext.getCurrentGL(); // ask for the current state record final RenderContext context = ContextManager.getCurrentContext(); final TextureStateRecord record = (TextureStateRecord) context.getStateRecord(StateType.Texture); final Integer id = texture.getTextureIdForContextAsInteger(context.getGlContextRep()); if (id.intValue() == 0) { // Not on card... return. return; } final IntBuffer idBuffer = BufferUtils.createIntBuffer(1); idBuffer.clear(); idBuffer.put(id.intValue()); idBuffer.rewind(); gl.glDeleteTextures(idBuffer.limit(), idBuffer); record.removeTextureRecord(id); texture.removeFromIdCache(context.getGlContextRep()); }