ported the University CGI demo from WINDOWS + GLUT + GLEW + GLU + OpenGL 4 to LINUX WAYLAND + EGL + GLES 2 with minimal cuts

This commit is contained in:
beno
2025-07-03 01:26:25 +02:00
commit 6c125fb35e
85 changed files with 91688 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
#pragma once
#include <GLES2/gl2.h>
/* fails at link time,
resorting to eglGetProcAddress
#define GL_GLEXT_PROTOTYPES 1
*/
#include <GLES2/gl2ext.h>
/* aarch64-linux-gnu/include/math.h already defines it */
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327950288
#endif
/* GLES2 provides it as an extension */
#ifndef GL_DEPTH24_STENCIL8
#define GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_OES
#endif
#ifndef GL_DEPTH_STENCIL_ATTACHMENT
#define GL_DEPTH_STENCIL_ATTACHMENT GL_DEPTH_STENCIL_OES
#endif
#ifndef GL_DRAW_FRAMEBUFFER
#define GL_DRAW_FRAMEBUFFER GL_DRAW_BUFFER0_EXT
#endif
void glGenVertexArrays( GLuint n, GLuint *arrays_ptr);
void glBindVertexArray( GLuint array_ptr);
void glDrawBuffers( GLsizei n,GLenum *buffers_ptr);
void GLES_3_1_compatibility_init();