-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor render interface: Require compiled geometry, use modern and …
…safer types [breaking change] All geometry now requires compiling, the immediate geometry rendering call is removed for the following reasons: 1. Compiled geometry is required to use any of the new rendering features, including clip mask and shaders. 2. It simplifies the render interface, by removing a function that essentially provided a duplicate feature set. 3. This change enables us to make a clear distinction between required and optional functions. All required functions are now abstract, while optional functions are not. With recent changes, migrating from the immediate render function to using the compiled geometry functions, should be much less effort. Now the pointers to the geometry data (vertices and indices) are guaranteed to be available and immutable until the same geometry is released. Thus, users can simply store the views to this data, and reuse that during rendering. The signatures of several functions are changed: - The Span type is now used to represent contiguous data for improved usability and safety. - Texture load and generate now return the texture handle directly, to be consistent with the way geometry is compiled. The value zero is used to represent an empty texture, like before. - The scissor region now takes a Rectangle type for improved ergonomics. This is a breaking change for all users, and requires some minor adaptation in existing render interfaces. The changes to the backend renderers in this commit can be used as a reference for the change.
- Loading branch information
Showing
34 changed files
with
351 additions
and
423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.