Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
23 user(s) are online (15 user(s) are browsing Forums)

Members: 0
Guests: 23

more...
Support us!
Recent OS4 Files
OS4Depot.net
Report message:*
 

Re: SDL2

Subject: Re: SDL2
by Capehill on 2019/3/24 10:05:40

@Raziel

This seems to work:

Quote:

diff --git a/backends/graphics/opengl/shader.cpp b/backends/graphics/opengl/shader.cpp
index 0b4c677..7e19fc8 100644
--- a/backends/graphics/opengl/shader.cpp
+++ b/backends/graphics/opengl/shader.cpp
@@ -80,6 +80,7 @@ const char *const g_lookUpFragmentShader =

// Taken from: https://en.wikibooks.org/wiki/OpenGL_P ... 3#OpenGL_ES_2_portability
const char *const g_precisionDefines =
+ "#version 110\n"
"#ifdef GL_ES\n"
"\t#if defined(GL_FRAGMENT_PRECISION_HIGH) && GL_FRAGMENT_PRECISION_HIGH == 1\n"
"\t\tprecision highp float;\n"


#version directive sets the shader version. My OpenGL ES 2.0 programmin guide tells to use "100" (1.00). 110 seems to work. Daniel suggested to use value < 130.

If there are some newer stuff in shader code, then you should get a compilation error.

You can use #ifdef __amigaos4__ to wrap the string if you want.

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project