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

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