mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 16:12:13 +08:00
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:
@@ -36,7 +36,8 @@
|
|||||||
|
|
||||||
#include <FL/Fl_Device.H>
|
#include <FL/Fl_Device.H>
|
||||||
#include <FL/gl.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() {
|
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());
|
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
|
#endif
|
||||||
// ------ end of separate file! ------------------------------------------------
|
// ------ end of separate file! ------------------------------------------------
|
||||||
|
|
||||||
#include "cfg_gfx/opengl_arci.cxx"
|
#include "drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.cxx"
|
||||||
#include "cfg_gfx/opengl_color.cxx"
|
#include "drivers/OpenGL/Fl_OpenGL_Graphics_Driver_color.cxx"
|
||||||
#include "cfg_gfx/opengl_font.cxx"
|
#include "drivers/OpenGL/Fl_OpenGL_Graphics_Driver_font.cxx"
|
||||||
#include "cfg_gfx/opengl_line_style.cxx"
|
#include "drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx"
|
||||||
#include "cfg_gfx/opengl_rect.cxx"
|
#include "drivers/OpenGL/Fl_OpenGL_Graphics_Driver_rect.cxx"
|
||||||
#include "cfg_gfx/opengl_vertex.cxx"
|
#include "drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx"
|
||||||
|
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@
|
|||||||
\brief Color handling
|
\brief Color handling
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opengl.H"
|
#include "Fl_OpenGL_Graphics_Driver.h"
|
||||||
#include <FL/gl.h>
|
#include <FL/gl.h>
|
||||||
|
|
||||||
// Implementation of fl_color(i), fl_color(r,g,b).
|
// Implementation of fl_color(i), fl_color(r,g,b).
|
||||||
+27
-9
@@ -29,6 +29,11 @@
|
|||||||
|
|
||||||
#include <FL/gl.h>
|
#include <FL/gl.h>
|
||||||
|
|
||||||
|
// FIXME: check out FreeGlut:
|
||||||
|
// FIXME: implement font-to-RGBA in the main graphics driver
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|01234567|
|
|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) {
|
double Fl_OpenGL_Graphics_Driver::width(const char *str, int n) {
|
||||||
return size_*n*0.5;
|
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];
|
const char *fd = font_data[(int)c];
|
||||||
if (fd) {
|
if (fd) {
|
||||||
char rendering = 0;
|
char rendering = 0;
|
||||||
float px=0.0f, py=0.0f;
|
float px, py;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
char cmd = *fd++;
|
char cmd = *fd++;
|
||||||
if (cmd==0) {
|
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
|
#endif
|
||||||
|
|
||||||
|
|
||||||
+1
-1
@@ -24,7 +24,7 @@
|
|||||||
\brief Line style drawing utility hiding different platforms.
|
\brief Line style drawing utility hiding different platforms.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opengl.H"
|
#include "Fl_OpenGL_Graphics_Driver.h"
|
||||||
#include <FL/gl.h>
|
#include <FL/gl.h>
|
||||||
|
|
||||||
extern int fl_line_width_;
|
extern int fl_line_width_;
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <FL/gl.h>
|
#include <FL/gl.h>
|
||||||
#include "opengl.H"
|
#include "Fl_OpenGL_Graphics_Driver.h"
|
||||||
|
|
||||||
// --- line and polygon drawing with integer coordinates
|
// --- line and polygon drawing with integer coordinates
|
||||||
|
|
||||||
+1
-1
@@ -25,7 +25,7 @@
|
|||||||
simple 2D transformations, implemented for OpenGL.
|
simple 2D transformations, implemented for OpenGL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opengl.H"
|
#include "Fl_OpenGL_Graphics_Driver.h"
|
||||||
|
|
||||||
#include <FL/fl_draw.H>
|
#include <FL/fl_draw.H>
|
||||||
#include <FL/gl.h>
|
#include <FL/gl.h>
|
||||||
Reference in New Issue
Block a user