mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2026-06-01 20:45:00 -06:00
add opengl implementation and link to ui
This commit is contained in:
parent
8694533891
commit
367a38bdea
@ -320,10 +320,10 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="toggle_skip_duplicate_frames">
|
<widget class="QCheckBox" name="toggle_skip_duplicate_frames">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>Skips presenting duplicated frames in 30fps games. This allows external frame generation tools to work correctly in 30fps games. This does not boost performance.</p></body></html></string>
|
<string><html><head/><body><p>This detects and skips the presentation of frames that are not unique. It also allows external frame generation tools to work correctly with 30fps games. Works in OpenGL and Vulkan.</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Skip Duplicate Frame Display</string>
|
<string>Skip Presenting Duplicate Frames</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@ -196,6 +196,7 @@ void RendererOpenGL::PrepareRendertarget() {
|
|||||||
void RendererOpenGL::RenderToMailbox(const Layout::FramebufferLayout& layout,
|
void RendererOpenGL::RenderToMailbox(const Layout::FramebufferLayout& layout,
|
||||||
std::unique_ptr<Frontend::TextureMailbox>& mailbox,
|
std::unique_ptr<Frontend::TextureMailbox>& mailbox,
|
||||||
bool flipped) {
|
bool flipped) {
|
||||||
|
if ((Core::PerfStats::game_frames_updated && Settings::values.use_skip_duplicate_frames.GetValue()) || !Settings::values.use_skip_duplicate_frames.GetValue()){
|
||||||
|
|
||||||
Frontend::Frame* frame;
|
Frontend::Frame* frame;
|
||||||
{
|
{
|
||||||
@ -241,6 +242,9 @@ void RendererOpenGL::RenderToMailbox(const Layout::FramebufferLayout& layout,
|
|||||||
glFlush();
|
glFlush();
|
||||||
mailbox->ReleaseRenderFrame(frame);
|
mailbox->ReleaseRenderFrame(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Core::PerfStats::game_frames_updated = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -236,7 +236,8 @@ void RendererVulkan::PrepareDraw(Frame* frame, const Layout::FramebufferLayout&
|
|||||||
|
|
||||||
void RendererVulkan::RenderToWindow(PresentWindow& window, const Layout::FramebufferLayout& layout,
|
void RendererVulkan::RenderToWindow(PresentWindow& window, const Layout::FramebufferLayout& layout,
|
||||||
bool flipped) {
|
bool flipped) {
|
||||||
if (Core::PerfStats::game_frames_updated){
|
|
||||||
|
if ((Core::PerfStats::game_frames_updated && Settings::values.use_skip_duplicate_frames.GetValue()) || !Settings::values.use_skip_duplicate_frames.GetValue()){
|
||||||
Frame* frame = window.GetRenderFrame();
|
Frame* frame = window.GetRenderFrame();
|
||||||
|
|
||||||
if (layout.width != frame->width || layout.height != frame->height) {
|
if (layout.width != frame->width || layout.height != frame->height) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user