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