Skip to content

Basic Venue Support#87

Draft
Ladcan wants to merge 18 commits into
Encore-Developers:mainfrom
Ladcan:main
Draft

Basic Venue Support#87
Ladcan wants to merge 18 commits into
Encore-Developers:mainfrom
Ladcan:main

Conversation

@Ladcan
Copy link
Copy Markdown

@Ladcan Ladcan commented May 24, 2026

This is very finicky code and may have some issues.

This doesn't work with .mid files but I'm planning to add more support to this.

Comment thread Encore/src/gameplay/venueRenderer/VenueHandler.cpp Outdated
Comment thread Encore/src/gameplay/venueRenderer/VenueHandler.cpp
Ladcan added 2 commits May 24, 2026 18:19
better way of generating venue events
Comment thread Encore/src/gameplay/venueRenderer/VenueHandler.cpp Outdated
Ladcan and others added 2 commits May 24, 2026 18:27
Co-authored-by: Sulfrix <me@sulfrix.com>

rlDisableDepthMask();
rlDisableDepthTest();
rlEnableBackfaceCulling();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While disabling depth testing is useful for the lights, it might be better to draw the main venue mesh with depth testing enabled.
You can use glClear(GL_DEPTH_BUFFER_BIT) to only clear the depth buffer after drawing the venue so that you can do whatever you want with the depth buffer without worrying about the track rendering.
(Look at Track::DrawSmashers)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't "rlEnableDepthMask();" at 276:5 fix the issue?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That, and rlEnableDepthTest()
This is less of an "issue" and more general advice for something that will come up with more complex venues: you'll see things rendering through other things when they shouldn't because of triangle order and whatnot.
I noticed that the depth test was disabled to not mess with highway rendering and I assumed there were occlusion issues with the highway. If you clear the depth buffer after drawing the venue (and before drawing the tracks), you'll won't ever have to worry about there being any conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants