5#include "../../x3d/src/X3DDefs.h"
12#if defined (WIN32) || defined (__MWERKS__)
48 puts (
"Unable to allocate memory for points !");
62 puts (
"Unable to allocate memory for colors !");
104 puts (
"Unable to allocate memory for segments !");
117 puts (
"Unable to allocate memory for polygons !");
149 int n, i, j,
p,
q,
c;
150 int oldNumOfPoints, oldNumOfSegments;
174 p = oldNumOfPoints + buff->
segs[3*i+1];
175 q = oldNumOfPoints + buff->
segs[3*i+2];
187 puts(
"Unable to allocate memory for point segments !");
192 (
points[
p].numSegs + 1) *
sizeof(segment *))) == NULL){
193 puts(
"Unable to allocate memory for point segments !");
200 puts(
"Unable to allocate memory for point segments !");
205 (
points[
q].numSegs + 1) *
sizeof(segment *))) == NULL){
206 puts(
"Unable to allocate memory for point segments !");
230 puts(
"Unable to allocate memory for polygon segments !");
234 int seg = oldNumOfSegments + buff->
polys[
n++];
241 if(
segs[seg].numPolys == 0) {
242 if((
segs[seg].
polys = (polygon **)
calloc(1,
sizeof(polygon *)))== NULL){
243 puts(
"Unable to allocate memory for segment polygons !");
249 (
segs[seg].numPolys + 1) *
sizeof(polygon *))) == NULL){
250 puts(
"Unable to allocate memory for segment polygons !");
255 segs[seg].numPolys++;
winID h TVirtualViewer3D TVirtualGLPainter p
void FillX3DBuffer(X3DBuffer *buff)