updated makefile for supporting different target architectures

use "ARCH=arch_name make"

restructured project folder, implementations and headers together under sources/
This commit is contained in:
beno
2026-03-16 00:10:52 +01:00
parent 6c125fb35e
commit bbede61723
73 changed files with 786 additions and 379 deletions

14
NOTES/ABSURD_STUFF Normal file
View File

@@ -0,0 +1,14 @@
GL_SHADING_LANGUAGE_VERSION
is different from
GL_SHADING_LANGUAGE_VERSION
the correct form is the second, taken from a compiler error, the first is text taken from
https://www.khronos.org/opengl/wiki/OpenGL_Context
(
there is an invisible blank at the end of the first string,
it can be identified by moving the text cursor one step at the time,
it doesn't show through selection since it has width 0, but the cursor movement skips a step due to its presence )
verify by replacing in the following text:
this phrase GL_SHADING_LANGUAGE_VERSION
will change height on the screen depending on the label used
and can also make the compiler fail with an absurd "undefined reference"

View File

@@ -0,0 +1,31 @@
resource text files from WIN all had CRLF
add space the delete it and save
GLES2 vs GL4
the GLSL files all needed
#version 300 es
instead of
#version 330 core
also for the vertex shaders
/*this will affect all the float guys (float, vecN, matN )*/
precision mediump float;
gl_FragCoord is still a varible in gles2 ( 300 es ) , while with gl4 (330 core) needs to be declared
commented out from declarations ( gl compiler fails on redeclarations )
automatic casting of variables is not supported
added some .0 to integers in float expressions
also some cast through constructors ( i.e float(intVar) )
InstancesLoader
changed
string root = path.substr(0, path.find_last_of("\\") + 1);
to
string root = path.substr(0, path.find_last_of("/") + 1);
Main
disabled curve path drawing until rewrite using vertexbuffers ( currently using glBegin / glEnd which are not part of OpenglES 2 )

82
NOTES/COMPATIBILITY Normal file
View File

@@ -0,0 +1,82 @@
in molte unità si usano delle chiamate disponibili solo da GL4 / GLES3.1
# include <GL/glew.h>
diventa
# include <GLES2/gl2.h>
più l'opzionale
# include <GLES2/gl2ext.h>
anzichè riscrivere le funzioni mancanti rinominandole alla precedente versione d'estensione, si introducano delle macro da aliasing
ma si potrebbe anche usare la guardia per racchiudere delle semplici definizioni
void glDrawBuffers(GLsizei n, const GLenum *bufs){
glDrawBuffersEXT( n, bufs);
}
#define GL_GLEXT_PROTOTYPES
#include <GLES2/gl2ext.h>
#ifndef glGenVertexArrays
#define glGenVertexArrays( n, arrays_ptr) { \
glGenVertexArraysOES( n, arrays_ptr); \
}
#endif
#ifndef glBindVertexArray
#define glBindVertexArray( array_ptr) { \
glBindVertexArrayOES( array_ptr); \
}
#endif
ifndef glDrawBuffers
define glDrawBuffers ( n, buffers_ptr) { \
glDrawBuffersEXT( n, bufs); \
}
#endif
sarebbe ancora meglio wrappare tutto attorno a (o un test più sofisticato per dire GL4 o GLES3.1)
#ifndef GL_ES_VERSION_3_1
...
#endif