GlUtil .java

com.mojang.renderpearl.backend.opengl.GlUtil (class, 21 lines): members: selectBufferBindTarget. imports: GpuBuffer, EnvType, Environment.

com.mojang.renderpearl.backend.openglclass21 linesclient514 B

API Surface (1)

int selectBufferBindTarget(final @GpuBuffer.Usage int usage)

Code Graph: Dependencies (1)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

GlUtil.java21 lines · Minecraft 26.3 · verbatim
1
package com.mojang.renderpearl.backend.opengl;
2
3
import com.mojang.renderpearl.api.buffers.GpuBuffer;
4
import net.fabricmc.api.EnvType;
5
import net.fabricmc.api.Environment;
6
7
@Environment(EnvType.CLIENT)
8
public class GlUtil {
9
	public static int selectBufferBindTarget(final @GpuBuffer.Usage int usage) {
10
		if ((usage & 32) != 0) {
11
			return 34962;
12
		} else if ((usage & 64) != 0) {
13
			return 34963;
14
		} else if ((usage & 128) != 0) {
15
			return 35345;
16
		} else {
17
			return (usage & 512) != 0 ? 36671 : 36663;
18
		}
19
	}
20
}
21

Decompiled Minecraft 26.3 source of GlUtil (com/mojang/renderpearl/backend/opengl/GlUtil.java) with Mojang official mappings, stored verbatim on the site.