]> git.saurik.com Git - wxWidgets.git/blob - samples/opengl/penguin/lw.h
Warning fix.
[wxWidgets.git] / samples / opengl / penguin / lw.h
1 /*
2 * Copyright (C) 1998 Janne Löf <jlof@mail.student.oulu.fi>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the Free
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */
18
19
20 #ifndef LW_H
21 #define LW_H
22
23 #ifdef __WXMAC__
24 # ifdef __DARWIN__
25 # include <OpenGL/glu.h>
26 # else
27 # include <glu.h>
28 # endif
29 #else
30 # include <GL/glu.h>
31 #endif
32
33 #define LW_MAX_POINTS 200
34 #define LW_MAX_NAME_LEN 500
35
36 typedef struct {
37 char name[LW_MAX_NAME_LEN];
38 GLfloat r,g,b;
39 } lwMaterial;
40
41 typedef struct {
42 int material; /* material of this face */
43 int index_cnt; /* number of vertices */
44 int *index; /* index to vertex */
45 float *texcoord; /* u,v texture coordinates */
46 } lwFace;
47
48 typedef struct {
49 int face_cnt;
50 lwFace *face;
51
52 int material_cnt;
53 lwMaterial *material;
54
55 int vertex_cnt;
56 GLfloat *vertex;
57
58 } lwObject;
59
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63
64 #if wxUSE_GLCANVAS
65 bool lw_is_lwobject(const char *lw_file);
66 lwObject *lw_object_read(const char *lw_file);
67 void lw_object_free( lwObject *lw_object);
68 void lw_object_show(const lwObject *lw_object);
69
70 GLfloat lw_object_radius(const lwObject *lw_object);
71 void lw_object_scale (lwObject *lw_object, GLfloat scale);
72 #endif
73
74 #ifdef __cplusplus
75 }
76 #endif
77
78 #endif /* LW_H */
79