~pali/mesa/mesa-demos

« back to all changes in this revision

Viewing changes to src/glsl/vert-tex.c

  • Committer: Jose Fonseca
  • Date: 2020-09-16 09:03:35 UTC
  • Revision ID: git-v1:5435fc7fbd332e171da9a71e33a9b190e9462cf0
Use glad instead of GLEW.

glad is a more modern, cleaner, and flexible alternative to GLEW.  In
particular it has first-class citizen support for OpenGL ES end EGL.

Glad can't be used just for defines.  For old demos which only need
defines, we could bundle Khronos glext, but for now place the necessary
defines on gl_wrap.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
#include <stdio.h>
10
10
#include <stdlib.h>
11
11
#include <math.h>
12
 
#include <GL/glew.h>
 
12
#include <glad/glad.h>
13
13
#include "glut_wrap.h"
14
14
#include "shaderutil.h"
15
15
 
253
253
   glutInitWindowSize(500, 500);
254
254
   glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
255
255
   win = glutCreateWindow(argv[0]);
256
 
   glewInit();
 
256
   gladLoadGL();
257
257
   glutReshapeFunc(Reshape);
258
258
   glutKeyboardFunc(Key);
259
259
   glutSpecialFunc(SpecialKey);