20 #if !defined(INC_StdGL) && !defined(USE_CONSOLE)
43 const
char*
what() const throw()
override {
return Buf.
getData(); }
113 virtual void Clear(
bool multisample_change =
false);
116 std::vector<int> EnumerateMultiSamples()
const;
120 virtual bool Select(
bool verbose =
false);
131 #elif defined(USE_SDL_MAINLOOP)
148 #ifdef WITH_QT_EDITOR
154 ~CStdGLCtxQt()
override {
Clear(); }
156 void Clear(
bool multisample_change =
false)
override;
158 bool Select(
bool verbose =
false)
override;
163 class QOpenGLContext *context =
nullptr;
164 class QOffscreenSurface *surface =
nullptr;
246 bool GetVAO(
unsigned int vaoid, GLuint& vao);
249 void Clear()
override;
281 bool LowMaxVertexUniformCount;
282 bool ForceSoftwareTransform;
284 void ObjectLabel(uint32_t identifier, uint32_t name, int32_t length,
const char * label);
289 bool Error(
const char *szMsg)
override;
300 #ifdef WITH_QT_EDITOR
301 friend class CStdGLCtxQt;
@ C4SSU_AmbientBrightness
@ C4SSU_MaterialShininess
C4DrawGLError(const StdStrBuf &buf)
const char * what() const override
~C4DrawGLError() override=default
std::vector< unsigned int > VAOsToBeDeleted
virtual bool Init(C4Window *pWindow, C4AbstractApp *pApp)
virtual bool Select(bool verbose=false)
virtual void Clear(bool multisample_change=false)
std::vector< GLuint > hVAOs
static std::list< CStdGLCtx * > contexts
std::list< CStdGLCtx * >::iterator this_context
std::set< unsigned int > VAOIDs
C4Shader SpriteShaderLightBaseNormalMod2
void SetupMultiBlt(C4ShaderCall &call, const C4BltTransform *pTransform, GLuint baseTex, GLuint overlayTex, GLuint normalTex, DWORD dwOverlayModClr, StdProjectionMatrix *out_modelview)
void PerformMesh(StdMeshInstance &instance, float tx, float ty, float twdt, float thgt, DWORD dwPlayerColor, C4BltTransform *pTransform) override
unsigned int GenericVBOSizes[N_GENERIC_VBOS]
StdProjectionMatrix ProjectionMatrix
bool EnsureMainContextSelected() override
C4Shader SpriteShaderLightBase
C4Shader SpriteShaderBaseOverlayMod2
void PerformMultiBlt(C4Surface *sfcTarget, DrawOperation op, const C4BltVertex *vertices, unsigned int n_vertices, bool has_tex, C4ShaderCall *shader_call)
C4Shader SpriteShaderBaseOverlay
C4Shader SpriteShaderLightMod2
void ObjectLabel(uint32_t identifier, uint32_t name, int32_t length, const char *label)
bool InvalidateDeviceObjects() override
C4Shader SpriteShaderBaseMod2
unsigned int GenericVAOs[N_GENERIC_VBOS *2]
C4Shader SpriteShaderMod2
const StdProjectionMatrix & GetProjectionMatrix() const
bool InitShaders(C4GroupSet *pGroups)
C4Shader SpriteShaderLightBaseNormal
const char * GLErrorString(GLenum code)
bool PrepareRendering(C4Surface *sfcToSurface) override
bool PrepareSpriteShader(C4Shader &shader, const char *name, int ssc, C4GroupSet *pGroups, const char *const *additionalDefines, const char *const *additionalSlices) override
GLuint GenericVBOs[N_GENERIC_VBOS]
bool PrepareMaterial(StdMeshMatManager &mat_manager, StdMeshMaterialLoader &loader, StdMeshMaterial &mat) override
bool CheckGLError(const char *szAtOp)
bool Error(const char *szMsg) override
static const unsigned int N_GENERIC_VBOS
void PerformMultiPix(C4Surface *sfcTarget, const C4BltVertex *vertices, unsigned int n_vertices, C4ShaderCall *shader_call) override
bool DeviceReady() override
C4Shader SpriteShaderLightBaseOverlay
void FillBG(DWORD dwClr=0) override
std::set< unsigned int >::iterator NextVAOID
C4Shader SpriteShaderLightBaseMod2
void FreeVAOID(unsigned int vaoid)
bool UpdateClipper() override
bool GetVAO(unsigned int vaoid, GLuint &vao)
C4Shader SpriteShaderBase
bool RestoreDeviceObjects() override
bool OnResolutionChanged(unsigned int iXRes, unsigned int iYRes) override
C4Shader SpriteShaderLightBaseNormalOverlay
C4Shader SpriteShaderLight
CStdGLCtx * CreateContext(C4Window *pWindow, C4AbstractApp *pApp) override
C4Shader * GetSpriteShader(int ssc)
void PerformMultiTris(C4Surface *sfcTarget, const C4BltVertex *vertices, unsigned int n_vertices, const C4BltTransform *pTransform, C4TexRef *pTex, C4TexRef *pOverlay, C4TexRef *pNormal, DWORD dwOverlayClrMod, C4ShaderCall *shader_call) override
void PerformMultiLines(C4Surface *sfcTarget, const C4BltVertex *vertices, unsigned int n_vertices, float width, C4ShaderCall *shader_call) override
C4Shader SpriteShaderLightBaseOverlayMod2
static const unsigned int GENERIC_VBO_SIZE
C4Shader SpriteShaderLightBaseNormalOverlayMod2
struct CStdGL::@10 Workarounds
const char * getData() const