123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844 |
- /*!
- \file lib/ogsf/gsd_wire.c
- \brief OGSF library -
- GRASS OpenGL gsurf OGSF Library
- (C) 1999-2008 by the GRASS Development Team
- This program is free software under the
- GNU General Public License (>=v2).
- Read the file COPYING that comes with GRASS
- for details.
- \author Bill Brown USACERL (January 1993)
- \author Doxygenized by Martin Landa <landa.martin gmail.com> (May 2008)
- */
- #include <grass/gis.h>
- #include <grass/ogsf.h>
- #include "gsget.h"
- #include "rowcol.h"
- #define DO_ARROWS
- /************************************************************************/
- /* Notes on exageration:
- vertical exageration is of two forms:
- 1) global exageration (from geoview struct)
- 2) vertical exageration for each surface - not implemented
- */
- /************************************************************************/
- /* may need to add more parameters to tell it which window or off_screen
- * pixmap to draw into. nah - just have one current (OpenGL limitation)
- */
- /*!
- \brief Draw surface wire
- \param surf surface (geosurf)
- \return
- */
- int gsd_wire_surf(geosurf * surf)
- {
- int desc, ret;
- G_debug(3, "gsd_wire_surf(): id=%d", surf->gsurf_id);
- desc = ATT_TOPO;
- switch (gs_get_att_src(surf, desc)) {
- case NOTSET_ATT:
- ret = (-1);
- break;
- case MAP_ATT:
- if (surf->draw_mode & DM_GRID_WIRE)
- ret = (gsd_wire_surf_map(surf)); /* draw mesh */
- else
- ret = (gsd_coarse_surf_map(surf)); /* draw coarse surf */
- #ifdef DO_ARROWS
- /*
- gsd_wire_arrows(surf);
- */
- #endif
- break;
- case CONST_ATT:
- ret = (gsd_wire_surf_const(surf, surf->att[desc].constant));
- break;
- case FUNC_ATT:
- ret = (gsd_wire_surf_func(surf, surf->att[desc].user_func));
- break;
- default:
- ret = (-1);
- break;
- }
- return (ret);
- }
- /*!
- \brief ADD
- \param surf surface (geosurf)
- \return
- */
- int gsd_wire_surf_map(geosurf * surf)
- {
- int check_mask, check_color;
- typbuff *buff, *cobuff;
- int xmod, ymod, row, col, cnt, xcnt, ycnt, x1off;
- long offset, y1off;
- float pt[4], xres, yres, ymax, zexag;
- int col_src, curcolor;
- gsurf_att *coloratt;
- G_debug(3, "gsd_wire_surf_map");
- buff = gs_get_att_typbuff(surf, ATT_TOPO, 0);
- cobuff = gs_get_att_typbuff(surf, ATT_COLOR, 0);
- gs_update_curmask(surf);
- check_mask = surf->curmask ? 1 : 0;
- /*
- checks ATT_TOPO & ATT_COLOR no_zero flags, make a mask from each,
- combine it/them with any current mask, put in typbuff:
- if(surf->att[ATT_TOPO].constant)
- */
- xmod = surf->x_modw;
- ymod = surf->y_modw;
- xres = xmod * surf->xres;
- yres = ymod * surf->yres;
- ymax = (surf->rows - 1) * surf->yres;
- xcnt = 1 + (surf->cols - 1) / xmod;
- ycnt = 1 + (surf->rows - 1) / ymod;
- gsd_pushmatrix();
- gsd_do_scale(1);
- gsd_translate(surf->x_trans, surf->y_trans, surf->z_trans);
- zexag = surf->z_exag;
- gsd_colormode(CM_COLOR);
- /* will need to check for color source of FUNC_ATT & NOTSET_ATT,
- or else use more general and inefficient gets */
- check_color = (surf->wire_color == WC_COLOR_ATT);
- if (check_color) {
- coloratt = &(surf->att[ATT_COLOR]);
- col_src = surf->att[ATT_COLOR].att_src;
- if (col_src != MAP_ATT) {
- if (col_src == CONST_ATT) {
- gsd_color_func((int)surf->att[ATT_COLOR].constant);
- }
- else {
- gsd_color_func(surf->wire_color);
- }
- check_color = 0;
- }
- }
- else {
- gsd_color_func(surf->wire_color);
- }
- /* would also be good to check if colormap == surfmap, to increase speed */
- for (row = 0; row < ycnt; row++) {
- pt[Y] = ymax - row * yres;
- y1off = row * ymod * surf->cols;
- gsd_bgnline();
- cnt = 0;
- for (col = 0; col < xcnt; col++) {
- pt[X] = col * xres;
- x1off = col * xmod;
- offset = x1off + y1off;
- if (check_mask) {
- if (BM_get(surf->curmask, col * xmod, row * ymod)) {
- gsd_endline();
- gsd_bgnline();
- cnt = 0;
- continue;
- }
- }
- GET_MAPATT(buff, offset, pt[Z]);
- if (check_color) {
- curcolor = gs_mapcolor(cobuff, coloratt, offset);
- gsd_color_func(curcolor);
- /* could use this & skip the GET if colordata == elevdata
- gsd_color_func(gs_fastmapcolor(cobuff, coloratt, offset,
- (int)pt[Z]));
- */
- }
- pt[Z] = pt[Z] * zexag;
- gsd_vert_func(pt);
- if (cnt == 255) {
- gsd_endline();
- gsd_bgnline();
- cnt = 0;
- gsd_vert_func(pt);
- }
- cnt++;
- }
- gsd_endline();
- }
- for (col = 0; col < xcnt; col++) {
- pt[X] = col * xres;
- x1off = col * xmod;
- gsd_bgnline();
- cnt = 0;
- for (row = 0; row < ycnt; row++) {
- pt[Y] = ymax - row * yres;
- y1off = row * ymod * surf->cols;
- offset = x1off + y1off;
- if (check_mask) {
- if (BM_get(surf->curmask, col * xmod, row * ymod)) {
- gsd_endline();
- gsd_bgnline();
- cnt = 0;
- continue;
- }
- }
- GET_MAPATT(buff, offset, pt[Z]);
- if (check_color) {
- curcolor = gs_mapcolor(cobuff, coloratt, offset);
- gsd_color_func(curcolor);
- /* could use this & skip the GET if colordata == elevdata
- gsd_color_func(gs_fastmapcolor(coloratt, offset, (int)pt[Z]));
- */
- }
- pt[Z] = pt[Z] * zexag;
- gsd_vert_func(pt);
- if (cnt == 255) {
- gsd_endline();
- gsd_bgnline();
- cnt = 0;
- gsd_vert_func(pt);
- }
- cnt++;
- }
- gsd_endline();
- }
- gsd_popmatrix();
- gsd_colormode(CM_DIFFUSE);
- return (1);
- }
- /*!
- \brief ADD
- \param surf surface (geosurf)
- \param k
- \return
- */
- int gsd_wire_surf_const(geosurf * surf, float k)
- {
- int do_diff, check_mask, check_color;
- int xmod, ymod, row, col, cnt, xcnt, ycnt, x1off;
- long offset, y1off;
- float pt[4], xres, yres, ymax, zexag;
- int col_src;
- gsurf_att *coloratt;
- typbuff *cobuff;
- G_debug(3, "gsd_wire_surf_const");
- cobuff = gs_get_att_typbuff(surf, ATT_COLOR, 0);
- gs_update_curmask(surf);
- check_mask = surf->curmask ? 1 : 0;
- do_diff = (NULL != gsdiff_get_SDref());
- xmod = surf->x_modw;
- ymod = surf->y_modw;
- xres = xmod * surf->xres;
- yres = ymod * surf->yres;
- xcnt = 1 + (surf->cols - 1) / xmod;
- ycnt = 1 + (surf->rows - 1) / ymod;
- ymax = (surf->rows - 1) * surf->yres;
- gsd_pushmatrix();
- gsd_do_scale(1);
- gsd_translate(surf->x_trans, surf->y_trans, surf->z_trans);
- zexag = surf->z_exag;
- gsd_colormode(CM_COLOR);
- /* will need to check for color source of FUNC_ATT & NOTSET_ATT,
- or else use more general and inefficient gets */
- check_color = (surf->wire_color == WC_COLOR_ATT);
- if (check_color) {
- coloratt = &(surf->att[ATT_COLOR]);
- col_src = surf->att[ATT_COLOR].att_src;
- if (col_src != MAP_ATT) {
- if (col_src == CONST_ATT) {
- gsd_color_func((int)surf->att[ATT_COLOR].constant);
- }
- else {
- gsd_color_func(surf->wire_color);
- }
- check_color = 0;
- }
- }
- else {
- gsd_color_func(surf->wire_color);
- }
- pt[Z] = k * zexag;
- for (row = 0; row < ycnt; row++) {
- pt[Y] = ymax - row * yres;
- y1off = row * ymod * surf->cols;
- gsd_bgnline();
- cnt = 0;
- for (col = 0; col < xcnt; col++) {
- pt[X] = col * xres;
- x1off = col * xmod;
- offset = x1off + y1off;
- if (check_mask) {
- if (BM_get(surf->curmask, col * xmod, row * ymod)) {
- gsd_endline();
- gsd_bgnline();
- cnt = 0;
- continue;
- }
- }
- if (check_color) {
- gsd_color_func(gs_mapcolor(cobuff, coloratt, offset));
- }
- if (do_diff) {
- pt[Z] = gsdiff_do_SD(k * zexag, offset);
- }
- gsd_vert_func(pt);
- if (cnt == 255) {
- gsd_endline();
- gsd_bgnline();
- cnt = 0;
- gsd_vert_func(pt);
- }
- cnt++;
- }
- gsd_endline();
- }
- for (col = 0; col < xcnt; col++) {
- pt[X] = col * xres;
- x1off = col * xmod;
- gsd_bgnline();
- cnt = 0;
- for (row = 0; row < ycnt; row++) {
- pt[Y] = ymax - row * yres;
- y1off = row * ymod * surf->cols;
- offset = x1off + y1off;
- if (check_mask) {
- if (BM_get(surf->curmask, col * xmod, row * ymod)) {
- gsd_endline();
- gsd_bgnline();
- cnt = 0;
- continue;
- }
- }
- if (check_color) {
- gsd_color_func(gs_mapcolor(cobuff, coloratt, offset));
- }
- if (do_diff) {
- pt[Z] = gsdiff_do_SD(k * zexag, offset);
- }
- gsd_vert_func(pt);
- if (cnt == 255) {
- gsd_endline();
- gsd_bgnline();
- cnt = 0;
- gsd_vert_func(pt);
- }
- cnt++;
- }
- gsd_endline();
- }
- gsd_popmatrix();
- gsd_colormode(CM_DIFFUSE);
- return (1);
- }
- /*!
- \brief ADD
- Not yet implemented.
- \param gs surface (geosurf)
- \param user_func user defined function
- \return 1
- */
- int gsd_wire_surf_func(geosurf * gs, int (*user_func) ())
- {
- return (1);
- }
- /*!
- \brief ADD
- Need to do Zexag scale of normal for arrow direction, drawing
- routine unexags z for arrow
- \param surf surface (geosurf)
- \return
- */
- int gsd_wire_arrows(geosurf * surf)
- {
- typbuff *buff, *cobuff;
- int check_mask, check_color;
- int xmod, ymod, row, col, xcnt, ycnt;
- long offset, y1off;
- float tx, ty, tz, sz;
- float n[3], pt[4], xres, yres, ymax, zexag;
- int col_src, curcolor;
- gsurf_att *coloratt;
- G_debug(3, "gsd_norm_arrows");
- /* avoid scaling by zero */
- GS_get_scale(&tx, &ty, &tz, 1);
- if (tz == 0.0) {
- return (0);
- }
- sz = GS_global_exag();
- gs_update_curmask(surf);
- check_mask = surf->curmask ? 1 : 0;
- /*
- checks ATT_TOPO & ATT_COLOR no_zero flags, make a mask from each,
- combine it/them with any current mask, put in surf->curmask:
- */
- check_color = 1;
- curcolor = 0;
- coloratt = &(surf->att[ATT_COLOR]);
- col_src = surf->att[ATT_COLOR].att_src;
- if (col_src != MAP_ATT) {
- if (col_src == CONST_ATT) {
- curcolor = (int)surf->att[ATT_COLOR].constant;
- }
- else {
- curcolor = surf->wire_color;
- }
- check_color = 0;
- }
- buff = gs_get_att_typbuff(surf, ATT_TOPO, 0);
- cobuff = gs_get_att_typbuff(surf, ATT_COLOR, 0);
- xmod = surf->x_modw;
- ymod = surf->y_modw;
- xres = xmod * surf->xres;
- yres = ymod * surf->yres;
- ymax = (surf->rows - 1) * surf->yres;
- xcnt = 1 + (surf->cols - 1) / xmod;
- ycnt = 1 + (surf->rows - 1) / ymod;
- gsd_pushmatrix();
- gsd_do_scale(1);
- gsd_translate(surf->x_trans, surf->y_trans, surf->z_trans);
- zexag = surf->z_exag;
- /* CURRENTLY ALWAYS 1.0 */
- gsd_colormode(CM_COLOR);
- for (row = 0; row < ycnt; row++) {
- pt[Y] = ymax - row * yres;
- y1off = row * ymod * surf->cols;
- for (col = 0; col < xcnt; col++) {
- pt[X] = col * xres;
- offset = col * xmod + y1off;
- if (check_mask) {
- if (BM_get(surf->curmask, col * xmod, row * ymod)) {
- continue;
- }
- }
- FNORM(surf->norms[offset], n);
- GET_MAPATT(buff, offset, pt[Z]);
- pt[Z] *= zexag;
- if (check_color) {
- curcolor = gs_mapcolor(cobuff, coloratt, offset);
- }
- gsd_arrow(pt, curcolor, xres * 2, n, sz, surf);
- } /* ea col */
- } /* ea row */
- gsd_popmatrix();
- gsd_colormode(CM_DIFFUSE);
- return (1);
- }
- /*!
- \brief Draw coarse surface
- New (TEST) wire routine that draws low res surface
- Based on new Trinagle Fan routine
- Resolution is a function of current surface resolution
- times wire resolution
- \todo normals have to be recalculated before proper low
- res surface can be drawn
- In window optimization has been removed
- \param surf surface (geosurf)
- \return
- */
- int gsd_coarse_surf_map(geosurf * surf)
- {
- int check_mask, check_color, check_transp;
- int check_material, check_emis, check_shin;
- typbuff *buff, *cobuff, *trbuff, *embuff, *shbuff;
- int xmod, ymod;
- int row, col, xcnt, ycnt;
- long y1off, y2off, y3off;
- long offset2[10];
- float pt2[10][2];
- int ii;
- float x1, x2, x3, y1, y2, y3, tx, ty, tz, ttr;
- float n[3], pt[4], xres, yres, ymax, zexag;
- int em_src, sh_src, trans_src, col_src, curcolor;
- gsurf_att *ematt, *shatt, *tratt, *coloratt;
- int datarow1, datacol1, datarow2, datacol2, datarow3, datacol3;
- float kem, ksh, pkem, pksh;
- unsigned int ktrans;
- int step_val = 2 * surf->x_modw; /* should always be factor of 2 for fan */
- int start_val = surf->x_modw;
- /* ensure normals are correct */
- gs_calc_normals(surf);
- /* avoid scaling by zero */
- GS_get_scale(&tx, &ty, &tz, 1);
- if (tz == 0.0) {
- return (gsd_surf_const(surf, 0.0));
- }
- /* else if (surf->z_exag == 0.0)
- {
- return(gsd_surf_const(surf, surf->z_min));
- }
- NOT YET IMPLEMENTED */
- buff = gs_get_att_typbuff(surf, ATT_TOPO, 0);
- cobuff = gs_get_att_typbuff(surf, ATT_COLOR, 0);
- gs_update_curmask(surf);
- check_mask = surf->curmask ? 1 : 0;
- /*
- checks ATT_TOPO & ATT_COLOR no_zero flags, make a mask from each,
- combine it/them with any current mask, put in surf->curmask:
- */
- xmod = surf->x_mod;
- ymod = surf->y_mod;
- xres = xmod * surf->xres;
- yres = ymod * surf->yres;
- ymax = (surf->rows - 1) * surf->yres;
- xcnt = VCOLS(surf);
- ycnt = VROWS(surf);
- gsd_pushmatrix();
- gsd_do_scale(1);
- gsd_translate(surf->x_trans, surf->y_trans, surf->z_trans);
- zexag = surf->z_exag;
- gsd_colormode(CM_DIFFUSE);
- /* CURRENTLY ALWAYS 1.0 */
- #ifdef CALC_AREA
- sz = GS_global_exag();
- #endif
- /* TODO: get rid of (define) these magic numbers scaling the attribute vals */
- check_transp = 0;
- tratt = &(surf->att[ATT_TRANSP]);
- ktrans = (255 << 24);
- trans_src = surf->att[ATT_TRANSP].att_src;
- if (CONST_ATT == trans_src && surf->att[ATT_TRANSP].constant != 0.0) {
- ktrans = (255 - (int)surf->att[ATT_TRANSP].constant) << 24;
- gsd_blend(1);
- gsd_zwritemask(0x0);
- }
- else if (MAP_ATT == trans_src) {
- trbuff = gs_get_att_typbuff(surf, ATT_TRANSP, 0);
- check_transp = trbuff ? 1 : 0;
- gsd_blend(1);
- gsd_zwritemask(0x0);
- }
- check_emis = 0;
- ematt = &(surf->att[ATT_EMIT]);
- kem = 0.0;
- pkem = 1.0;
- em_src = surf->att[ATT_EMIT].att_src;
- if (CONST_ATT == em_src) {
- kem = surf->att[ATT_EMIT].constant / 255.;
- }
- else if (MAP_ATT == em_src) {
- embuff = gs_get_att_typbuff(surf, ATT_EMIT, 0);
- check_emis = embuff ? 1 : 0;
- }
- check_shin = 0;
- shatt = &(surf->att[ATT_SHINE]);
- ksh = 0.0;
- pksh = 1.0;
- sh_src = surf->att[ATT_SHINE].att_src;
- if (CONST_ATT == sh_src) {
- ksh = surf->att[ATT_SHINE].constant / 255.;
- gsd_set_material(1, 0, ksh, kem, 0x0);
- }
- else if (MAP_ATT == sh_src) {
- shbuff = gs_get_att_typbuff(surf, ATT_SHINE, 0);
- check_shin = shbuff ? 1 : 0;
- }
- /* will need to check for color source of FUNC_ATT & NOTSET_ATT,
- or else use more general and inefficient gets */
- check_color = 1;
- curcolor = 0;
- coloratt = &(surf->att[ATT_COLOR]);
- col_src = surf->att[ATT_COLOR].att_src;
- if (col_src != MAP_ATT) {
- if (col_src == CONST_ATT) {
- curcolor = (int)surf->att[ATT_COLOR].constant;
- }
- else {
- curcolor = surf->wire_color;
- }
- check_color = 0;
- }
- check_material = (check_shin || check_emis || (kem && check_color));
- /* would also be good to check if colormap == surfmap, to increase speed */
- /* will also need to set check_transp, check_shine, etc & fix material */
- for (row = start_val; row <= ycnt - start_val; row += step_val) {
- datarow1 = row * ymod;
- datarow2 = (row - (step_val / 2)) * ymod;
- datarow3 = (row + (step_val / 2)) * ymod;
- y1 = ymax - row * yres;
- y2 = ymax - (row - (step_val / 2)) * yres;
- y3 = ymax - (row + (step_val / 2)) * yres;
- y1off = row * ymod * surf->cols;
- y2off = (row - (step_val / 2)) * ymod * surf->cols;
- y3off = (row + (step_val / 2)) * ymod * surf->cols;
- for (col = start_val; col <= xcnt - start_val; col += step_val) {
- datacol1 = col * xmod;
- datacol2 = (col - (step_val / 2)) * xmod;
- datacol3 = (col + (step_val / 2)) * xmod;
- x1 = col * xres;
- x2 = (col - (step_val / 2)) * xres;
- x3 = (col + (step_val / 2)) * xres;
- /* Do not need BM_get because GET_MAPATT calls
- * same and returns zero if masked
- */
- offset2[0] = y1off + datacol1; /* fan center */
- pt2[0][X] = x1;
- pt2[0][Y] = y1; /* fan center */
- pt[X] = pt2[0][X];
- pt[Y] = pt2[0][Y];
- if (!GET_MAPATT(buff, offset2[0], pt[Z]))
- continue; /* masked */
- pt[Z] *= zexag;
- offset2[1] = y2off + datacol2;
- offset2[2] = y2off + datacol1;
- offset2[3] = y2off + datacol3;
- offset2[4] = y1off + datacol3;
- offset2[5] = y3off + datacol3;
- offset2[6] = y3off + datacol1;
- offset2[7] = y3off + datacol2;
- offset2[8] = y1off + datacol2;
- offset2[9] = y2off + datacol2; /* repeat 1st corner to close */
- pt2[1][X] = x2;
- pt2[1][Y] = y2;
- pt2[2][X] = x1;
- pt2[2][Y] = y2;
- pt2[3][X] = x3;
- pt2[3][Y] = y2;
- pt2[4][X] = x3;
- pt2[4][Y] = y1;
- pt2[5][X] = x3;
- pt2[5][Y] = y3;
- pt2[6][X] = x1;
- pt2[6][Y] = y3;
- pt2[7][X] = x2;
- pt2[7][Y] = y3;
- pt2[8][X] = x2;
- pt2[8][Y] = y1;
- pt2[9][X] = x2;
- pt2[9][Y] = y2; /* repeat 1st corner to close */
- /* Run through triangle fan */
- gsd_bgntfan();
- for (ii = 0; ii < 10; ii++) {
- if (ii > 0) {
- pt[X] = pt2[ii][X];
- pt[Y] = pt2[ii][Y];
- if (!GET_MAPATT(buff, offset2[ii], pt[Z]))
- continue;
- pt[Z] *= zexag;
- }
- FNORM(surf->norms[offset2[ii]], n);
- if (check_color)
- curcolor = gs_mapcolor(cobuff, coloratt, offset2[ii]);
- if (check_transp) {
- GET_MAPATT(trbuff, offset2[ii], ttr);
- ktrans = (char)SCALE_ATT(tratt, ttr, 0, 255);
- ktrans = (char)(255 - ktrans) << 24;
- }
- if (check_material) {
- if (check_emis) {
- GET_MAPATT(embuff, offset2[ii], kem);
- kem = SCALE_ATT(ematt, kem, 0., 1.);
- }
- if (check_shin) {
- GET_MAPATT(shbuff, offset2[ii], ksh);
- ksh = SCALE_ATT(shatt, ksh, 0., 1.);
- }
- if (pksh != ksh || pkem != kem || (kem && check_color)) {
- pksh = ksh;
- pkem = kem;
- gsd_set_material(check_shin, check_emis,
- ksh, kem, curcolor);
- }
- }
- gsd_litvert_func(n, ktrans | curcolor, pt);
- } /* close ii loop */
- gsd_endtfan();
- } /* end col */
- } /* end row */
- gsd_popmatrix();
- /*
- gsd_colormode(CM_DIFFUSE);
- */
- gsd_blend(0);
- gsd_zwritemask(0xffffffff);
- return (0);
- }
|