Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
1a9df835
There was an error fetching the commit references. Please try again later.
Commit
1a9df835
authored
7 years ago
by
bunnei
Browse files
Options
Downloads
Patches
Plain Diff
renderer_opengl: Only draw the screen if a framebuffer is specified.
parent
f934da0e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/video_core/renderer_opengl/renderer_opengl.cpp
+7
-6
7 additions, 6 deletions
src/video_core/renderer_opengl/renderer_opengl.cpp
with
7 additions
and
6 deletions
src/video_core/renderer_opengl/renderer_opengl.cpp
+
7
−
6
View file @
1a9df835
...
...
@@ -100,6 +100,8 @@ RendererOpenGL::~RendererOpenGL() = default;
/// Swap buffers (render frame)
void
RendererOpenGL
::
SwapBuffers
(
boost
::
optional
<
const
Tegra
::
FramebufferConfig
&>
framebuffer
)
{
Core
::
System
::
GetInstance
().
perf_stats
.
EndSystemFrame
();
// Maintain the rasterizer's state as a priority
OpenGLState
prev_state
=
OpenGLState
::
GetCurState
();
state
.
Apply
();
...
...
@@ -114,20 +116,19 @@ void RendererOpenGL::SwapBuffers(boost::optional<const Tegra::FramebufferConfig&
// performance problem.
ConfigureFramebufferTexture
(
screen_info
.
texture
,
*
framebuffer
);
}
// Load the framebuffer from memory, draw it to the screen, and swap buffers
LoadFBToScreenInfo
(
*
framebuffer
,
screen_info
);
DrawScreens
();
render_window
->
SwapBuffers
();
}
DrawScreens
();
Core
::
System
::
GetInstance
().
perf_stats
.
EndSystemFrame
();
// Swap buffers
render_window
->
PollEvents
();
render_window
->
SwapBuffers
();
Core
::
System
::
GetInstance
().
frame_limiter
.
DoFrameLimiting
(
CoreTiming
::
GetGlobalTimeUs
());
Core
::
System
::
GetInstance
().
perf_stats
.
BeginSystemFrame
();
// Restore the rasterizer state
prev_state
.
Apply
();
RefreshRasterizerSetting
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment