-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPBGE: Refactor rasterizer off screen management.
Previously a C++ wrapper of GPUOffScreen was in RAS_OpenGLRasterizer but only for the list of off screen the rasterizer is using. This wrapper was hidden and its function were wrapped into other RAS_OpenGLRasterizer function. This behaviour introducing a big time per modifications due to wrapper levels. To remove one wrapper level the GPUOffScreen is wrapped in a new class named RAS_OffScreen. This class is reused in ImageRender and in the rest of RAS_OpenGLRasterizer::OffScreen which is now only owning the RAS_OffScreen instances and allocating/deleting them. Thes function for allocation are yet wrapped in the rasterizer under UpdateOffScreen and GetOffScreen. This last function returns a RAS_OffScreen pointer. For the other function executing off screen draw, they are let in the rasterizer because they request use shader interface only owned by the rasterizer. As the render mechanisme is based on off screen ping-pong, we was only using off screen index/type, but know that we have acces to RAS_OffScreen it simplify some code case. But in the place where we have to know what is the next off screen using the functions Next[Filter/Eye/Render]OffScreen the off screen type/index is get thanks to the function RAS_OffScreen::GetType(). This function is returning the value of the type passed as second argument of the constructor. As ImageRender are now using RAS_OffScreen, the type is then RAS_OFFSCREEN_CUSTOM. About RAS_OffScreen, the GPUOffScreen is owned by this class and some of its functions are wrapped. There are functions to bind/unbind color/depth texture, mipmap, get datas, restore screen. The last bound off screen is set into the static variable lastOffScreen accesible through RAS_OffScreen::GetLastOffScreen.
- Loading branch information
1 parent
cf01b56
commit aa4b6a0
Showing
19 changed files
with
480 additions
and
428 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
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.