From 6251391508e1bf6186b47694622c33c3000254f0 Mon Sep 17 00:00:00 2001 From: couriersud Date: Sat, 25 Jan 2020 16:47:47 +0100 Subject: Revert accidentally committed changes. (nw) --- src/emu/rendutil.h | 16 ---------------- src/osd/modules/render/drawogl.cpp | 22 +++++----------------- 2 files changed, 5 insertions(+), 33 deletions(-) diff --git a/src/emu/rendutil.h b/src/emu/rendutil.h index 8999d57c66a..b5c06d6d0fc 100644 --- a/src/emu/rendutil.h +++ b/src/emu/rendutil.h @@ -185,7 +185,6 @@ static inline int orientation_add(int orientation1, int orientation2) static inline float apply_brightness_contrast_gamma_fp(float srcval, float brightness, float contrast, float gamma) { -#if 0 /* first apply gamma */ srcval = pow(srcval, 1.0f / gamma); @@ -198,21 +197,6 @@ static inline float apply_brightness_contrast_gamma_fp(float srcval, float brigh if (srcval > 1.0f) srcval = 1.0f; return srcval; -#else - /* contrast/brightness */ - srcval = (srcval * contrast) + brightness - 1.0f; - - /* clamp and return */ - if (srcval < 0.0f) - srcval = 0.0f; - if (srcval > 1.0f) - srcval = 1.0f; - - /* apply gamma */ - srcval = std::pow(srcval, gamma); - - return srcval; -#endif } diff --git a/src/osd/modules/render/drawogl.cpp b/src/osd/modules/render/drawogl.cpp index b6b9a25c5ab..6ee43cd57b7 100644 --- a/src/osd/modules/render/drawogl.cpp +++ b/src/osd/modules/render/drawogl.cpp @@ -20,7 +20,6 @@ #include "osdcomm.h" #include "emu.h" #include "emuopts.h" -#include "rendutil.h" #ifdef OSD_MAC #define GL_SILENCE_DEPRECATION (1) @@ -136,7 +135,7 @@ typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuin //============================================================ #define DEBUG_MODE_SCORES 0 -#define USE_WIN32_STYLE_LINES 1 // use the same method baseline does - yields somewhat nicer vectors but a little buggy +#define USE_WIN32_STYLE_LINES 0 // use the same method baseline does - yields somewhat nicer vectors but a little buggy //============================================================ // CONSTANTS @@ -151,8 +150,7 @@ enum TEXTURE_TYPE_SURFACE }; -//#undef GL_TEXTURE_2D -//#define GL_TEXTURE_2D GL_TEXTURE_2D_MULTISAMPLE + //============================================================ // MACROS //============================================================ @@ -187,7 +185,7 @@ struct line_aa_step float weight; // weight contribution }; -#if 1 +#if 0 static const line_aa_step line_aa_1step[] = { { 0.00f, 0.00f, 1.00f }, @@ -1125,21 +1123,11 @@ int renderer_ogl::draw(const int update) GLsizei iScale = 1; -#if 1 - //glEnable(GL_FRAMEBUFFER_SRGB); - glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); - glEnable(GL_LINE_SMOOTH); - //glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST); - //glEnable(GL_POLYGON_SMOOTH); - glEnable(GL_MULTISAMPLE_ARB); - glEnable(GL_MULTISAMPLE); -#endif /* Mac hack: macOS version 10.15 and later flipped from assuming you don't support Retina to assuming you do support Retina. SDL 2.0.11 is scheduled to fix this, but it's not out yet. So we double-scale everything if you're on 10.15 or later and SDL is not at least version 2.0.11. */ - #if defined(SDLMAME_MACOSX) || defined(OSD_MAC) SDL_version sdlVers; SDL_GetVersion(&sdlVers); @@ -1275,10 +1263,10 @@ int renderer_ogl::draw(const int update) pendingPrimitive=GL_NO_PRIMITIVE; } - //set_blendmode(sdl, PRIMFLAG_GET_BLENDMODE(prim.flags)); + set_blendmode(sdl, PRIMFLAG_GET_BLENDMODE(prim.flags)); // compute the effective width based on the direction of the line - effwidth = prim.width; + effwidth = prim.width(); if (effwidth < 0.5f) effwidth = 0.5f; -- cgit v1.2.3