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