@Override public int glName() { return this.texture.glName(); } }
@Override public int glName() { return this.texture.glName(); } }
@Override public boolean textureCubeIsBoundAnywhere( final JCGLTextureCubeUsableType texture) throws JCGLException { checkTextureCube(this.context, texture); final int texture_id = texture.glName(); return this.texture_to_units.containsKey(texture_id); }
@Override public boolean textureCubeIsBoundAnywhere( final JCGLTextureCubeUsableType texture) throws JCGLException { checkTextureCube(this.context, texture); final int texture_id = texture.glName(); return this.texture_to_units.containsKey(texture_id); }
@Override public Unit onTextureCube( final JCGLTextureCubeUsableType t, final JCGLCubeMapFaceLH face) throws JCGLException, UnreachableCodeException { if (LOG.isDebugEnabled()) { LOG.debug( "[{}] attach color {} {} (face {})", Integer.valueOf(f_id), Integer.valueOf(index), t, face); } LWJGL3Textures.checkTextureCube(c, t); final JCGLTextureFormat f = t.format(); JCGLTextureFormats.checkColorRenderableTexture2D(f); final int gface = LWJGL3TypeConversions.cubeFaceToGL(face); GL30.glFramebufferTexture2D( GL30.GL_DRAW_FRAMEBUFFER, GL30.GL_COLOR_ATTACHMENT0 + index, gface, t.glName(), 0); return Unit.unit(); } });
checkTextureUnit(this.context, unit); final int index = unit.index(); final int texture_id = texture.glName();
@Override public void textureCubeBind( final JCGLTextureUnitType unit, final JCGLTextureCubeUsableType texture) throws JCGLException { final FakeTextureCube t = checkTextureCube(this.context, texture); final FakeTextureUnit u = checkTextureUnit(this.context, unit); this.checkFeedback(texture); final int index = unit.index(); final int texture_id = texture.glName(); this.textureUnitUnbind(unit); LOG.trace("bind cube [{}]: none -> {}", Integer.valueOf(index), texture); this.bindingAddTextureReference(texture_id, index); u.setBindCube(t); }