OpenGL new naming scheme.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11055 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2016-01-26 20:48:21 +00:00
parent 222538baad
commit 2b3567c83c
8 changed files with 39 additions and 20 deletions

View File

@ -36,7 +36,8 @@
#include <FL/Fl_Device.H>
#include <FL/gl.h>
#include "src/cfg_gfx/opengl.H"
#include "drivers/OpenGL/Fl_OpenGL_Graphics_Driver.h"
Fl_OpenGL_Display_Device *Fl_OpenGL_Display_Device::display_device() {
static Fl_OpenGL_Display_Device *display = new Fl_OpenGL_Display_Device(new Fl_OpenGL_Graphics_Driver());
@ -53,12 +54,12 @@ const char *Fl_OpenGL_Display_Device::class_id = "Fl_OpenGL_Display_Device";
#endif
// ------ end of separate file! ------------------------------------------------
#include "cfg_gfx/opengl_arci.cxx"
#include "cfg_gfx/opengl_color.cxx"
#include "cfg_gfx/opengl_font.cxx"
#include "cfg_gfx/opengl_line_style.cxx"
#include "cfg_gfx/opengl_rect.cxx"
#include "cfg_gfx/opengl_vertex.cxx"
#include "drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.cxx"
#include "drivers/OpenGL/Fl_OpenGL_Graphics_Driver_color.cxx"
#include "drivers/OpenGL/Fl_OpenGL_Graphics_Driver_font.cxx"
#include "drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx"
#include "drivers/OpenGL/Fl_OpenGL_Graphics_Driver_rect.cxx"
#include "drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx"
#if defined(__APPLE__)

View File

@ -21,7 +21,7 @@
\brief Color handling
*/
#include "opengl.H"
#include "Fl_OpenGL_Graphics_Driver.h"
#include <FL/gl.h>
// Implementation of fl_color(i), fl_color(r,g,b).

View File

@ -29,6 +29,11 @@
#include <FL/gl.h>
// FIXME: check out FreeGlut:
// FIXME: implement font-to-RGBA in the main graphics driver
#if 1
/*
|01234567|
-+--------+
@ -59,14 +64,6 @@ static const char *font_data[128] = {
};
#if 0
void Fl_OpenGL_Graphics_Driver::draw(const char* str, int n, int x, int y) {
gl_draw(str, n, x, y);
}
#else
double Fl_OpenGL_Graphics_Driver::width(const char *str, int n) {
return size_*n*0.5;
}
@ -95,7 +92,7 @@ void Fl_OpenGL_Graphics_Driver::draw(const char *str, int n, int x, int y)
const char *fd = font_data[(int)c];
if (fd) {
char rendering = 0;
float px=0.0f, py=0.0f;
float px, py;
for (;;) {
char cmd = *fd++;
if (cmd==0) {
@ -125,6 +122,27 @@ void Fl_OpenGL_Graphics_Driver::draw(const char *str, int n, int x, int y)
}
}
#elif 0
/*
extern FL_EXPORT Fl_Glut_StrokeFont glutStrokeRoman;
extern FL_EXPORT Fl_Glut_StrokeFont glutStrokeMonoRoman;
# define GLUT_STROKE_ROMAN (&glutStrokeRoman)
# define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman)
FL_EXPORT void glutStrokeCharacter(void *font, int character);
FL_EXPORT GLfloat glutStrokeHeight(void *font);
FL_EXPORT int glutStrokeLength(void *font, const unsigned char *string);
FL_EXPORT void glutStrokeString(void *font, const unsigned char *string);
FL_EXPORT int glutStrokeWidth(void *font, int character);
*/
#else
void Fl_OpenGL_Graphics_Driver::draw(const char* str, int n, int x, int y) {
gl_draw(str, n, x, y);
}
#endif

View File

@ -24,7 +24,7 @@
\brief Line style drawing utility hiding different platforms.
*/
#include "opengl.H"
#include "Fl_OpenGL_Graphics_Driver.h"
#include <FL/gl.h>
extern int fl_line_width_;

View File

@ -26,7 +26,7 @@
*/
#include <FL/gl.h>
#include "opengl.H"
#include "Fl_OpenGL_Graphics_Driver.h"
// --- line and polygon drawing with integer coordinates

View File

@ -25,7 +25,7 @@
simple 2D transformations, implemented for OpenGL.
*/
#include "opengl.H"
#include "Fl_OpenGL_Graphics_Driver.h"
#include <FL/fl_draw.H>
#include <FL/gl.h>