Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
mupen64plus-libretro-nx
Commits
fa04c66f
Commit
fa04c66f
authored
Jan 12, 2022
by
m4xw
Browse files
[GLN64] Fixes after rebase & support for c++11
Potentially amend later
parent
f82a1039
Pipeline
#79181
failed with stages
in 4 minutes and 3 seconds
Changes
13
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
GLideN64/src/Debugger.cpp
View file @
fa04c66f
#include <algorithm>
#include <Revision.h>
#include "assert.h"
#include "math.h"
#include "Platform.h"
...
...
GLideN64/src/Graphics/Context.h
View file @
fa04c66f
...
...
@@ -11,6 +11,12 @@
#define GRAPHICS_CONTEXT
// Fix for C++11 Support
template
<
typename
T
,
typename
...
Args
>
std
::
unique_ptr
<
T
>
make_unique
(
Args
&&
...
args
)
{
return
std
::
unique_ptr
<
T
>
(
new
T
(
std
::
forward
<
Args
>
(
args
)...));
}
struct
CachedTexture
;
namespace
graphics
{
...
...
GLideN64/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilderAccurate.cpp
View file @
fa04c66f
#include <Config.h>
#include <Graphics/Context.h>
#include "glsl_CombinerProgramBuilderAccurate.h"
#include "glsl_CombinerProgramUniformFactoryAccurate.h"
...
...
@@ -1194,7 +1195,7 @@ public:
namespace
glsl
{
CombinerProgramBuilderAccurate
::
CombinerProgramBuilderAccurate
(
const
opengl
::
GLInfo
&
_glinfo
,
opengl
::
CachedUseProgram
*
_useProgram
)
:
CombinerProgramBuilderCommon
(
_glinfo
,
_useProgram
,
std
::
make_unique
<
CombinerProgramUniformFactoryAccurate
>
(
_glinfo
))
:
CombinerProgramBuilderCommon
(
_glinfo
,
_useProgram
,
::
make_unique
<
CombinerProgramUniformFactoryAccurate
>
(
_glinfo
))
,
m_vertexTexturedTriangle
(
new
VertexShaderTexturedTriangle
(
_glinfo
))
,
m_vertexTexturedRect
(
new
VertexShaderTexturedRect
(
_glinfo
))
,
m_fragmentCorrectTexCoords
(
new
ShaderFragmentCorrectTexCoords
())
...
...
GLideN64/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilderFast.cpp
View file @
fa04c66f
#include <Config.h>
#include <Graphics/Context.h>
#include "glsl_CombinerProgramBuilderFast.h"
#include "glsl_CombinerProgramUniformFactoryFast.h"
...
...
@@ -1140,7 +1141,7 @@ public:
namespace
glsl
{
CombinerProgramBuilderFast
::
CombinerProgramBuilderFast
(
const
opengl
::
GLInfo
&
_glinfo
,
opengl
::
CachedUseProgram
*
_useProgram
)
:
CombinerProgramBuilderCommon
(
_glinfo
,
_useProgram
,
std
::
make_unique
<
CombinerProgramUniformFactoryFast
>
(
_glinfo
))
:
CombinerProgramBuilderCommon
(
_glinfo
,
_useProgram
,
::
make_unique
<
CombinerProgramUniformFactoryFast
>
(
_glinfo
))
,
m_vertexTexturedTriangle
(
new
VertexShaderTexturedTriangleFast
(
_glinfo
))
,
m_vertexTexturedRect
(
new
VertexShaderTexturedRectFast
(
_glinfo
))
,
m_fragmentGlobalVariablesTex
(
new
ShaderFragmentGlobalVariablesTexFast
(
_glinfo
))
...
...
GLideN64/src/Graphics/OpenGLContext/GLSL/glsl_ShaderStorage.cpp
View file @
fa04c66f
...
...
@@ -342,9 +342,9 @@ bool ShaderStorage::loadShadersStorage(graphics::Combiners & _combiners)
std
::
unique_ptr
<
CombinerProgramUniformFactory
>
uniformFactory
;
if
(
config
.
generalEmulation
.
enableInaccurateTextureCoordinates
)
{
uniformFactory
=
std
::
make_unique
<
CombinerProgramUniformFactoryFast
>
(
m_glinfo
);
uniformFactory
=
::
make_unique
<
CombinerProgramUniformFactoryFast
>
(
m_glinfo
);
}
else
{
uniformFactory
=
std
::
make_unique
<
CombinerProgramUniformFactoryAccurate
>
(
m_glinfo
);
uniformFactory
=
::
make_unique
<
CombinerProgramUniformFactoryAccurate
>
(
m_glinfo
);
}
fin
.
read
((
char
*
)
&
len
,
sizeof
(
len
));
...
...
GLideN64/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp
View file @
fa04c66f
...
...
@@ -418,9 +418,9 @@ void ContextImpl::resetCombinerProgramBuilder()
return
;
if
(
config
.
generalEmulation
.
enableInaccurateTextureCoordinates
)
{
m_combinerProgramBuilder
=
std
::
make_unique
<
glsl
::
CombinerProgramBuilderFast
>
(
m_glInfo
,
m_cachedFunctions
->
getCachedUseProgram
());
m_combinerProgramBuilder
=
::
make_unique
<
glsl
::
CombinerProgramBuilderFast
>
(
m_glInfo
,
m_cachedFunctions
->
getCachedUseProgram
());
}
else
{
m_combinerProgramBuilder
=
std
::
make_unique
<
glsl
::
CombinerProgramBuilderAccurate
>
(
m_glInfo
,
m_cachedFunctions
->
getCachedUseProgram
());
m_combinerProgramBuilder
=
::
make_unique
<
glsl
::
CombinerProgramBuilderAccurate
>
(
m_glInfo
,
m_cachedFunctions
->
getCachedUseProgram
());
}
m_specialShadersFactory
.
reset
(
new
glsl
::
SpecialShadersFactory
(
m_glInfo
,
...
...
Makefile.common
View file @
fa04c66f
...
...
@@ -329,6 +329,12 @@ SOURCES_CXX += \
$(VIDEODIR_GLIDEN64)
/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilder.cpp
\
$(VIDEODIR_GLIDEN64)
/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramImpl.cpp
\
$(VIDEODIR_GLIDEN64)
/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactory.cpp
\
$(VIDEODIR_GLIDEN64)
/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactoryAccurate.cpp
\
$(VIDEODIR_GLIDEN64)
/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactoryFast.cpp
\
$(VIDEODIR_GLIDEN64)
/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactoryCommon.cpp
\
$(VIDEODIR_GLIDEN64)
/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilderCommon.cpp
\
$(VIDEODIR_GLIDEN64)
/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilderAccurate.cpp
\
$(VIDEODIR_GLIDEN64)
/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilderFast.cpp
\
$(VIDEODIR_GLIDEN64)
/src/Graphics/OpenGLContext/GLSL/glsl_FXAA.cpp
\
$(VIDEODIR_GLIDEN64)
/src/Graphics/OpenGLContext/GLSL/glsl_ShaderStorage.cpp
\
$(VIDEODIR_GLIDEN64)
/src/Graphics/OpenGLContext/GLSL/glsl_SpecialShadersFactory.cpp
\
...
...
@@ -382,6 +388,8 @@ SOURCES_CXX += \
$(VIDEODIR_GLIDEN64)
/src/GLideNHQ/TxFilter.cpp
\
$(VIDEODIR_GLIDEN64)
/src/GLideNHQ/TxFilterExport.cpp
\
$(VIDEODIR_GLIDEN64)
/src/GLideNHQ/TxHiResCache.cpp
\
$(VIDEODIR_GLIDEN64)
/src/GLideNHQ/TxHiResNoCache.cpp
\
$(VIDEODIR_GLIDEN64)
/src/GLideNHQ/TxHiResLoader.cpp
\
$(VIDEODIR_GLIDEN64)
/src/GLideNHQ/TxImage.cpp
\
$(VIDEODIR_GLIDEN64)
/src/GLideNHQ/TxQuantize.cpp
\
$(VIDEODIR_GLIDEN64)
/src/GLideNHQ/TxReSample.cpp
\
...
...
custom/GLideN64/GLideN64.custom.ini.h
View file @
fa04c66f
...
...
@@ -319,3 +319,4 @@ char customini[] =
"frameBufferEmulation
\\
bufferSwapMode=1
\n
"
;
#endif
custom/GLideN64/mupenplus/Config_mupenplus.cpp
View file @
fa04c66f
...
...
@@ -149,6 +149,7 @@ extern "C" void Config_LoadConfig()
config
.
texture
.
bilinearMode
=
bilinearMode
;
config
.
generalEmulation
.
enableHybridFilter
=
EnableHybridFilter
;
config
.
generalEmulation
.
enableInaccurateTextureCoordinates
=
EnableInaccurateTextureCoordinates
;
config
.
generalEmulation
.
enableDitheringPattern
=
EnableDitheringPattern
;
config
.
generalEmulation
.
enableDitheringQuantization
=
EnableDitheringQuantization
;
config
.
generalEmulation
.
rdramImageDitheringMode
=
RDRAMImageDitheringMode
;
...
...
custom/mupen64plus-core/main/mupen64plus.ini.h
View file @
fa04c66f
...
...
@@ -18064,3 +18064,4 @@ char inifile[] =
"
\n
"
;
#endif
custom/mupen64plus-next_common.h
View file @
fa04c66f
...
...
@@ -94,6 +94,7 @@ extern uint32_t RDRAMImageDitheringMode;
extern
uint32_t
EnableHWLighting
;
extern
uint32_t
CorrectTexrectCoords
;
extern
uint32_t
EnableTexCoordBounds
;
extern
uint32_t
EnableInaccurateTextureCoordinates
;
extern
uint32_t
enableNativeResTexrects
;
extern
uint32_t
enableLegacyBlending
;
extern
uint32_t
EnableCopyColorToRDRAM
;
...
...
libretro/libretro.c
View file @
fa04c66f
...
...
@@ -166,6 +166,7 @@ uint32_t EnableDitheringQuantization = 0;
uint32_t
EnableHWLighting
=
0
;
uint32_t
CorrectTexrectCoords
=
0
;
uint32_t
EnableTexCoordBounds
=
0
;
uint32_t
EnableInaccurateTextureCoordinates
=
0
;
uint32_t
enableNativeResTexrects
=
0
;
uint32_t
enableLegacyBlending
=
0
;
uint32_t
EnableCopyColorToRDRAM
=
0
;
...
...
@@ -1030,6 +1031,13 @@ static void update_variables(bool startup)
EnableTexCoordBounds
=
!
strcmp
(
var
.
value
,
"False"
)
?
0
:
1
;
}
var
.
key
=
CORE_NAME
"-EnableInaccurateTextureCoordinates"
;
var
.
value
=
NULL
;
if
(
environ_cb
(
RETRO_ENVIRONMENT_GET_VARIABLE
,
&
var
)
&&
var
.
value
)
{
EnableInaccurateTextureCoordinates
=
!
strcmp
(
var
.
value
,
"False"
)
?
0
:
1
;
}
var
.
key
=
CORE_NAME
"-BackgroundMode"
;
var
.
value
=
NULL
;
if
(
environ_cb
(
RETRO_ENVIRONMENT_GET_VARIABLE
,
&
var
)
&&
var
.
value
)
...
...
libretro/libretro_core_options.h
View file @
fa04c66f
...
...
@@ -398,6 +398,20 @@ struct retro_core_option_v2_definition option_defs_us[] = {
},
"Off"
},
{
CORE_NAME
"-EnableInaccurateTextureCoordinates"
,
"Enable inaccurate texture coordinates"
,
NULL
,
"(GLN64) Enables inaccurate texture coordinate calculations. This can improve performance and texture pack compatibity at the cost of accuracy."
,
"Enables inaccurate texture coordinate calculations. This can improve performance and texture pack compatibity at the cost of accuracy."
,
"gliden64"
,
{
{
"False"
,
NULL
},
{
"True"
,
NULL
},
{
NULL
,
NULL
},
},
"False"
},
{
CORE_NAME
"-EnableTexCoordBounds"
,
"Enable native-res boundaries for texture coordinates"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment