~pali/mesa/mesa-demos

« back to all changes in this revision

Viewing changes to src/tests/arbvptorus.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:
7
7
#include <stdio.h>
8
8
#include <stdlib.h>
9
9
#include <math.h>
10
 
#include <GL/glew.h>
 
10
#include <glad/glad.h>
11
11
#include "glut_wrap.h"
12
12
 
13
13
static float Xrot = 0.0, Yrot = 0.0, Zrot = 0.0;
174
174
   glutInitWindowSize( 250, 250 );
175
175
   glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
176
176
   glutCreateWindow(argv[0]);
177
 
   glewInit();
 
177
   gladLoadGL();
178
178
   glutReshapeFunc( Reshape );
179
179
   glutKeyboardFunc( Key );
180
180
   glutSpecialFunc( SpecialKey );