- for(i=0; i<6; i++) {
- memcpy(tmpv, v, vnum * sizeof *v);
-
- if(clip_frustum(v, &vnum, tmpv, vnum, i) < 0) {
- /* polygon completely outside of view volume. discard */
- vnum = 0;
- break;
+ if(st->opt & G3D_CLIP_FRUSTUM) {
+ for(i=0; i<6; i++) {
+ memcpy(tmpv, v, vnum * sizeof *v);
+
+ if(clip_frustum(v, &vnum, tmpv, vnum, i) < 0) {
+ /* polygon completely outside of view volume. discard */
+ vnum = 0;
+ break;
+ }