From 97234fb3e28e7c8eaf844ae0fd841122de2c47dc Mon Sep 17 00:00:00 2001 From: Bill Spitzak Date: Wed, 14 Mar 2001 17:20:02 +0000 Subject: Replaced remaining _WIN32 symbols with WIN32 Stuff from work: Removed reference to unused GL/glu.h header file, which is missing on some Linux systems. Fl_Gl_Window has a new method to allow you to get and set the context: void Fl_Gl_Window::context(void*, int destroy = 0) void* Fl_Gl_Window::context() const; Return or set a pointer to the GLContext that this window is using. This is a system-dependent structure, but it is portable to copy the context from one window to another. You can also set it to NULL, which will force FLTK to recreate the context the next time make_current() is called, this is useful for getting around bugs in OpenGL implementations. If destroy_flag is true the context will be destroyed by fltk when the window is destroyed, or when the mode() is changed, or the next time context(x) is called. Some cleanup of Fl_Gl_Choice to move most of the system dependent #ifdefs into Fl_Gl_Choice.cxx. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1413 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/gl_draw.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/gl_draw.cxx') diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx index c24463c5d..2b0348c60 100644 --- a/src/gl_draw.cxx +++ b/src/gl_draw.cxx @@ -1,5 +1,5 @@ // -// "$Id: gl_draw.cxx,v 1.7.2.4 2001/01/22 15:13:41 easysw Exp $" +// "$Id: gl_draw.cxx,v 1.7.2.5 2001/03/14 17:20:02 spitzak Exp $" // // OpenGL drawing support routines for the Fast Light Tool Kit (FLTK). // @@ -37,14 +37,14 @@ #include "Fl_Font.H" #include -void gl_font(int fontid, int size) {fl_font(fontid, size);} int gl_height() {return fl_height();} int gl_descent() {return fl_descent();} double gl_width(const char* s) {return fl_width(s);} double gl_width(const char* s, int n) {return fl_width(s,n);} double gl_width(uchar c) {return fl_width(c);} -void gl_draw(const char* str, int n) { +void gl_font(int fontid, int size) { + fl_font(fontid, size); if (!fl_fontsize->listbase) { #ifdef WIN32 int base = fl_fontsize->metr.tmFirstChar; @@ -60,11 +60,11 @@ void gl_draw(const char* str, int n) { glXUseXFont(fl_xfont->fid, base, size, fl_fontsize->listbase+base); #endif } + glListBase(fl_fontsize->listbase); +} - glPushAttrib(GL_LIST_BIT); - glListBase(fl_fontsize->listbase); - glCallLists(n, GL_UNSIGNED_BYTE, str); - glPopAttrib(); +void gl_draw(const char* str, int n) { + glCallLists(n, GL_UNSIGNED_BYTE, str); } void gl_draw(const char* str, int n, int x, int y) { @@ -155,5 +155,5 @@ void gl_draw_image(const uchar* b, int x, int y, int w, int h, int d, int ld) { #endif // -// End of "$Id: gl_draw.cxx,v 1.7.2.4 2001/01/22 15:13:41 easysw Exp $". +// End of "$Id: gl_draw.cxx,v 1.7.2.5 2001/03/14 17:20:02 spitzak Exp $". // -- cgit v1.2.3