g2o
Loading...
Searching...
No Matches
freeglut_minimal.h
Go to the documentation of this file.
1#ifndef __FREEGLUT_EXT_H__
2#define __FREEGLUT_EXT_H__
3
4/*
5 * freeglut_ext.h
6 *
7 * The non-GLUT-compatible extensions to the freeglut library include file
8 *
9 * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
10 * Written by Pawel W. Olszta, <olszta@sourceforge.net>
11 * Creation date: Thu Dec 2 1999
12 *
13 * Permission is hereby granted, free of charge, to any person obtaining a
14 * copy of this software and associated documentation files (the "Software"),
15 * to deal in the Software without restriction, including without limitation
16 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 * and/or sell copies of the Software, and to permit persons to whom the
18 * Software is furnished to do so, subject to the following conditions:
19 *
20 * The above copyright notice and this permission notice shall be included
21 * in all copies or substantial portions of the Software.
22 *
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
27 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
28 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 */
30
31#include "g2o/config.h"
32
33#ifdef WINDOWS
34#include <windows.h>
35#endif
36
37#ifdef __APPLE__
38#include <OpenGL/gl.h>
39#else
40#include <GL/gl.h>
41#endif
42
43#ifdef _MSC_VER
44// We are using a Microsoft compiler:
45#ifdef G2O_SHARED_LIBS
46#ifdef freeglut_minimal_EXPORTS
47#define G2O_FGAPI __declspec(dllexport)
48#else
49#define G2O_FGAPI __declspec(dllimport)
50#endif
51#else
52#define G2O_FGAPI
53#endif
54#else
55// Not Microsoft compiler so set empty definition:
56#define G2O_FGAPI
57#endif
58
59namespace freeglut_minimal {
60
62
63/* The stroke font structures */
64
67 GLfloat X, Y;
68};
69
75
78 GLfloat Right;
79 int Number;
81};
82
85 char* Name; /* The source font name */
86 int Quantity; /* Number of chars in font */
87 GLfloat Height; /* Height of the characters */
88 const SFG_StrokeChar** Characters; /* The characters mapping */
89};
90
91extern const SFG_StrokeFont fgStrokeRoman;
93
94G2O_FGAPI void glutStrokeString(FontID font, const char* string);
95
96/*
97 * Font stuff, see freeglut_font.c
98 */
100
101/*
102 * Return the width of a string drawn using a stroke font
103 */
104G2O_FGAPI int glutStrokeLength(FontID fontID, const char* string);
105
106} // namespace freeglut_minimal
107
108/*** END OF FILE ***/
109
110#endif /* __FREEGLUT_EXT_H__ */
#define G2O_FGAPI
const SFG_StrokeFont fgStrokeMonoRoman
void glutStrokeString(FontID fontID, const char *string_)
const SFG_StrokeFont fgStrokeRoman
int glutStrokeLength(FontID fontID, const char *string_)
GLfloat glutStrokeHeight(FontID fontID)