#include <GL/glut.h>#include <stdlib.h>#include <math.h>#include <iostream>#include <fstream>#include "faogenlib.h"Go to the source code of this file.
Classes | |
| struct | plane_vertex |
| Example of interleaved vertex data. More... | |
Functions | |
| void | build_plane () |
| Fills plane_geometry and plane_indices. | |
| bool | generate_example () |
| faogenlib usage example | |
| void | reshape (int w, int h) |
| void | key (unsigned char key, int x, int y) |
| void | idle () |
| void | display () |
| int | main (int argc, char *argv[]) |
Variables | |
| int const | plane_size = 100 |
| plane_vertex | plane_geometry [plane_size *plane_size] |
| unsigned short | plane_indices [(plane_size-1)*(plane_size-1)*2 *3] |
| float | cube_vertices [] |
| Example of geometry in separate arrays. | |
| float | cube_texcoords [] |
| float | cube_normals [] |
| unsigned short | cube_indices [6 *2 *3] |
| float | cube_matrix [16] |
| GLuint | cube_texture = 0 |
| float | bottom_occludder [] |
| unsigned short | bottom_indices [] |
Definition in file example.cpp.
|
|
Fills plane_geometry and plane_indices.
Definition at line 252 of file example.cpp. References plane_vertex::color, plane_vertex::normal, plane_geometry, plane_size, and plane_vertex::pos. Referenced by main(). |
|
|
Definition at line 329 of file example.cpp. References bottom_indices, bottom_occludder, cube_indices, cube_matrix, cube_texcoords, cube_vertices, plane_geometry, and plane_indices. Referenced by main(). |
|
|
|
Definition at line 310 of file example.cpp. Referenced by main(). |
|
||||||||||||||||
|
Definition at line 299 of file example.cpp. References cube_texture. Referenced by main(). |
|
||||||||||||
|
Definition at line 369 of file example.cpp. References build_plane(), display(), generate_example(), idle(), key(), and reshape(). |
|
||||||||||||
|
Definition at line 290 of file example.cpp. Referenced by main(). |
|
|
Initial value:
{
0, 4, 1,
1, 4, 3,
3, 4, 2,
2, 4, 0
}
Definition at line 150 of file example.cpp. Referenced by display(), and generate_example(). |
|
|
Initial value:
{
-5.f, -5.f, 0.f,
5.f, -5.f, 0.f,
-5.f, 5.f, 0.f,
5.f, 5.f, 0.f,
0.f, 0.f, -5.f,
}
Definition at line 141 of file example.cpp. Referenced by display(), and generate_example(). |
|
|
Initial value:
{
1-1, 3-1, 24-1,
24-1, 23-1, 1-1,
9-1, 10-1, 12-1,
12-1, 11-1, 9-1,
13-1, 14-1, 16-1,
16-1, 15-1, 13-1,
2-1, 4-1, 8-1,
8-1, 6-1, 2-1,
21-1, 20-1, 7-1,
7-1, 22-1, 21-1,
18-1, 17-1, 5-1,
5-1, 19-1, 18-1,
}
Definition at line 115 of file example.cpp. Referenced by display(), and generate_example(). |
|
|
Initial value:
{
0.8639584f, -0.5035632f, 0.f, 0.f,
0.5035632f, 0.8639584f, 0.f, 0.f,
0.f, 0.f, 1.f, 0.f,
0.f, 0.f, -0.25f, 1.f
}
Definition at line 131 of file example.cpp. Referenced by display(), and generate_example(). |
|
|
Initial value:
{
0.f, 0.f, -1.f,
1.f, 0.f, 0.f,
0.f, 0.f, -1.f,
1.f, 0.f, 0.f,
-1.f, 0.f, 0.f,
1.f, 0.f, 0.f,
0.f, 1.f, 0.f,
1.f, 0.f, 0.f,
0.f, 0.f, 1.f,
0.f, 0.f, 1.f,
0.f, 0.f, 1.f,
0.f, 0.f, 1.f,
0.f, -1.f, 0.f,
0.f, -1.f, 0.f,
0.f, -1.f, 0.f,
0.f, -1.f, 0.f,
-1.f, 0.f, 0.f,
-1.f, 0.f, 0.f,
-1.f, 0.f, 0.f,
0.f, 1.f, 0.f,
0.f, 1.f, 0.f,
0.f, 1.f, 0.f,
0.f, 0.f, -1.f,
0.f, 0.f, -1.f,
}
Definition at line 87 of file example.cpp. Referenced by generate_example(). |
|
|
Initial value:
{
0.3360113f, 1.f,
0.f, 0.6720225f,
0.3360113f, 0.6720225f,
0.3279775f, 0.6720225f,
0.6639888f, 0.3279775f,
0.f, 1.f,
0.3279775f, 0.3279775f,
0.3279775f, 1.f,
0.f, 0.3360113f,
0.3279775f, 0.3360113f,
0.f, 0.6639888f,
0.3279775f, 0.6639888f,
0.3360113f, 0.3360113f,
0.6639888f, 0.3360113f,
0.3360113f, 0.6639888f,
0.6639888f, 0.6639888f,
0.6639888f, 0.f,
0.3360113f, 0.f,
0.3360113f, 0.3279775f,
0.3279775f, 0.f,
0.f, 0.f,
0.f, 0.3279775f,
0.6639888f, 1.f,
0.6639888f, 0.6720225f
}
Definition at line 59 of file example.cpp. Referenced by display(), and generate_example(). |
|
|
Definition at line 139 of file example.cpp. Referenced by generate_example(), and key(). |
|
|
Initial value:
{
-0.5f, -0.5f, 0.f,
0.5f, -0.5f, 0.f,
-0.5f, 0.5f, 0.f,
0.5f, 0.5f, 0.f,
-0.5f, -0.5f, 1.f,
0.5f, -0.5f, 1.f,
-0.5f, 0.5f, 1.f,
0.5f, 0.5f, 1.f,
-0.5f, -0.5f, 1.f,
0.5f, -0.5f, 1.f,
-0.5f, 0.5f, 1.f,
0.5f, 0.5f, 1.f,
-0.5f, -0.5f, 0.f,
0.5f, -0.5f, 0.f,
-0.5f, -0.5f, 1.f,
0.5f, -0.5f, 1.f,
-0.5f, -0.5f, 0.f,
-0.5f, 0.5f, 0.f,
-0.5f, 0.5f, 1.f,
-0.5f, 0.5f, 0.f,
0.5f, 0.5f, 0.f,
0.5f, 0.5f, 1.f,
0.5f, -0.5f, 0.f,
0.5f, 0.5f, 0.f
}
Definition at line 31 of file example.cpp. Referenced by display(), and generate_example(). |
|
|
Definition at line 24 of file example.cpp. Referenced by build_plane(), display(), and generate_example(). |
|
|
Definition at line 25 of file example.cpp. Referenced by display(), and generate_example(). |
|
|
Definition at line 23 of file example.cpp. Referenced by build_plane(). |
1.4.6-NO