diff options
author | Alan Hourihane <alanh@tungstengraphics.com> | 2008-11-28 16:19:10 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@tungstengraphics.com> | 2008-11-28 16:19:10 +0000 |
commit | c4c86bbd16688ee4a0afb32efa27ba52abceb1ca (patch) | |
tree | 6b16fae74e49122a86ecf18b4a427b80d5a8e812 /src/glu | |
parent | 5b714723895d321db753f896576de5e2c27778c3 (diff) | |
parent | c303e7299b5f95d4728c3710c56f50b1fefca09d (diff) |
Merge commit 'origin/master' into gallium-0.2
Diffstat (limited to 'src/glu')
-rw-r--r-- | src/glu/sgi/libnurbs/interface/bezierPatchMesh.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/glu/sgi/libnurbs/interface/bezierPatchMesh.cc b/src/glu/sgi/libnurbs/interface/bezierPatchMesh.cc index 3dc16313ff..ac7ff84fc4 100644 --- a/src/glu/sgi/libnurbs/interface/bezierPatchMesh.cc +++ b/src/glu/sgi/libnurbs/interface/bezierPatchMesh.cc @@ -103,23 +103,22 @@ bezierPatchMesh *bezierPatchMeshMake(int maptype, float umin, float umax, int us int dimension; int the_ustride; int the_vstride; - - bezierPatchMesh *ret = (bezierPatchMesh*) malloc(sizeof(bezierPatchMesh)); - assert(ret); - ret->bpatch = NULL; - ret->bpatch_normal = NULL; - ret->bpatch_color = NULL; - ret->bpatch_texcoord = NULL; - if(maptype == GL_MAP2_VERTEX_3) dimension = 3; else if (maptype==GL_MAP2_VERTEX_4) dimension = 4; else { fprintf(stderr, "error in inMap2f, maptype=%i is wrong, maptype,map is invalid\n", maptype); return NULL; } - + + bezierPatchMesh *ret = (bezierPatchMesh*) malloc(sizeof(bezierPatchMesh)); + assert(ret); + + ret->bpatch_normal = NULL; + ret->bpatch_color = NULL; + ret->bpatch_texcoord = NULL; ret->bpatch = bezierPatchMake(umin, vmin, umax, vmax, uorder, vorder, dimension); + /*copy the control points there*/ the_ustride = vorder * dimension; the_vstride = dimension; |