Basic Venue Support#87
Conversation
This reverts commit 86d5195.
better way of generating venue events
Co-authored-by: Sulfrix <me@sulfrix.com>
|
|
||
| rlDisableDepthMask(); | ||
| rlDisableDepthTest(); | ||
| rlEnableBackfaceCulling(); |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Wouldn't "rlEnableDepthMask();" at 276:5 fix the issue?
There was a problem hiding this comment.
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.
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.