MCPcopy Create free account
hub / github.com/DentonW/DevIL / ILAPIENTRY iluRegioniv

Function ILAPIENTRY iluRegioniv

DevIL/src-ILU/src/ilu_region.cpp:46–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45
46void ILAPIENTRY iluRegioniv(ILpointi *Points, ILuint n)
47{
48 if (Points == NULL || n == 0) {
49 ifree(RegionPointsi);
50 ifree(RegionPointsf);
51 RegionPointsi = NULL;
52 PointNum = 0;
53 return;
54 }
55 if (n < 3) {
56 ilSetError(ILU_INVALID_PARAM);
57 return;
58 }
59 ifree(RegionPointsi);
60 ifree(RegionPointsf);
61 RegionPointsi = (ILpointi*)ialloc(sizeof(ILpointi) * n);
62 if (RegionPointsi == NULL)
63 return;
64 memcpy(RegionPointsi, Points, sizeof(ILpointi) * n);
65 PointNum = n;
66 return;
67}
68
69
70// Inserts edge into list in order of increasing xIntersect field.

Callers

nothing calls this directly

Calls 1

ilSetErrorFunction · 0.85

Tested by

no test coverage detected