From 811e1de45e7dd9bfba02707c23c4a828df4a353b Mon Sep 17 00:00:00 2001 From: rogerman Date: Thu, 18 Jul 2024 12:46:11 -0700 Subject: [PATCH] OpenGL Renderer: Oops! Roll back some internal test code that accidentally slipped into commit 0c7cb99. --- desmume/src/OGLRender.cpp | 5 ---- desmume/src/OGLRender.h | 58 ++------------------------------------- 2 files changed, 2 insertions(+), 61 deletions(-) diff --git a/desmume/src/OGLRender.cpp b/desmume/src/OGLRender.cpp index 3a1a4e459..f1409f00b 100644 --- a/desmume/src/OGLRender.cpp +++ b/desmume/src/OGLRender.cpp @@ -4834,11 +4834,6 @@ Render3DError OpenGLRenderer_1_2::EndRender() texCache.Evict(); this->ReadBackPixels(); - GLenum oglerror = glGetError(); - if (oglerror != GL_NO_ERROR) - { - INFO("OpenGL: error = %i\n", (int)oglerror); - } ENDGL(); diff --git a/desmume/src/OGLRender.h b/desmume/src/OGLRender.h index b327a06b3..ca3283fdd 100644 --- a/desmume/src/OGLRender.h +++ b/desmume/src/OGLRender.h @@ -28,7 +28,7 @@ #include "types.h" // OPENGL PLATFORM-SPECIFIC INCLUDES -#if defined(__ANGLE__) || defined(__ANDROID__) || defined(__linux__) +#if defined(__ANGLE__) || defined(__ANDROID__) #define OPENGL_VARIANT_ES #define _NO_SDL_TYPES #include @@ -332,11 +332,8 @@ EXTERNOGLEXT(PFNGLDELETERENDERBUFFERSEXTPROC, glDeleteRenderbuffersEXT) // modification. In other words, these are one-to-one drop-in replacements. typedef GLclampf GLclampd; #define glClearDepth(depth) glClearDepthf(depth) - -#ifndef OPENGL_VARIANT_ES #define glDrawBuffer(x) glDrawBuffers(1, ((GLenum[]){x})) -#endif - + // 1D textures may not exist for a particular OpenGL variant, so they will be promoted to // 2D textures instead. Implementations need to modify their GLSL shaders accordingly to // treat any 1D textures as 2D textures instead. @@ -631,16 +628,8 @@ struct OGLRenderRef GLuint fboClearImageID; GLuint fboRenderID; - GLuint fboRenderColor0ID[8]; - GLuint fboRenderWorking0ID[8]; - GLuint fboPolyID; - GLuint fboFogAttrID; GLuint fboFramebufferFlipID; - GLuint fboColorOutMainID; - GLuint fboColorOutWorkingID; GLuint fboMSIntermediateRenderID; - GLuint fboMSIntermediateRenderColor0ID[8]; - GLuint fboMSFogAttrID; GLuint selectedRenderingFBO; // Shader states @@ -1041,47 +1030,4 @@ class OpenGLRenderer_2_1 : public OpenGLRenderer_2_0 virtual Render3DError RenderFlush(bool willFlushBuffer32, bool willFlushBuffer16); }; -#ifdef OPENGL_VARIANT_ES - -#define glDrawBuffer my_glDrawBuffer -/* -static inline void my_glDrawBuffer(GLenum attach) { - switch(attach) { - case GL_NONE: { - GLenum bufs[1] = {GL_NONE }; - glDrawBuffers(1, bufs); - break; - } - case GL_COLOR_ATTACHMENT0: { - GLenum bufs[1] = { attach }; - glDrawBuffers(1, bufs); - break; - } - case GL_COLOR_ATTACHMENT1: { - GLenum bufs[2] = {GL_NONE, attach }; - glDrawBuffers(2, bufs); - break; - } - case GL_COLOR_ATTACHMENT2: { - GLenum bufs[3] = {GL_NONE, GL_NONE, attach }; - glDrawBuffers(3, bufs); - break; - } - case GL_COLOR_ATTACHMENT3: { - GLenum bufs[4] = {GL_NONE, GL_NONE, GL_NONE, attach }; - glDrawBuffers(4, bufs); - break; - } - } -} -*/ - -static inline void my_glDrawBuffer(GLenum attach) -{ - GLenum bufs[] = {attach}; - glDrawBuffers(1, bufs); -} - -#endif - #endif // OGLRENDER_H