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
flycast
Commits
bfbbf137
Commit
bfbbf137
authored
Feb 11, 2016
by
Libretro-Admin
Browse files
Update
parent
b0b43042
Changes
5
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
bfbbf137
...
...
@@ -519,13 +519,13 @@ endif
ifeq
($(HAVE_GL), 1)
ifeq
($(HAVE_GLES),1)
RZDCY_CFLAGS
+=
-DGLES
-DHAVE_OPENGLES2
CXXFLAGS
+=
-DGLES
-DHAVE_OPENGLES2
CFLAGS
+=
-DGLES
-DHAVE_OPENGLES2
RZDCY_CFLAGS
+=
-D
HAVE_OPEN
GLES
-DHAVE_OPENGLES2
CXXFLAGS
+=
-D
HAVE_OPEN
GLES
-DHAVE_OPENGLES2
CFLAGS
+=
-D
HAVE_OPEN
GLES
-DHAVE_OPENGLES2
else
RZDCY_CFLAGS
+=
-DGL
CXXFLAGS
+=
-DGL
CFLAGS
+=
-DGL
RZDCY_CFLAGS
+=
-D
HAVE_OPEN
GL
CXXFLAGS
+=
-D
HAVE_OPEN
GL
CFLAGS
+=
-D
HAVE_OPEN
GL
endif
endif
...
...
core/libretro-common/glsm/glsm.c
View file @
bfbbf137
...
...
@@ -170,7 +170,7 @@ static struct gl_cached_state gl_state;
void
rglClearDepth
(
GLdouble
depth
)
{
glsm_ctl
(
GLSM_CTL_IMM_VBO_DRAW
,
NULL
);
#ifdef GLES
#ifdef
HAVE_OPEN
GLES
glClearDepthf
(
depth
);
#else
glClearDepth
(
depth
);
...
...
@@ -181,7 +181,7 @@ void rglClearDepth(GLdouble depth)
void
rglDepthRange
(
GLclampd
zNear
,
GLclampd
zFar
)
{
#ifdef GLES
#ifdef
HAVE_OPEN
GLES
glDepthRangef
(
zNear
,
zFar
);
#else
glDepthRange
(
zNear
,
zFar
);
...
...
@@ -459,7 +459,9 @@ GLenum rglCheckFramebufferStatus(GLenum target)
void
rglBindFragDataLocation
(
GLuint
program
,
GLuint
colorNumber
,
const
char
*
name
)
{
#if !defined(HAVE_OPENGLES2)
glBindFragDataLocation
(
program
,
colorNumber
,
name
);
#endif
}
void
rglBindAttribLocation
(
GLuint
program
,
GLuint
index
,
const
GLchar
*
name
)
...
...
@@ -864,12 +866,12 @@ static bool glsm_state_ctx_init(void *data)
if
(
!
params
||
!
params
->
environ_cb
)
return
false
;
#ifdef GLES
#if defined(GLES31)
#ifdef
HAVE_OPEN
GLES
#if defined(
HAVE_OPEN
GLES31)
hw_render
.
context_type
=
RETRO_HW_CONTEXT_OPENGLES_VERSION
;
hw_render
.
version_major
=
3
;
hw_render
.
version_minor
=
1
;
#elif defined(GLES3)
#elif defined(
HAVE_OPEN
GLES3)
hw_render
.
context_type
=
RETRO_HW_CONTEXT_OPENGLES3
;
#else
hw_render
.
context_type
=
RETRO_HW_CONTEXT_OPENGLES2
;
...
...
core/libretro/libretro.cpp
View file @
bfbbf137
...
...
@@ -6,10 +6,10 @@
#include "../hw/pvr/pvr_regs.h"
#if defined(GL) || defined(GLES)
#if defined(
HAVE_OPEN
GL) || defined(
HAVE_OPEN
GLES)
#include <glsm/glsm.h>
#include "../rend/rend.h"
#endif
#include "../rend/rend.h"
#include "libretro.h"
...
...
@@ -382,7 +382,7 @@ void retro_run (void)
update_variables
();
co_dc_run
();
#if defined(GL) || defined(GLES)
#if defined(
HAVE_OPEN
GL) || defined(
HAVE_OPEN
GLES)
video_cb
(
is_dupe
?
0
:
RETRO_HW_FRAME_BUFFER_VALID
,
screen_width
,
screen_height
,
0
);
#endif
is_dupe
=
true
;
...
...
@@ -393,7 +393,7 @@ void retro_reset (void)
//TODO
}
#if defined(GL) || defined(GLES)
#if defined(
HAVE_OPEN
GL) || defined(
HAVE_OPEN
GLES)
static
void
context_reset
(
void
)
{
printf
(
"context_reset.
\n
"
);
...
...
@@ -525,7 +525,7 @@ bool retro_load_game(const struct retro_game_info *game)
if
(
!
boot_to_bios
)
game_data
=
strdup
(
game
->
path
);
#if defined(GL) || defined(GLES)
#if defined(
HAVE_OPEN
GL) || defined(
HAVE_OPEN
GLES)
params
.
context_reset
=
context_reset
;
params
.
context_destroy
=
context_destroy
;
params
.
environ_cb
=
environ_cb
;
...
...
core/rend/gles/gles.cpp
View file @
bfbbf137
...
...
@@ -181,7 +181,7 @@ float fb_scale_x,fb_scale_y;
#define FRAGCOL "gl_FragColor"
#define TEXLOOKUP "texture2D"
#ifdef GLES
#ifdef
HAVE_OPEN
GLES
#define HIGHP "highp"
#define MEDIUMP "mediump"
#define LOWP "lowp"
...
...
@@ -194,7 +194,7 @@ float fb_scale_x,fb_scale_y;
//Fragment and vertex shaders code
//pretty much 1:1 copy of the d3d ones for now
const
char
*
VertexShaderSource
=
#ifndef GLES
#ifndef
HAVE_OPEN
GLES
"#version 120
\n
"
#endif
"\
...
...
@@ -228,7 +228,7 @@ void main() \n\
}"
;
const
char
*
PixelPipelineShader
=
#ifndef GLES
#ifndef
HAVE_OPEN
GLES
"#version 120
\n
"
#endif
"\
...
...
@@ -445,7 +445,7 @@ static GLuint gl_CompileAndLink(const char* VertexShader, const char* FragmentSh
glBindAttribLocation
(
program
,
VERTEX_COL_OFFS_ARRAY
,
"in_offs"
);
glBindAttribLocation
(
program
,
VERTEX_UV_ARRAY
,
"in_uv"
);
#ifndef GLES
#ifndef
HAVE_OPEN
GLES
glBindFragDataLocation
(
program
,
0
,
"FragColor"
);
#endif
...
...
@@ -1892,11 +1892,7 @@ static bool RenderFrame(void)
}
glClearColor
(
0
,
0
,
0
,
1.0
f
);
#ifdef GLES
glClearDepthf
(
0.
f
);
#else
glClearDepth
(
0.
f
);
#endif
glClearDepth
(
0.
f
);
glViewport
(
0
,
0
,
gles_screen_width
,
gles_screen_height
);
glClear
(
GL_COLOR_BUFFER_BIT
|
GL_STENCIL_BUFFER_BIT
|
GL_DEPTH_BUFFER_BIT
);
...
...
core/rend/gles/gltex.cpp
View file @
bfbbf137
...
...
@@ -178,7 +178,7 @@ struct TextureCacheData
SetRepeatMode
(
GL_TEXTURE_WRAP_S
,
tsp
.
ClampU
,
tsp
.
FlipU
);
SetRepeatMode
(
GL_TEXTURE_WRAP_T
,
tsp
.
ClampV
,
tsp
.
FlipV
);
#ifdef GLES
#ifdef
HAVE_OPEN
GLES
glHint
(
GL_GENERATE_MIPMAP_HINT
,
GL_NICEST
);
#endif
...
...
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