File tree 7 files changed +51
-36
lines changed
7 files changed +51
-36
lines changed Original file line number Diff line number Diff line change 1
1
// Blit8.frag
2
- #version 330 core
2
+ #version 300 es
3
3
4
- in vec2 textureUV;
4
+ precision highp float ;
5
+ precision highp sampler2D ;
5
6
6
- out vec4 FragColor ;
7
+ in highp vec2 textureUV ;
7
8
8
- uniform sampler2D rteTexture;
9
- uniform sampler2D rtePalette;
9
+ out highp vec4 FragColor;
10
+
11
+ uniform highp sampler2D rteTexture;
12
+ uniform highp sampler2D rtePalette;
10
13
11
14
void main() {
12
15
float colorIndex = texture(rteTexture, vec2 (textureUV.x, - textureUV.y)).r;
Original file line number Diff line number Diff line change 1
- #version 330 core
1
+ #version 300 es
2
2
3
- layout (location = 0 ) in vec2 rteVertexPosition;
4
- layout (location = 1 ) in vec2 rteTexUV;
3
+ precision highp float ;
5
4
6
- out vec2 textureUV;
5
+ layout (location = 0 ) in highp vec2 rteVertexPosition;
6
+ layout (location = 1 ) in highp vec2 rteTexUV;
7
7
8
- uniform mat4 rteTransform;
9
- uniform mat4 rteProjection;
10
- uniform mat4 rteUVTransform;
8
+ out highp vec2 textureUV;
9
+
10
+ uniform highp mat4 rteTransform;
11
+ uniform highp mat4 rteProjection;
12
+ uniform highp mat4 rteUVTransform;
11
13
12
14
void main() {
13
15
gl_Position = rteProjection * rteTransform * vec4 (rteVertexPosition, 0.0 , 1.0 );
Original file line number Diff line number Diff line change 1
- #version 330 core
1
+ #version 300 es
2
2
3
- in vec2 textureUV;
3
+ precision highp float ;
4
+ precision highp sampler2D ;
4
5
5
- out vec4 FragColor ;
6
+ in highp vec2 textureUV ;
6
7
7
- uniform sampler2D rteTexture;
8
- uniform vec4 rteColor;
8
+ out highp vec4 FragColor;
9
+
10
+ uniform highp sampler2D rteTexture;
11
+ uniform highp vec4 rteColor;
9
12
10
13
void main() {
11
14
FragColor = texture(rteTexture, textureUV) * rteColor;
Original file line number Diff line number Diff line change 1
- #version 330 core
1
+ #version 300 es
2
2
3
- layout (location = 0 ) in vec2 rteVertexPosition;
4
- layout (location = 1 ) in vec2 rteTexUV;
3
+ precision highp float ;
5
4
6
- out vec2 textureUV;
5
+ layout (location = 0 ) in highp vec2 rteVertexPosition;
6
+ layout (location = 1 ) in highp vec2 rteTexUV;
7
7
8
- uniform mat4 rteTransform;
9
- uniform mat4 rteProjection;
8
+ out highp vec2 textureUV;
9
+
10
+ uniform highp mat4 rteTransform;
11
+ uniform highp mat4 rteProjection;
10
12
11
13
void main() {
12
14
gl_Position = rteProjection * rteTransform * vec4 (rteVertexPosition, 0.0 , 1.0 );
Original file line number Diff line number Diff line change 1
- #version 330 core
1
+ #version 300 es
2
2
3
- in vec2 textureUV;
3
+ precision highp float ;
4
+ precision highp sampler2D ;
4
5
5
- out vec4 FragColor ;
6
+ in highp vec2 textureUV ;
6
7
7
- uniform sampler2D rteTexture;
8
- uniform sampler2D rteGUITexture;
8
+ out highp vec4 FragColor;
9
+
10
+ uniform highp sampler2D rteTexture;
11
+ uniform highp sampler2D rteGUITexture;
9
12
10
13
vec4 texture2DAA(sampler2D tex, vec2 uv) {
11
14
vec2 texsize = vec2 (textureSize(tex, 0 ));
Original file line number Diff line number Diff line change 1
- #version 330 core
1
+ #version 300 es
2
2
3
- layout (location = 0 ) in vec2 rteVertexPosition;
4
- layout (location = 1 ) in vec2 rteTexUV;
3
+ precision highp float ;
5
4
6
- out vec2 textureUV;
5
+ layout (location = 0 ) in highp vec2 rteVertexPosition;
6
+ layout (location = 1 ) in highp vec2 rteTexUV;
7
7
8
- uniform mat4 rteTransform;
9
- uniform mat4 rteProjection;
8
+ out highp vec2 textureUV;
9
+
10
+ uniform highp mat4 rteTransform;
11
+ uniform highp mat4 rteProjection;
10
12
11
13
void main() {
12
14
gl_Position = rteProjection * rteTransform * vec4 (rteVertexPosition.xy, 0.0 , 1.0 );
Original file line number Diff line number Diff line change @@ -99,8 +99,8 @@ void WindowMan::Initialize() {
99
99
100
100
SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1 );
101
101
SDL_GL_SetAttribute (SDL_GL_CONTEXT_MAJOR_VERSION, 3 );
102
- SDL_GL_SetAttribute (SDL_GL_CONTEXT_MINOR_VERSION, 3 );
103
- SDL_GL_SetAttribute (SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE );
102
+ SDL_GL_SetAttribute (SDL_GL_CONTEXT_MINOR_VERSION, 0 );
103
+ SDL_GL_SetAttribute (SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES );
104
104
CreatePrimaryWindow ();
105
105
InitializeOpenGL ();
106
106
CreateBackBufferTexture ();
You can’t perform that action at this time.
0 commit comments