Skip to content

Commit ef97596

Browse files
committed
release: 3.0.3
fix: non-transparent texture on creation
1 parent 484c3bf commit ef97596

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ yarn_mappings=1.21.4+build.8
55
loader_version=0.16.5
66

77
archives_base_name=mcef
8-
mod_version=3.0.2-1.21.4
8+
mod_version=3.0.3-1.21.4
99
maven_group=CCBlueX
1010

1111
loom_version=1.9-SNAPSHOT

src/main/java/net/ccbluex/liquidbounce/mcef/cef/MCEFRenderer.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ public void initialize() {
4040
RenderSystem.bindTexture(textureID[0]);
4141
RenderSystem.texParameter(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
4242
RenderSystem.texParameter(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
43+
44+
var emptyBuffer = ByteBuffer.allocateDirect(4);
45+
emptyBuffer.put((byte) 0).put((byte) 0).put((byte) 0).put((byte) 0); // BGRA: fully transparent
46+
emptyBuffer.flip();
47+
48+
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, emptyBuffer);
49+
4350
RenderSystem.bindTexture(0);
4451
}
4552

0 commit comments

Comments
 (0)