Comments (9)
I don't think renaming anything is the solution here. I think I build some stuff with RayLib before with gl4es (ManiaDrive use RayLib IIRC) on the Pandora and it worked fine.
from gl4es.
That's strange. There are rlColor4f, rlNormal3f and rlEnd that are in both libraries.
from gl4es.
Ah ok, I see. You can try renaming those one if you want then. Are you building a static version of gl4es?
from gl4es.
Yes. It is the static version of gl4es. What about something like rl -> gl4es
from gl4es.
there are already many gl4es_
functions,, so you might create more name colision. Try rl4es_
instead ;)
from gl4es.
Another question regard Raylib5. When I try the shaders examples (version 100). I get the following error:
Compile error: ERROR: 57:1: 'gl4es_transpose' : function already has a body
What does it means? That it is included in both vertex and fragment shader?
from gl4es.
That's a bug in the shader transformation (from opengl to gles2). I need to have a look at that (but not sure when I'll do that).
from gl4es.
Well, Raylib is your friend and it is really easy to compile and test.
However this happens when there is already a transpose function (f.e. https://github.com/raysan5/raylib/blob/master/examples/shaders/resources/shaders/glsl100/lighting.vs)
So this code:
if(strstr(Tmp, "transpose(") || strstr(Tmp, "transpose ") || strstr(Tmp, "transpose\t")) {
Tmp = gl4es_inplace_insert(gl4es_getline(Tmp, headline), gl4es_transpose, Tmp, &tmpsize);
gl4es_inplace_replace(Tmp, &tmpsize, "transpose", "gl4es_transpose");
// don't increment headline count, as all variying and attributes should be created before
}
Will insert the gl4es_transpose functions on top and rename the existent one
from gl4es.
A possible workaround could be something like this:
Change gl4es_transpose to:
static const char* gl4es_transpose2 =
"mat2 gl4es_transpose(mat2 m) {\n"
" return mat2(m[0][0], m[1][0],\n"
" m[0][1], m[1][1]);\n"
"}\n";
static const char* gl4es_transpose3 =
"mat3 gl4es_transpose(mat3 m) {\n"
" return mat3(m[0][0], m[1][0], m[2][0],\n"
" m[0][1], m[1][1], m[2][1],\n"
" m[0][2], m[1][2], m[2][2]);\n"
"}\n";
static const char* gl4es_transpose4 =
"mat4 gl4es_transpose(mat4 m) {\n"
" return mat4(m[0][0], m[1][0], m[2][0], m[3][0],\n"
" m[0][1], m[1][1], m[2][1], m[3][1],\n"
" m[0][2], m[1][2], m[2][2], m[3][2],\n"
" m[0][3], m[1][3], m[2][3], m[3][3]);\n"
"}\n";
And the replace function with:
if(strstr(Tmp, "transpose(") || strstr(Tmp, "transpose ") || strstr(Tmp, "transpose\t")) {
if (gl4es_find_string(Tmp, "mat2 transpose") == NULL)
Tmp = gl4es_inplace_insert(gl4es_getline(Tmp, headline), gl4es_transpose2, Tmp, &tmpsize);
if (gl4es_find_string(Tmp, "mat3 transpose") == NULL)
Tmp = gl4es_inplace_insert(gl4es_getline(Tmp, headline), gl4es_transpose3, Tmp, &tmpsize);
if (gl4es_find_string(Tmp, "mat4 transpose") == NULL)
Tmp = gl4es_inplace_insert(gl4es_getline(Tmp, headline), gl4es_transpose4, Tmp, &tmpsize);
gl4es_inplace_replace(Tmp, &tmpsize, "transpose", "gl4es_transpose");
// don't increment headline count, as all variying and attributes should be created before
}
However this will work only if the functions are defined like mat2 transpose(
(and so on) otherwise ith will not work.
A possible other solution could be:
Create a Tmp1 string and replace all \n, \t and spaces. Check for mat2transpose(
and do the previous replace code
from gl4es.
Related Issues (20)
- //TODO: Add GL_COPY_READ_BUFFER and GL_COPY_WRITE_BUFFER HOT 3
- Seemingly broken triangle rendering
- nanovg example_gl2 errors
- Question about skips.h and #define guards HOT 2
- X11 WSI support for android targets? HOT 4
- EGL_BAD_DISPLAY error on Mali G52 driver blob (GKD Mini Plus) HOT 9
- When will gles3.0 be supported? HOT 1
- [Question]: About the LOAD_GL* macros HOT 20
- [Question]: NEON Intrisics HOT 6
- `LIBGL_ES=1` breaks rendering of MC 1.7.10 HOT 2
- [Question] how to use gl4es using box64 and wine?
- Amigaos4 slowdown possibly with displaylists HOT 4
- Commit c8cf6cb31aa12700e7cf30261159436653de8103 causes DSI error on AmigaOS4 HOT 8
- add support for TEGRA HOT 4
- CS2
- Add support for glCopyColorTable HOT 1
- New release HOT 2
- [request] update OpenGl4Es
- GL_PIXEL_UNPACK_BUFFER bindBuffer type HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gl4es.