NDEVR
API Documentation
GLComputeShader.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Buffer.h>
4#include <QOpenGLContext>
5#include <QOffscreenSurface>
6#include <QSurfaceFormat>
7#ifdef _WIN32
8#include <QOpenGLFunctions_4_3_Core>
9#include <QOpenGLShaderProgram>
10namespace NDEVR
11{
14 class GLES_INTERFACE_API GLComputeShader
15 {
16 public:
18 GLComputeShader();
20 void setupGL();
22 void ensureCurrent();
25 void setQtGL(QOpenGLFunctions_4_3_Core* gl);
30 void ensureSSBO(GLuint& id, GLsizeiptr bytes, GLenum usage);
35 void readBytes(GLuint buf, void* dst, GLsizeiptr bytes);
39 static void ResetAtomicAll(QOpenGLFunctions_4_3_Core* gl, GLuint buf);
44 static inline uint04 CeilDiv(uint04 a, uint04 b) { return (a + b - 1) / b; }
51 static void ReadBytes(QOpenGLFunctions_4_3_Core* gl, GLenum target, GLuint buf, void* dst, GLsizeiptr bytes);
52 protected:
53 QOpenGLContext* m_ctx = nullptr;
54 QOpenGLFunctions_4_3_Core* m_gl = nullptr;
55 QOffscreenSurface* m_surf = nullptr;
56 };
57}
58#endif
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...