# HG changeset patch # User John W. Eaton # Date 1454622962 18000 # Node ID bd96c2efd4feca486afa09c4ebc9b9c0bb7d8e17 # Parent 53ac24e210e47c3d45a752cd2ce8737d86ce7214 move include statements for OpenGL headers to a single file * oct-opengl.h: New file. * libinterp/corefcn/module.mk: Update. * Canvas.cc, gl-select.cc, gl-select.h, gl-render.cc, gl-render.h, gl2ps-renderer.cc, __init_fltk__.cc, __osmesa_print__.cc: Update include statements. diff -r 53ac24e210e4 -r bd96c2efd4fe libgui/graphics/Canvas.cc --- a/libgui/graphics/Canvas.cc Thu Feb 04 16:02:44 2016 -0500 +++ b/libgui/graphics/Canvas.cc Thu Feb 04 16:56:02 2016 -0500 @@ -42,6 +42,7 @@ #include "annotation-dialog.h" #include "gl2ps-renderer.h" +#include "oct-opengl.h" #include "octave-qt-link.h" #include "builtin-defun-decls.h" diff -r 53ac24e210e4 -r bd96c2efd4fe libgui/graphics/gl-select.cc --- a/libgui/graphics/gl-select.cc Thu Feb 04 16:02:44 2016 -0500 +++ b/libgui/graphics/gl-select.cc Thu Feb 04 16:56:02 2016 -0500 @@ -24,9 +24,9 @@ #include #endif -#include "gl-select.h" +#include -#include +#include "gl-select.h" void opengl_selector::apply_pick_matrix (void) diff -r 53ac24e210e4 -r bd96c2efd4fe libgui/graphics/gl-select.h --- a/libgui/graphics/gl-select.h Thu Feb 04 16:02:44 2016 -0500 +++ b/libgui/graphics/gl-select.h Thu Feb 04 16:56:02 2016 -0500 @@ -23,9 +23,10 @@ #ifndef __QtHandles_gl_selector__ #define __QtHandles_gl_selector__ 1 -#include "gl-render.h" +#include -#include +#include "gl-render.h" +#include "oct-opengl.h" enum select_flags { diff -r 53ac24e210e4 -r bd96c2efd4fe libinterp/corefcn/gl-render.cc --- a/libinterp/corefcn/gl-render.cc Thu Feb 04 16:02:44 2016 -0500 +++ b/libinterp/corefcn/gl-render.cc Thu Feb 04 16:56:02 2016 -0500 @@ -28,12 +28,18 @@ #include +#ifdef HAVE_WINDOWS_H +#define WIN32_LEAN_AND_MEAN +#include +#endif + #include #include "oct-locbuf.h" #include "oct-refcount.h" #include "errwarn.h" #include "gl-render.h" +#include "oct-opengl.h" #include "txt-eng.h" #include "txt-eng-ft.h" diff -r 53ac24e210e4 -r bd96c2efd4fe libinterp/corefcn/gl-render.h --- a/libinterp/corefcn/gl-render.h Thu Feb 04 16:02:44 2016 -0500 +++ b/libinterp/corefcn/gl-render.h Thu Feb 04 16:56:02 2016 -0500 @@ -23,30 +23,8 @@ #if ! defined (octave_gl_render_h) #define octave_gl_render_h 1 -#ifdef HAVE_WINDOWS_H -#define WIN32_LEAN_AND_MEAN -#include -#endif - -#ifdef HAVE_GL_GL_H -#include -#elif defined HAVE_OPENGL_GL_H || defined HAVE_FRAMEWORK_OPENGL -#include -#endif - -#ifdef HAVE_GL_GLU_H -#include -#elif defined HAVE_OPENGL_GLU_H || defined HAVE_FRAMEWORK_OPENGL -#include -#endif - -#ifdef HAVE_GL_GLEXT_H -#include -#elif defined HAVE_OPENGL_GLEXT_H || defined HAVE_FRAMEWORK_OPENGL -#include -#endif - #include "graphics.h" +#include "oct-opengl.h" #include "txt-eng-ft.h" #if defined (HAVE_OPENGL) diff -r 53ac24e210e4 -r bd96c2efd4fe libinterp/corefcn/gl2ps-renderer.cc --- a/libinterp/corefcn/gl2ps-renderer.cc Thu Feb 04 16:02:44 2016 -0500 +++ b/libinterp/corefcn/gl2ps-renderer.cc Thu Feb 04 16:56:02 2016 -0500 @@ -26,6 +26,7 @@ #include "error.h" #include "gl2ps-renderer.h" +#include "oct-opengl.h" #include "txt-eng-ft.h" #ifdef HAVE_GL2PS_H diff -r 53ac24e210e4 -r bd96c2efd4fe libinterp/corefcn/module.mk --- a/libinterp/corefcn/module.mk Thu Feb 04 16:02:44 2016 -0500 +++ b/libinterp/corefcn/module.mk Thu Feb 04 16:56:02 2016 -0500 @@ -106,6 +106,9 @@ C_COREFCN_SRC = \ libinterp/corefcn/siglist.c +NOINSTALL_COREFCN_INC = \ + libinterp/corefcn/oct-opengl.h + COREFCN_SRC = \ libinterp/corefcn/Cell.cc \ libinterp/corefcn/__contourc__.cc \ @@ -247,7 +250,8 @@ libinterp/corefcn/xpow.cc \ libinterp/corefcn/zfstream.cc \ $(JIT_SRC) \ - $(C_COREFCN_SRC) + $(C_COREFCN_SRC) \ + $(NOINSTALL_COREFCN_INC) COREFCN_FT2_DF = \ libinterp/corefcn/graphics.df \ diff -r 53ac24e210e4 -r bd96c2efd4fe libinterp/corefcn/oct-opengl.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libinterp/corefcn/oct-opengl.h Thu Feb 04 16:56:02 2016 -0500 @@ -0,0 +1,44 @@ +/* + +Copyright (C) 2016 John W. Eaton + +This file is part of Octave. + +Octave is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +Octave is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Octave; see the file COPYING. If not, see +. + +*/ + +#if ! defined (octave_oct_opengl_h) +#define octave_oct_opengl_h 1 + +#if defined (HAVE_GL_GL_H) +# include +#elif defined (HAVE_OPENGL_GL_H) || defined (HAVE_FRAMEWORK_OPENGL) +# include +#endif + +#if defined (HAVE_GL_GLU_H) +# include +#elif defined (HAVE_OPENGL_GLU_H) || defined (HAVE_FRAMEWORK_OPENGL) +# include +#endif + +#if defined (HAVE_GL_GLEXT_H) +# include +#elif defined (HAVE_OPENGL_GLEXT_H) || defined (HAVE_FRAMEWORK_OPENGL) +# include +#endif + +#endif diff -r 53ac24e210e4 -r bd96c2efd4fe libinterp/dldfcn/__init_fltk__.cc --- a/libinterp/dldfcn/__init_fltk__.cc Thu Feb 04 16:02:44 2016 -0500 +++ b/libinterp/dldfcn/__init_fltk__.cc Thu Feb 04 16:56:02 2016 -0500 @@ -41,12 +41,13 @@ #include "defun-dld.h" #include "error.h" #include "errwarn.h" +#include "oct-opengl.h" #include "ov-fcn-handle.h" #ifdef HAVE_FLTK #if defined (HAVE_X_WINDOWS) -#include +# include #endif #include @@ -54,8 +55,8 @@ #include #include -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN +#if defined (WIN32) +# define WIN32_LEAN_AND_MEAN #endif #include diff -r 53ac24e210e4 -r bd96c2efd4fe libinterp/dldfcn/__osmesa_print__.cc --- a/libinterp/dldfcn/__osmesa_print__.cc Thu Feb 04 16:02:44 2016 -0500 +++ b/libinterp/dldfcn/__osmesa_print__.cc Thu Feb 04 16:56:02 2016 -0500 @@ -31,15 +31,16 @@ #include "unwind-prot.h" #include "defun-dld.h" +#include "errwarn.h" #include "gl-render.h" #include "gl2ps-renderer.h" #include "graphics.h" -#include "errwarn.h" +#include "oct-opengl.h" #if defined (HAVE_OSMESA_H) -#include "osmesa.h" +# include "osmesa.h" #elif defined (HAVE_GL_OSMESA_H) -#include "GL/osmesa.h" +# include "GL/osmesa.h" #endif #if defined (HAVE_OSMESA) && defined (HAVE_OPENGL)