Skip to content

Commit b388a28

Browse files
committed
fix merge errors x2
1 parent 2f41e8e commit b388a28

File tree

21 files changed

+568
-453
lines changed

21 files changed

+568
-453
lines changed

common/src/main/java/org/vivecraft/client_vr/VRState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static void initializeVR() {
8282
// everything related to VR is created now
8383
VR_INITIALIZED = true;
8484

85-
dh.vrRenderer.setupRenderConfiguration(false); //For openXR, setup but don't render yet
85+
dh.vrRenderer.setupRenderConfiguration(); //For openXR, setup but don't render yet
8686
RenderPassManager.setVanillaRenderPass();
8787

8888
dh.vrPlayer = new VRPlayer();

common/src/main/java/org/vivecraft/client_vr/VRTextureTarget.java

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import com.mojang.blaze3d.opengl.GlDevice;
44
import com.mojang.blaze3d.pipeline.RenderTarget;
5-
import com.mojang.blaze3d.platform.TextureUtil;
65
import com.mojang.blaze3d.systems.RenderSystem;
76
import com.mojang.blaze3d.textures.AddressMode;
87
import com.mojang.blaze3d.textures.FilterMode;
@@ -32,13 +31,6 @@ public class VRTextureTarget extends RenderTarget {
3231
private VRTextureTarget(
3332
String name, int width, int height, boolean useDepth, int texId, boolean linearFilter, boolean mipmaps,
3433
boolean anisotropicFiltering, boolean useStencil, @Nullable Vector4fc clearColor)
35-
{
36-
this(name, width, height, useDepth, texId, linearFilter, mipmaps, useStencil, false);
37-
}
38-
39-
public VRTextureTarget(
40-
String name, int width, int height, boolean useDepth, int texId, boolean linearFilter, boolean mipmaps,
41-
boolean useStencil, boolean prePopulated)
4234
{
4335
super(name, useDepth);
4436
RenderSystem.assertOnRenderThread();
@@ -58,19 +50,11 @@ public VRTextureTarget(
5850
if (texId >= 0) {
5951
// hardcoded opengl here
6052
if (RenderSystem.getDevice() instanceof GlDevice glDevice) {
61-
if(!prePopulated) {
62-
this.colorTexture = ((GlDeviceExtension) glDevice).vivecraft$createFixedIdTexture(
63-
() -> this.label + " / Color",
64-
GpuTexture.USAGE_COPY_DST | GpuTexture.USAGE_COPY_SRC | GpuTexture.USAGE_TEXTURE_BINDING |
65-
GpuTexture.USAGE_RENDER_ATTACHMENT, TextureFormat.RGBA8, width, height, 1,
66-
mipmaps ? Math.max(Mth.log2(width), Mth.log2(height)) : 1, texId);
67-
} else {
68-
this.colorTexture = ((GlDeviceExtension) glDevice).vivecraft$precreatedFixedIdTexture(
69-
() -> this.label + " / Color",
70-
GpuTexture.USAGE_COPY_DST | GpuTexture.USAGE_COPY_SRC | GpuTexture.USAGE_TEXTURE_BINDING |
71-
GpuTexture.USAGE_RENDER_ATTACHMENT, TextureFormat.RGBA8, width, height, 1,
72-
mipmaps ? Math.max(Mth.log2(width), Mth.log2(height)) : 1, texId);
73-
}
53+
this.colorTexture = ((GlDeviceExtension) glDevice).vivecraft$createFixedIdTexture(
54+
() -> this.label + " / Color",
55+
GpuTexture.USAGE_COPY_DST | GpuTexture.USAGE_COPY_SRC | GpuTexture.USAGE_TEXTURE_BINDING |
56+
GpuTexture.USAGE_RENDER_ATTACHMENT, TextureFormat.RGBA8, width, height, 1,
57+
mipmaps ? Math.max(Mth.log2(width), Mth.log2(height)) : 1, texId);
7458
this.colorTextureView = glDevice.createTextureView(this.colorTexture);
7559
this.colorTexture.setAddressMode(AddressMode.CLAMP_TO_EDGE);
7660
this.setFilterMode(linearFilter ? FilterMode.LINEAR : FilterMode.NEAREST);

common/src/main/java/org/vivecraft/client_vr/gameplay/interact_modules/InteractiveHotbarModule.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ public boolean onPress(LocalPlayer player, InteractionHand hand) {
169169

170170
@Override
171171
public void renderDebug(boolean isActive) {
172+
/*
172173
if (this.dh.vrSettings.seated) return;
173174
if (this.mc.screen != null || !this.dh.vrSettings.vrTouchHotbar) return;
174175
if (this.dh.vrSettings.vrHudLockMode == VRSettings.HUDLock.HEAD || !GuiHandler.HUD_POPUP) return;
@@ -207,5 +208,6 @@ public void renderDebug(boolean isActive) {
207208
DebugRenderHelper.renderCylinder(slotPos.add(line.mul(0.5F, new Vector3f()), new Vector3f()), line, size,
208209
this.hotbar == 9 ? MathUtils.GREEN : MathUtils.RED);
209210
}
211+
*/
210212
}
211213
}

common/src/main/java/org/vivecraft/client_vr/gameplay/interact_modules/ScreenshotCameraModule.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ public void renderDebug(boolean isActive) {
7979
if (this.dh.cameraTracker.isVisible() && !this.dh.cameraTracker.isQuickMode() && this.camPos != null) {
8080
VRData world = this.dh.vrPlayer.getVRDataWorld();
8181
// no origin offset, since the camera is world relative
82-
DebugRenderHelper.renderSphere(
83-
MathUtils.subtractToVector3f(this.camPos, world.getEye(this.dh.currentPass).getPosition()),
84-
INTERACT_DIST * world.worldScale, isActive ? MathUtils.GREEN : MathUtils.RED);
82+
//DebugRenderHelper.renderSphere(
83+
// MathUtils.subtractToVector3f(this.camPos, world.getEye(this.dh.currentPass).getPosition()),
84+
// INTERACT_DIST * world.worldScale, isActive ? MathUtils.GREEN : MathUtils.RED);
8585
}
8686
}
8787
}

common/src/main/java/org/vivecraft/client_vr/gameplay/interact_modules/ThirdPersonCameraModule.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ public void renderDebug(boolean isActive) {
9393
VRData world = this.dh.vrPlayer.getVRDataWorld();
9494
// origin offset since the camera is room relative
9595
Vec3 cam = this.camPos.subtract(this.dh.vrPlayer.vrdata_world_pre.origin).add(world.origin);
96-
DebugRenderHelper.renderSphere(
97-
MathUtils.subtractToVector3f(cam, world.getEye(this.dh.currentPass).getPosition()),
98-
INTERACT_DIST * world.worldScale, isActive ? MathUtils.GREEN : MathUtils.RED);
96+
//DebugRenderHelper.renderSphere(
97+
// MathUtils.subtractToVector3f(cam, world.getEye(this.dh.currentPass).getPosition()),
98+
// INTERACT_DIST * world.worldScale, isActive ? MathUtils.GREEN : MathUtils.RED);
9999
}
100100
}
101101
}

common/src/main/java/org/vivecraft/client_vr/gameplay/trackers/BowTracker.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ public void activeProcess(LocalPlayer player) {
265265

266266
@Override
267267
public void renderDebug() {
268+
/*
268269
VRData world = this.dh.vrPlayer.getVRDataWorld();
269270
Vec3 cam = world.getEye(this.dh.currentPass).getPosition();
270271
int bowHand = this.dh.vrSettings.reverseShootingEye && ClientNetworking.supportsReversedBow() ? 0 : 1;
@@ -292,5 +293,6 @@ public void renderDebug() {
292293
MathUtils.subtractToVector3f(arrowPose.getPosition(), cam)
293294
.add(arrowPose.getDirection().mul(world.worldScale)));
294295
}
296+
*/
295297
}
296298
}

common/src/main/java/org/vivecraft/client_vr/gameplay/trackers/EatingTracker.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ public void activeProcess(LocalPlayer player) {
145145

146146
@Override
147147
public void renderDebug() {
148+
/*
148149
VRData world = this.dh.vrPlayer.getVRDataWorld();
149150
Vec3 cam = world.getEye(this.dh.currentPass).getPosition();
150151
for (int c = 0; c < 2; c++) {
@@ -158,5 +159,6 @@ public void renderDebug() {
158159
this.eating[c] ? MathUtils.GREEN : MathUtils.RED);
159160
}
160161
}
162+
*/
161163
}
162164
}

common/src/main/java/org/vivecraft/client_vr/gameplay/trackers/SwingTracker.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,7 @@ public static float getItemFade(LocalPlayer player, ItemStack itemStack) {
650650

651651
@Override
652652
public void renderDebug() {
653+
/*
653654
int trackers = 2;
654655
655656
if (this.dh.vrSettings.feetCollision && this.dh.vrPlayer.vrdata_world_pre.fbtMode != FBTMode.ARMS_ONLY) {
@@ -725,5 +726,6 @@ public void renderDebug() {
725726
(float) entity.getBoundingBox().getSize() / 2F, MathUtils.GREEN);
726727
}
727728
}
729+
*/
728730
}
729731
}

0 commit comments

Comments
 (0)