aboutsummaryrefslogtreecommitdiff
path: root/libs/preview_dds_native/src/ddswidget.h
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-03-12 07:08:09 -0500
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-03-12 07:08:09 -0500
commit755698f1adceef55f52c8e44c9746537885c9bf7 (patch)
tree23d1a9fea936805708eeccf2ac2684620565d328 /libs/preview_dds_native/src/ddswidget.h
parent019870ffd8308d94289d72d45abeb3db39ccde92 (diff)
Replace Python plugins with native C++ .so, remove bundled Python (~95MB)
- Add native plugins: form43_checker, script_extender_checker, preview_dds, basic_games (75 game defs via IPluginProxy pattern with Steam/GOG detection) - Remove portable Python from Dockerfile and build-inner.sh - Add Python settings tab with venv support (system python3 + PyQt6) - Skip loading plugin_python.so when Python disabled (default: off) - Update pythonrunner.cpp to use venv at ~/.local/share/fluorine/python-venv/ - Preserve real file permissions in FUSE VFS (fixes native executable +x bits) - Add FUSE_SET_ATTR_MODE handler so chmod works through VFS - Fix desktop shortcut Exec= to use fluorine-manager launcher, not bare binary Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'libs/preview_dds_native/src/ddswidget.h')
-rw-r--r--libs/preview_dds_native/src/ddswidget.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/libs/preview_dds_native/src/ddswidget.h b/libs/preview_dds_native/src/ddswidget.h
new file mode 100644
index 0000000..968e253
--- /dev/null
+++ b/libs/preview_dds_native/src/ddswidget.h
@@ -0,0 +1,36 @@
+#ifndef DDSWIDGET_H
+#define DDSWIDGET_H
+
+#include "ddsfile.h"
+
+#include <QOpenGLBuffer>
+#include <QOpenGLFunctions>
+#include <QOpenGLShaderProgram>
+#include <QOpenGLTexture>
+#include <QOpenGLWidget>
+
+class DDSWidget : public QOpenGLWidget, protected QOpenGLFunctions
+{
+ Q_OBJECT
+
+public:
+ explicit DDSWidget(const DDSFile& dds, QWidget* parent = nullptr);
+ ~DDSWidget() override;
+
+protected:
+ void initializeGL() override;
+ void resizeGL(int w, int h) override;
+ void paintGL() override;
+
+private:
+ void uploadTexture();
+ void setupShaders();
+
+ const DDSFile& m_dds;
+ QOpenGLTexture* m_texture = nullptr;
+ QOpenGLShaderProgram* m_shader = nullptr;
+ QOpenGLBuffer m_vbo;
+ float m_aspectRatio = 1.0f;
+};
+
+#endif // DDSWIDGET_H