Revert accidentally committed changes. (nw)

This commit is contained in:
couriersud 2020-01-25 16:47:47 +01:00
parent ea1897f605
commit 6251391508
2 changed files with 5 additions and 33 deletions

View File

@ -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
}

View File

@ -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;