Files
melonDS/src/frontend/qt_sdl/VideoSettingsDialog.h
RSDuck 043244a56d Compute shader renderer (#2041)
* nothing works yet

* don't double buffer 3D framebuffers for the GL Renderer
looks like leftovers from when 3D+2D composition was done in the frontend

* oops

* it works!

* implement display capture for compute renderer
it's actually just all stolen from the regular OpenGL renderer

* fix bad indirect call

* handle cleanup properly

* add hires rendering to the compute shader renderer

* fix UB
also misc changes to use more unsigned multiplication
also fix framebuffer resize

* correct edge filling behaviour when AA is disabled

* fix full color textures

* fix edge marking (polygon id is 6-bit not 5)
also make the code a bit nicer

* take all edge cases into account for XMin/XMax calculation

* use hires coordinate again

* stop using fixed size buffers based on scale factor in shaders
this makes shader compile times tolerable on Wintel
- beginning of the shader cache
- increase size of tile idx in workdesc to 20 bits

* apparently & is not defined on bvec4
why does this even compile on Intel and Nvidia?

* put the texture cache into it's own file

* add compute shader renderer properly to the GUI
also add option to toggle using high resolution vertex coordinates

* unbind sampler object in compute shader renderer

* fix GetRangedBitMask for 64 bit aligned 64 bits
pretty embarassing

* convert NonStupidBitfield.h back to LF only new lines

* actually adapt to latest changes

* fix stupid merge

* actually make compute shader renderer work with newest changes

* show progress on shader compilation

* remove merge leftover
2024-05-13 17:17:39 +02:00

91 lines
2.3 KiB
C++

/*
Copyright 2016-2023 melonDS team
This file is part of melonDS.
melonDS is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option)
any later version.
melonDS is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with melonDS. If not, see http://www.gnu.org/licenses/.
*/
#ifndef VIDEOSETTINGSDIALOG_H
#define VIDEOSETTINGSDIALOG_H
#include <QDialog>
#include <QButtonGroup>
namespace Ui { class VideoSettingsDialog; }
class VideoSettingsDialog;
class VideoSettingsDialog : public QDialog
{
Q_OBJECT
public:
explicit VideoSettingsDialog(QWidget* parent);
~VideoSettingsDialog();
static VideoSettingsDialog* currentDlg;
static VideoSettingsDialog* openDlg(QWidget* parent)
{
if (currentDlg)
{
currentDlg->activateWindow();
return currentDlg;
}
currentDlg = new VideoSettingsDialog(parent);
currentDlg->show();
return currentDlg;
}
static void closeDlg()
{
currentDlg = nullptr;
}
signals:
void updateVideoSettings(bool glchange);
private slots:
void on_VideoSettingsDialog_accepted();
void on_VideoSettingsDialog_rejected();
void onChange3DRenderer(int renderer);
void on_cbGLDisplay_stateChanged(int state);
void on_cbVSync_stateChanged(int state);
void on_sbVSyncInterval_valueChanged(int val);
void on_cbxGLResolution_currentIndexChanged(int idx);
void on_cbBetterPolygons_stateChanged(int state);
void on_cbxComputeHiResCoords_stateChanged(int state);
void on_cbSoftwareThreaded_stateChanged(int state);
private:
void setVsyncControlEnable(bool hasOGL);
void setEnabled();
Ui::VideoSettingsDialog* ui;
QButtonGroup* grp3DRenderer;
int oldRenderer;
int oldGLDisplay;
int oldVSync;
int oldVSyncInterval;
int oldSoftThreaded;
int oldGLScale;
int oldGLBetterPolygons;
int oldHiresCoordinates;
};
#endif // VIDEOSETTINGSDIALOG_H