Blame FL/gl.h

Packit Service 9ac617
//
Packit Service 9ac617
// "$Id: gl.h 10872 2015-10-21 14:37:27Z manolo $"
Packit Service 9ac617
//
Packit Service 9ac617
// OpenGL header file for the Fast Light Tool Kit (FLTK).
Packit Service 9ac617
//
Packit Service 9ac617
// Copyright 1998-2011 by Bill Spitzak and others.
Packit Service 9ac617
//
Packit Service 9ac617
// You must include this instead of GL/gl.h to get the Microsoft
Packit Service 9ac617
// APIENTRY stuff included (from <windows.h>) prior to the OpenGL
Packit Service 9ac617
// header files.
Packit Service 9ac617
//
Packit Service 9ac617
// This file also provides "missing" OpenGL functions, and
Packit Service 9ac617
// gl_start() and gl_finish() to allow OpenGL to be used in any window
Packit Service 9ac617
//
Packit Service 9ac617
// This library is free software. Distribution and use rights are outlined in
Packit Service 9ac617
// the file "COPYING" which should have been included with this file.  If this
Packit Service 9ac617
// file is missing or damaged, see the license at:
Packit Service 9ac617
//
Packit Service 9ac617
//     http://www.fltk.org/COPYING.php
Packit Service 9ac617
//
Packit Service 9ac617
// Please report all bugs and problems on the following page:
Packit Service 9ac617
//
Packit Service 9ac617
//     http://www.fltk.org/str.php
Packit Service 9ac617
//
Packit Service 9ac617
Packit Service 9ac617
/** \file gl.h
Packit Service 9ac617
 *  This file defines wrapper functions for OpenGL in FLTK
Packit Service 9ac617
 *
Packit Service 9ac617
 *  To use OpenGL from within an FLTK application you MUST use gl_visual()
Packit Service 9ac617
 *  to select the default visual before doing show() on any windows. Mesa
Packit Service 9ac617
 *  will crash if yoy try to use a visual not returned by glxChooseVidual.
Packit Service 9ac617
 *
Packit Service 9ac617
 *  This does not work with Fl_Double_Window's!  It will try to draw
Packit Service 9ac617
 *  into the front buffer.  Depending on the system this will either
Packit Service 9ac617
 *  crash or do nothing (when pixmaps are being used as back buffer
Packit Service 9ac617
 *  and GL is being done by hardware), work correctly (when GL is done
Packit Service 9ac617
 *  with software, such as Mesa), or draw into the front buffer and
Packit Service 9ac617
 *  be erased when the buffers are swapped (when double buffer hardware
Packit Service 9ac617
 *  is being used)
Packit Service 9ac617
 */
Packit Service 9ac617
Packit Service 9ac617
#ifndef FL_gl_H
Packit Service 9ac617
#  define FL_gl_H
Packit Service 9ac617
Packit Service 9ac617
#  include "Enumerations.H" // for color names
Packit Service 9ac617
#  ifdef WIN32
Packit Service 9ac617
#    include <windows.h>
Packit Service 9ac617
#  endif
Packit Service 9ac617
#  ifndef APIENTRY
Packit Service 9ac617
#    if defined(__CYGWIN__)
Packit Service 9ac617
#      define APIENTRY __attribute__ ((__stdcall__))
Packit Service 9ac617
#    else
Packit Service 9ac617
#      define APIENTRY
Packit Service 9ac617
#    endif
Packit Service 9ac617
#  endif
Packit Service 9ac617
Packit Service 9ac617
#  ifdef __APPLE__
Packit Service 9ac617
#    include <OpenGL/gl.h>
Packit Service 9ac617
#  else
Packit Service 9ac617
#    include <GL/gl.h>
Packit Service 9ac617
#  endif  // __APPLE__
Packit Service 9ac617
Packit Service 9ac617
FL_EXPORT void gl_start();
Packit Service 9ac617
FL_EXPORT void gl_finish();
Packit Service 9ac617
Packit Service 9ac617
FL_EXPORT void gl_color(Fl_Color i);
Packit Service 9ac617
/** back compatibility */
Packit Service 9ac617
inline void gl_color(int c) {gl_color((Fl_Color)c);}
Packit Service 9ac617
Packit Service 9ac617
FL_EXPORT void gl_rect(int x,int y,int w,int h);
Packit Service 9ac617
/**
Packit Service 9ac617
  Fills the given rectangle with the current color.
Packit Service 9ac617
  \see gl_rect(int x, int y, int w, int h)
Packit Service 9ac617
  */
Packit Service 9ac617
inline void gl_rectf(int x,int y,int w,int h) {glRecti(x,y,x+w,y+h);}
Packit Service 9ac617
Packit Service 9ac617
FL_EXPORT void gl_font(int fontid, int size);
Packit Service 9ac617
FL_EXPORT int  gl_height();
Packit Service 9ac617
FL_EXPORT int  gl_descent();
Packit Service 9ac617
FL_EXPORT double gl_width(const char *);
Packit Service 9ac617
FL_EXPORT double gl_width(const char *, int n);
Packit Service 9ac617
FL_EXPORT double gl_width(uchar);
Packit Service 9ac617
Packit Service 9ac617
FL_EXPORT void gl_draw(const char*);
Packit Service 9ac617
FL_EXPORT void gl_draw(const char*, int n);
Packit Service 9ac617
FL_EXPORT void gl_draw(const char*, int x, int y);
Packit Service 9ac617
FL_EXPORT void gl_draw(const char*, float x, float y);
Packit Service 9ac617
FL_EXPORT void gl_draw(const char*, int n, int x, int y);
Packit Service 9ac617
FL_EXPORT void gl_draw(const char*, int n, float x, float y);
Packit Service 9ac617
FL_EXPORT void gl_draw(const char*, int x, int y, int w, int h, Fl_Align);
Packit Service 9ac617
FL_EXPORT void gl_measure(const char*, int& x, int& y);
Packit Service 9ac617
#ifdef __APPLE__
Packit Service 9ac617
extern FL_EXPORT void gl_texture_pile_height(int max);
Packit Service 9ac617
extern FL_EXPORT int gl_texture_pile_height();
Packit Service 9ac617
#endif
Packit Service 9ac617
Packit Service 9ac617
FL_EXPORT void gl_draw_image(const uchar *, int x,int y,int w,int h, int d=3, int ld=0);
Packit Service 9ac617
Packit Service 9ac617
#endif // !FL_gl_H
Packit Service 9ac617
Packit Service 9ac617
//
Packit Service 9ac617
// End of "$Id: gl.h 10872 2015-10-21 14:37:27Z manolo $".
Packit Service 9ac617
//