File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1530,4 +1530,19 @@ impl GraphicsServer for GlGraphicsServer {
15301530 fn memory_usage ( & self ) -> ServerMemoryUsage {
15311531 self . memory_usage . borrow ( ) . clone ( )
15321532 }
1533+
1534+ fn push_debug_group ( & self , name : & str ) {
1535+ if self . gl . supports_debug ( ) {
1536+ unsafe {
1537+ self . gl
1538+ . push_debug_group ( glow:: DEBUG_SOURCE_APPLICATION , 0 , name)
1539+ }
1540+ }
1541+ }
1542+
1543+ fn pop_debug_group ( & self ) {
1544+ if self . gl . supports_debug ( ) {
1545+ unsafe { self . gl . pop_debug_group ( ) }
1546+ }
1547+ }
15331548}
Original file line number Diff line number Diff line change @@ -210,6 +210,12 @@ pub trait GraphicsServer: GraphicsServerAsAny {
210210 /// Fetches the total amount of memory used by the graphics server.
211211 fn memory_usage ( & self ) -> ServerMemoryUsage ;
212212
213+ /// Begins a new named debug group.
214+ fn push_debug_group ( & self , name : & str ) ;
215+
216+ /// Ends the current debug group.
217+ fn pop_debug_group ( & self ) ;
218+
213219 /// A shortcut for [`Self::create_texture`], that creates a rectangular texture with the given
214220 /// size and pixel kind.
215221 fn create_2d_render_target (
You can’t perform that action at this time.
0 commit comments