14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(vertex), &verts[0].r);
glTexCoordPointer(2, GL_FLOAT, sizeof(vertex), &verts[0].u);
}
void
reallocv()
{
verts = (vertex *)realloc(verts, (curmaxverts *= 2) * sizeof(vertex));
curmaxverts -= 10;
if (!verts)
fatal(@"no vertex memory!");
setarraypointers();
}
// generating the actual vertices is done dynamically every frame and sits at
// the leaves of all these functions, and are part of the cpu bottleneck on
// really slow machines, hence the macros.
|
>
|
<
<
|
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(vertex), &verts[0].r);
glTexCoordPointer(2, GL_FLOAT, sizeof(vertex), &verts[0].u);
}
void
reallocv()
{
verts =
(vertex *)OFResizeMemory(verts, (curmaxverts *= 2), sizeof(vertex));
curmaxverts -= 10;
setarraypointers();
}
// generating the actual vertices is done dynamically every frame and sits at
// the leaves of all these functions, and are part of the cpu bottleneck on
// really slow machines, hence the macros.
|