Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable / Disable depth writing #110

Merged
merged 4 commits into from
May 30, 2016

Conversation

JayFoxRox
Copy link
Collaborator

@JayFoxRox JayFoxRox commented May 30, 2016

4 commits, 4 comments:

  • First this replaces the ObjectData flags for SA with those from GTA3.
    We can still re-add the code later when working on SA. I think this was added for SA by accident anyway?
    This also made it necessary to change some damage handler.
    (No idea what the 80 means btw, I think there should be an enum for these values..)
  • Then add a depth write function to the OpenGL Renderer
    (Unused at this point)
  • During the previous change I noticed that the blendEnabled bool is never actually set (which always forces enabled GL_BLEND). However, setting it breaks the renderer because the blend state is not recovered on Renderer invalidation and even when adding that it's still broken because not everything invalidates the renderer..
    I didn't want to fix it as part of this commit so I only added a note and made the current operation more obvious (which also should cause a warning during compilation).
  • The real change in this one is that objects which have flag value 64 (NO_ZBUFFER_WRITE) don't do depth writes anymore now.
    This avoids the shadow-z-fighting which is commonly seen under the train tracks.
    I've also disabled depth writing for the text renderer but did not test if the actual game does that too.
    I might have a look at text rendering soon anyway and it's easy enough to change it back if it's wrong.

@danhedron danhedron merged commit bf8ea86 into rwengine:master May 30, 2016
@JayFoxRox JayFoxRox deleted the flags-depth-write branch May 30, 2016 22:10
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