]> git.saurik.com Git - wxWidgets.git/blob - samples/opengl/penguin/lw.h
finally, wx/setup.h is not needed in the .spec
[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 #include <glu.h>
25 #else
26 #include <GL/glu.h>
27 #endif
28
29 #define LW_MAX_POINTS 200
30 #define LW_MAX_NAME_LEN 500
31
32 typedef struct {
33 char name[LW_MAX_NAME_LEN];
34 GLfloat r,g,b;
35 } lwMaterial;
36
37 typedef struct {
38 int material; /* material of this face */
39 int index_cnt; /* number of vertices */
40 int *index; /* index to vertex */
41 float *texcoord; /* u,v texture coordinates */
42 } lwFace;
43
44 typedef struct {
45 int face_cnt;
46 lwFace *face;
47
48 int material_cnt;
49 lwMaterial *material;
50
51 int vertex_cnt;
52 GLfloat *vertex;
53
54 } lwObject;
55
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59
60 int lw_is_lwobject(const char *lw_file);
61 lwObject *lw_object_read(const char *lw_file);
62 void lw_object_free( lwObject *lw_object);
63 void lw_object_show(const lwObject *lw_object);
64
65 GLfloat lw_object_radius(const lwObject *lw_object);
66 void lw_object_scale (lwObject *lw_object, GLfloat scale);
67
68 #ifdef __cplusplus
69 }
70 #endif
71
72 #endif /* LW_H */
73