changeset 21689:9467549bd5ff

* gl-render.cc: Allow compilation without OPENGL.
author John W. Eaton <jwe@octave.org>
date Thu, 12 May 2016 14:46:25 -0400
parents 68ab693d16e4
children b6a686543080
files libinterp/corefcn/gl-render.cc
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/gl-render.cc	Thu May 12 14:45:20 2016 -0400
+++ b/libinterp/corefcn/gl-render.cc	Thu May 12 14:46:25 2016 -0400
@@ -646,6 +646,7 @@
     }
 }
 
+#if defined (HAVE_OPENGL)
 static std::string
 gl_get_string (GLenum id)
 {
@@ -657,6 +658,7 @@
   buf << glGetString (id);
   return std::string (buf.str ());
 }
+#endif
 
 void
 opengl_renderer::draw_figure (const figure::properties& props)
@@ -665,10 +667,12 @@
 
   init_gl_context (props.is___enhanced__ (), props.get_color_rgb ());
 
+#if defined (HAVE_OPENGL)
   props.set___gl_extensions__ (gl_get_string (GL_EXTENSIONS));
   props.set___gl_renderer__ (gl_get_string (GL_RENDERER));
   props.set___gl_vendor__ (gl_get_string (GL_VENDOR));
   props.set___gl_version__ (gl_get_string (GL_VERSION));
+#endif
 
   // Draw children