-
Notifications
You must be signed in to change notification settings - Fork 173
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
【igl nanovg part-1】shell | mac | add stencil buffer #216
Changes from 6 commits
9e3c99d
3ed058e
41fab96
5c7225c
d861110
a80976c
6d42667
df01ffb
4188a2c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ struct RenderSessionConfig { | |
std::string displayName; | ||
BackendVersion backendVersion; | ||
igl::TextureFormat swapchainColorTextureFormat = igl::TextureFormat::BGRA_UNorm8; | ||
igl::TextureFormat depthTextureFormat = igl::TextureFormat::Z_UNorm16; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's a lot of our internal code that relies on this field. Is it possible to add stencil buffer support without getting rid of it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The field depthTextureFormat is add by me in this commit.49d674c This PR revert the commit before, add move the depthTextureFormat field into RenderSession. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I looked into it, the tests do not pass because the file There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have fixed iOS compile error. The complete adaptation of the iOS stencil buffer is another PR(#221). |
||
igl::ColorSpace swapchainColorSpace = igl::ColorSpace::SRGB_NONLINEAR; | ||
}; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for this addition? The point of suggested+requested configs is to let a particular session choose the formats it wants without needing to create some kind of dummy session without a platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You want the stencil buffer to be disabled by default. So, I can only move the depthTextureFormat field from RenderSessionConfig to RenderSession, and then NanovgRenderSession can override the default depthTextureFormat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything already merged into
main
is fine. For any further changes, aim to make only the minimal changes necessary. Please update your diffs to minimize the modifications required to add NanoVG.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The minimal way to make the changes is to keep the depthTextureFormat field in RenderSessionConfig.
If I want to show the NanoVG session and make changes to depthTextureFormat locally, and avoid committing it to the main branch.
I can add comments in NanovgSession to explain that other developers can make such changes if they want to show the effect.
This approach is also well-suited for Android, because without it, the changes required for Android would be significant as well.
What do you think about this approach?