Branch: Tag:

2017-12-27

2017-12-27 13:28:27 by Henrik Grubbström (Grubba) <grubba@grubba.org>

GL.GLSL: Merge GL and GL_GLSL modules.

These two modules are closely related and link to the same libraries.

No Pike-level API changes.

22: Inside #if defined(HAVE_OPENGL_GL_H)
  /* OpenGL/gl.h, a MacOSX-ism, precludes GL/gl.h and GL/glx.h */   #ifdef HAVE_OPENGL_GL_H   #include <OpenGL/gl.h> + #ifdef HAVE_OPENGL_GLEXT_H + #include <OpenGL/glext.h> + #endif   #else   #ifdef HAVE_GL_GL_H   #include <GL/gl.h>
29:   #ifdef HAVE_GL_GLX_H   #include <GL/glx.h>   #endif /* HAVE_GL_GLX_H */ + #ifdef HAVE_GL_GLEXT_H + #include <GL/glext.h> + #endif   #endif /* HAVE_OPENGL_GL_H */      
391: Inside #if defined(HAVE_GL)
   "function(int:int|float|array(int)|array(float))",    OPT_SIDE_EFFECT);    GL_add_auto_funcs(); +  + #ifdef HAVE_GLSL +  { +  struct program *glsl; +  struct object *glsl_module; +  start_new_program(); +  init_pike_GLSL(); +  glsl = end_program(); +  glsl_module = clone_object(glsl, 0); +  add_object_constant("GLSL", glsl_module, 0); +  free_object(glsl_module); +  free_program(glsl); +  } + #endif /* HAVE_GLSL */   #endif /* HAVE_GL */   }         PIKE_MODULE_EXIT   { -  + #ifdef HAVE_GLSL +  exit_pike_GLSL(); + #endif /* HAVE_GLSL */   }