~pali/mesa/mesa-demos

« back to all changes in this revision

Viewing changes to src/tests/mipmap_view.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:
10
10
#include <stdlib.h>
11
11
#include <stdio.h>
12
12
#include <math.h>
13
 
#include <GL/glew.h>
 
13
#include <glad/glad.h>
14
14
#include "glut_wrap.h"
15
15
 
16
16
#include "readtex.h"
424
424
   glutInitWindowSize(WinWidth, WinHeight);
425
425
   glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
426
426
   Win = glutCreateWindow(argv[0]);
427
 
   glewInit();
 
427
   gladLoadGL();
428
428
   glutReshapeFunc(Reshape);
429
429
   glutKeyboardFunc(Key);
430
430
   glutDisplayFunc(Display);