Changeset 825 for trunk/vizservers
- Timestamp:
- Dec 11, 2007, 8:35:26 PM (17 years ago)
- Location:
- trunk/vizservers/nanovis
- Files:
-
- 5 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/vizservers/nanovis/Makefile.in
r821 r825 41 41 NvEventLog.o NvParticleRenderer.o NvLIC.o NvZincBlendeReconstructor.o NvStdVertexShader.o \ 42 42 ContourLineFilter.o HeightMap.o Grid.o \ 43 PointShader.o PCASplit.o BucketSort.o \43 PointShader.o PCASplit.o BucketSort.o PointSetRenderer.o \ 44 44 bandmat.o cholesky.o evalue.o fft.o hholder.o jacobi.o myexcept.o newfft.o newmat1.o newmat2.o \ 45 45 newmat3.o newmat4.o newmat5.o newmat6.o newmat7.o newmat8.o newmat9.o newmatex.o newmatnl.o \ 46 46 newmatrm.o nm_misc.o solution.o sort.o svd.o submat.o \ 47 Image.o ImageLoader.o ImageLoaderImpl.o BMPImageLoaderImpl.o ImageLoaderFactory.o \ 47 48 R2string.o R2FilePath.o R2Fonts.o R2Object.o R2Geometry.o R2IndexBuffer.o R2VertexBuffer.o 48 49 … … 152 153 PCASplit.o: PCASplit.cpp PCASplit.h 153 154 BucketSort.o: BucketSort.cpp BucketSort.h 155 PointSetRenderer.o: PointSetRenderer.cpp PointSetRenderer.h 154 156 bandmat.o: newmat11/bandmat.cpp 155 157 $(CC) $(CFLAGS) -o $@ -c $< … … 203 205 $(CC) $(CFLAGS) -o $@ -c $< 204 206 207 Image.o: imgLoaders/Image.cpp 208 $(CC) $(CFLAGS) -o $@ -c $< 209 ImageLoader.o: imgLoaders/ImageLoader.cpp 210 $(CC) $(CFLAGS) -o $@ -c $< 211 ImageLoaderImpl.o: imgLoaders/ImageLoaderImpl.cpp 212 $(CC) $(CFLAGS) -o $@ -c $< 213 BMPImageLoaderImpl.o: imgLoaders/BMPImageLoaderImpl.cpp 214 $(CC) $(CFLAGS) -o $@ -c $< 215 ImageLoaderFactory.o: imgLoaders/ImageLoaderFactory.cpp 216 $(CC) $(CFLAGS) -o $@ -c $< 217 205 218 nanovis.o: nanovis.cpp nanovis.h $(AUXSRC) -
trunk/vizservers/nanovis/Nv.cpp
r776 r825 10 10 #include <stdlib.h> 11 11 #include <assert.h> 12 #include <imgLoaders/BMPImageLoaderImpl.h> 13 #include <imgLoaders/ImageLoaderFactory.h> 14 #include "PointSetRenderer.h" 12 15 13 16 extern void NvInitCG(); // in NvShader.cpp … … 15 18 NvParticleRenderer* g_particleRenderer; 16 19 NvColorTableRenderer* g_color_table_renderer; 20 PointSetRenderer* g_pointset_renderer; 17 21 VolumeRenderer* g_vol_render; 18 22 R2Fonts* g_fonts; 19 23 Grid* g_grid; 24 20 25 21 26 //query opengl information … … 55 60 fprintf(stdout, "Status: Using GLEW %s\n", glewGetString(GLEW_VERSION)); 56 61 } 62 63 //init line integral convolution 64 57 65 58 66 //init line integral convolution … … 121 129 } 122 130 131 void NvInitPointSetRenderer() 132 { 133 g_pointset_renderer = new PointSetRenderer(); 134 } 135 123 136 void NvInit(char* path) 124 137 { … … 138 151 // INSOO 139 152 //g_color_table_renderer->setFonts(g_fonts); 153 // 154 155 ImageLoaderFactory::getInstance()->addLoaderImpl("bmp", new BMPImageLoaderImpl()); 140 156 141 157 g_grid = new Grid(); … … 143 159 144 160 NvInitVolumeRenderer(); 161 NvInitPointSetRenderer(); 145 162 NvInitParticleRenderer(); 146 163 -
trunk/vizservers/nanovis/PCASplit.cpp
r821 r825 122 122 123 123 printf("Cluster created %d [in level %d]:total %d\n", count, level, cc); 124 fflush(stdout); 124 125 125 126 int i = 0; … … 333 334 float(rand()) / RAND_MAX, float(rand()) / RAND_MAX, float(rand()) / RAND_MAX, 334 335 0.2); 336 337 printf("CLUSTER points : %d\n", node->data->numOfPoints_t); 338 fflush(stdout); 335 339 336 340 points[i].position = node->data->centroid_t; -
trunk/vizservers/nanovis/PCASplit.h
r821 r825 15 15 Vector4 color; 16 16 float size; 17 float value; 17 18 public : 18 19 Point() : size(1.0f) {} -
trunk/vizservers/nanovis/PointShader.cpp
r821 r825 17 17 18 18 } 19 else 20 { 21 printf("point shader loaded...\n"); 22 fflush(stdout); 23 } 19 24 20 25 this->loadVertexProgram(path, "main"); -
trunk/vizservers/nanovis/PointShader.h
r821 r825 27 27 void setScale(float scale); 28 28 void setNormalTexture(Texture3D* n); 29 void bind(); 30 void unbind(); 29 31 }; 30 32 … … 39 41 } 40 42 43 inline void PointShader::bind() 44 { 45 setParameters(); 46 47 if (_cgVP) 48 { 49 cgGLBindProgram(_cgVP); 50 cgGLEnableProfile((CGprofile) CG_PROFILE_VP30); 51 } 52 if (_cgFP) 53 { 54 cgGLBindProgram(_cgFP); 55 cgGLEnableProfile((CGprofile) CG_PROFILE_FP30); 56 } 57 } 58 59 inline void PointShader::unbind() 60 { 61 if (_cgVP) 62 { 63 cgGLDisableProfile((CGprofile)CG_PROFILE_VP30 ); 64 } 65 66 if (_cgFP) 67 { 68 cgGLDisableProfile((CGprofile)CG_PROFILE_FP30 ); 69 } 70 71 resetParameters(); 72 } 73 41 74 #endif // __POINTSHADER_H__ -
trunk/vizservers/nanovis/Texture2D.cpp
r432 r825 94 94 } 95 95 } 96 else 97 { 98 int comp[5] = { -1, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, GL_RGBA }; 99 glTexImage2D(GL_TEXTURE_2D, 0, comp[n_components], width, height, 0, GL_RGBA, type, data); 100 } 96 101 97 102 assert(glGetError()==0); -
trunk/vizservers/nanovis/VolumeRenderer.cpp
r821 r825 112 112 void VolumeRenderer::render_all_points() 113 113 { 114 /* 114 115 double x0 = 0; 115 116 double y0 = 0; … … 137 138 glPopMatrix(); 138 139 } 140 */ 139 141 } 140 142 -
trunk/vizservers/nanovis/nanovis.cpp
r821 r825 29 29 30 30 #include "Nv.h" 31 #include "PointSetRenderer.h" 32 #include "PointSet.h" 31 33 32 34 #include "nanovis.h" … … 60 62 61 63 extern VolumeRenderer* g_vol_render; 64 extern PointSetRenderer* g_pointset_renderer; 62 65 extern NvColorTableRenderer* g_color_table_renderer; 63 66 extern Grid* g_grid; … … 149 152 150 153 vector<HeightMap*> g_heightMap; 154 vector<PointSet*> g_pointSet; 151 155 152 156 // maps transfunc name to TransferFunction object … … 914 918 } 915 919 } 920 /* 921 else if (!strcmp(header, "<FET>")) 922 { 923 printf("FET loading...\n"); 924 fflush(stdout); 925 std::stringstream fdata; 926 fdata.write(buf.bytes(),buf.size()); 927 //err = load_volume_stream3(n, fdata); 928 929 if (err) { 930 Tcl_AppendResult(interp, err.remark().c_str(), (char*)NULL); 931 return TCL_ERROR; 932 } 933 } 934 */ 916 935 else 917 936 { … … 1437 1456 "\": should be data, outline, shading, or state", (char*)NULL); 1438 1457 return TCL_ERROR; 1458 } 1459 1460 int TestCmd _ANSI_ARGS_((ClientData cdata, Tcl_Interp *interp, int argc, CONST84 char *argv[])) 1461 { 1462 std::ifstream fin; 1463 fin.open("/home/nanohub/vrinside/nv/data/fet/graph-finfet.txt", std::ios::binary); 1464 //std::stringstream fdata(std::ios_base::out|std::ios_base::in|std::ios_base::binary); 1465 1466 if (!fin) 1467 { 1468 printf("file not found\n"); 1469 return TCL_OK; 1470 } 1471 1472 float temp1, temp2, temp3; 1473 float vmin, vmax; 1474 int count; 1475 char* start; 1476 1477 char line[128]; 1478 char temp[24]; 1479 float dx, dy, dz; 1480 float x0, y0, z0; 1481 do { 1482 fin.getline(line,sizeof(line)-1); 1483 1484 // skip leading blanks 1485 for (start=&line[0]; *start == ' ' || *start == '\t'; start++); 1486 1487 if (*start != '#') 1488 { 1489 sscanf(start, "%s%f%f%f", temp, &temp1, &temp2, &temp3); 1490 if (!strcmp(temp, "size")) 1491 { 1492 dx = temp1; 1493 dy = temp2; 1494 dz = temp3; 1495 } 1496 else if (!strcmp(temp, "size")) 1497 { 1498 x0 = temp1; 1499 y0 = temp2; 1500 z0 = temp3; 1501 } 1502 else if (!strcmp(temp, "minmax")) 1503 { 1504 vmin = temp1; 1505 vmax = temp2; 1506 } 1507 else if (!strcmp(temp, "count")) 1508 { 1509 count = temp1; 1510 } 1511 else if (!strcmp(temp, "</FET>")) 1512 { 1513 break; 1514 } 1515 } 1516 } while (!fin.eof()); 1517 1518 printf("data count %d \n", count); 1519 fflush(stdout); 1520 1521 Vector4* data = new Vector4[count]; 1522 memset(data, 0, sizeof(Vector4) * count); 1523 float min = 1e21, max = 1e-21; 1524 for (int i = 0; i < count; ++i) 1525 { 1526 fin.getline(line,sizeof(line)-1); 1527 sscanf(line, "%f%f%f%f", &data[i].x, &data[i].y, &data[i].z, &data[i].w); 1528 1529 if (data[i].w < min) min = data[i].w; 1530 if (data[i].w > max) max = data[i].w; 1531 } 1532 1533 float d = max - min; 1534 for (int i = 0; i < count; ++i) 1535 { 1536 data[i].w = (data[i].w - min) / d; 1537 } 1538 1539 PointSet* newPointSet = new PointSet(); 1540 newPointSet->initialize(data, count); 1541 newPointSet->setVisible(true); 1542 g_pointSet.push_back(newPointSet); 1543 1544 return TCL_OK; 1439 1545 } 1440 1546 … … 2342 2448 return result.error(mesg); 2343 2449 } 2450 break; 2451 } 2452 } 2453 } while (!fin.eof()); 2454 2455 // read data points 2456 if (!fin.eof()) { 2457 if (isrect) { 2458 Rappture::Mesh1D xgrid(x0, x0+nx*dx, nx); 2459 Rappture::Mesh1D ygrid(y0, y0+ny*dy, ny); 2460 Rappture::Mesh1D zgrid(z0, z0+nz*dz, nz); 2461 Rappture::FieldRect3D field(xgrid, ygrid, zgrid); 2462 2463 double dval[6]; 2464 int nread = 0; 2465 int ix = 0; 2466 int iy = 0; 2467 int iz = 0; 2468 while (!fin.eof() && nread < npts) { 2469 fin.getline(line,sizeof(line)-1); 2470 int n = sscanf(line, "%lg %lg %lg %lg %lg %lg", &dval[0], &dval[1], &dval[2], &dval[3], &dval[4], &dval[5]); 2471 2472 for (int p=0; p < n; p++) { 2473 int nindex = iz*nx*ny + iy*nx + ix; 2474 field.define(nindex, dval[p]); 2475 nread++; 2476 if (++iz >= nz) { 2477 iz = 0; 2478 if (++iy >= ny) { 2479 iy = 0; 2480 ++ix; 2481 } 2482 } 2483 } 2484 } 2485 2486 // make sure that we read all of the expected points 2487 if (nread != nx*ny*nz) { 2488 char mesg[256]; 2489 sprintf(mesg,"inconsistent data: expected %d points but found %d points", nx*ny*nz, nread); 2490 result.error(mesg); 2491 return result; 2492 } 2493 2494 // figure out a good mesh spacing 2495 int nsample = 30; 2496 dx = field.rangeMax(Rappture::xaxis) - field.rangeMin(Rappture::xaxis); 2497 dy = field.rangeMax(Rappture::yaxis) - field.rangeMin(Rappture::yaxis); 2498 dz = field.rangeMax(Rappture::zaxis) - field.rangeMin(Rappture::zaxis); 2499 double dmin = pow((dx*dy*dz)/(nsample*nsample*nsample), 0.333); 2500 2501 nx = (int)ceil(dx/dmin); 2502 ny = (int)ceil(dy/dmin); 2503 nz = (int)ceil(dz/dmin); 2504 2505 #ifndef NV40 2506 // must be an even power of 2 for older cards 2507 nx = (int)pow(2.0, ceil(log10((double)nx)/log10(2.0))); 2508 ny = (int)pow(2.0, ceil(log10((double)ny)/log10(2.0))); 2509 nz = (int)pow(2.0, ceil(log10((double)nz)/log10(2.0))); 2510 #endif 2511 2512 float *data = new float[4*nx*ny*nz]; 2513 2514 double vmin = field.valueMin(); 2515 double dv = field.valueMax() - field.valueMin(); 2516 if (dv == 0.0) { dv = 1.0; } 2517 2518 // generate the uniformly sampled data that we need for a volume 2519 int ngen = 0; 2520 double nzero_min = 0.0; 2521 for (int iz=0; iz < nz; iz++) { 2522 double zval = z0 + iz*dmin; 2523 for (int iy=0; iy < ny; iy++) { 2524 double yval = y0 + iy*dmin; 2525 for (int ix=0; ix < nx; ix++) { 2526 double xval = x0 + ix*dmin; 2527 double v = field.value(xval,yval,zval); 2528 2529 if (v != 0.0f && v < nzero_min) 2530 { 2531 nzero_min = v; 2532 } 2533 2534 // scale all values [0-1], -1 => out of bounds 2535 v = (isnan(v)) ? -1.0 : (v - vmin)/dv; 2536 2537 data[ngen] = v; 2538 ngen += 4; 2539 } 2540 } 2541 } 2542 2543 // Compute the gradient of this data. BE CAREFUL: center 2544 // calculation on each node to avoid skew in either direction. 2545 ngen = 0; 2546 for (int iz=0; iz < nz; iz++) { 2547 for (int iy=0; iy < ny; iy++) { 2548 for (int ix=0; ix < nx; ix++) { 2549 // gradient in x-direction 2550 double valm1 = (ix == 0) ? 0.0 : data[ngen-4]; 2551 double valp1 = (ix == nx-1) ? 0.0 : data[ngen+4]; 2552 if (valm1 < 0 || valp1 < 0) { 2553 data[ngen+1] = 0.0; 2554 } else { 2555 data[ngen+1] = ((valp1-valm1) + 1) * 0.5; // assume dx=1 2556 } 2557 2558 // gradient in y-direction 2559 valm1 = (iy == 0) ? 0.0 : data[ngen-4*nx]; 2560 valp1 = (iy == ny-1) ? 0.0 : data[ngen+4*nx]; 2561 if (valm1 < 0 || valp1 < 0) { 2562 data[ngen+2] = 0.0; 2563 } else { 2564 //data[ngen+2] = valp1-valm1; // assume dy=1 2565 data[ngen+2] = ((valp1-valm1) + 1) * 0.5; // assume dx=1 2566 } 2567 2568 // gradient in z-direction 2569 valm1 = (iz == 0) ? 0.0 : data[ngen-4*nx*ny]; 2570 valp1 = (iz == nz-1) ? 0.0 : data[ngen+4*nx*ny]; 2571 if (valm1 < 0 || valp1 < 0) { 2572 data[ngen+3] = 0.0; 2573 } else { 2574 //data[ngen+3] = valp1-valm1; // assume dz=1 2575 data[ngen+3] = ((valp1-valm1) + 1) * 0.5; // assume dz=1 2576 } 2577 2578 ngen += 4; 2579 } 2580 } 2581 } 2582 2583 load_volume(index, nx, ny, nz, 4, data, 2584 field.valueMin(), field.valueMax(), nzero_min); 2585 2586 delete [] data; 2587 2588 } else { 2589 Rappture::Mesh1D zgrid(z0, z0+nz*dz, nz); 2590 Rappture::FieldPrism3D field(xymesh, zgrid); 2591 2592 double dval; 2593 int nread = 0; 2594 int ixy = 0; 2595 int iz = 0; 2596 while (!fin.eof() && nread < npts) { 2597 if (!(fin >> dval).fail()) { 2598 int nid = nxy*iz + ixy; 2599 field.define(nid, dval); 2600 2601 nread++; 2602 if (++iz >= nz) { 2603 iz = 0; 2604 ixy++; 2605 } 2606 } 2607 } 2608 2609 // make sure that we read all of the expected points 2610 if (nread != nxy*nz) { 2611 char mesg[256]; 2612 sprintf(mesg,"inconsistent data: expected %d points but found %d points", nxy*nz, nread); 2613 return result.error(mesg); 2614 } 2615 2616 // figure out a good mesh spacing 2617 int nsample = 30; 2618 x0 = field.rangeMin(Rappture::xaxis); 2619 dx = field.rangeMax(Rappture::xaxis) - field.rangeMin(Rappture::xaxis); 2620 y0 = field.rangeMin(Rappture::yaxis); 2621 dy = field.rangeMax(Rappture::yaxis) - field.rangeMin(Rappture::yaxis); 2622 z0 = field.rangeMin(Rappture::zaxis); 2623 dz = field.rangeMax(Rappture::zaxis) - field.rangeMin(Rappture::zaxis); 2624 double dmin = pow((dx*dy*dz)/(nsample*nsample*nsample), 0.333); 2625 2626 nx = (int)ceil(dx/dmin); 2627 ny = (int)ceil(dy/dmin); 2628 nz = (int)ceil(dz/dmin); 2629 #ifndef NV40 2630 // must be an even power of 2 for older cards 2631 nx = (int)pow(2.0, ceil(log10((double)nx)/log10(2.0))); 2632 ny = (int)pow(2.0, ceil(log10((double)ny)/log10(2.0))); 2633 nz = (int)pow(2.0, ceil(log10((double)nz)/log10(2.0))); 2634 #endif 2635 float *data = new float[4*nx*ny*nz]; 2636 2637 double vmin = field.valueMin(); 2638 double dv = field.valueMax() - field.valueMin(); 2639 if (dv == 0.0) { dv = 1.0; } 2640 2641 // generate the uniformly sampled data that we need for a volume 2642 int ngen = 0; 2643 double nzero_min = 0.0; 2644 for (iz=0; iz < nz; iz++) { 2645 double zval = z0 + iz*dmin; 2646 for (int iy=0; iy < ny; iy++) { 2647 double yval = y0 + iy*dmin; 2648 for (int ix=0; ix < nx; ix++) { 2649 double xval = x0 + ix*dmin; 2650 double v = field.value(xval,yval,zval); 2651 2652 if (v != 0.0f && v < nzero_min) 2653 { 2654 nzero_min = v; 2655 } 2656 // scale all values [0-1], -1 => out of bounds 2657 v = (isnan(v)) ? -1.0 : (v - vmin)/dv; 2658 data[ngen] = v; 2659 2660 ngen += 4; 2661 } 2662 } 2663 } 2664 2665 // Compute the gradient of this data. BE CAREFUL: center 2666 // calculation on each node to avoid skew in either direction. 2667 ngen = 0; 2668 for (int iz=0; iz < nz; iz++) { 2669 for (int iy=0; iy < ny; iy++) { 2670 for (int ix=0; ix < nx; ix++) { 2671 // gradient in x-direction 2672 double valm1 = (ix == 0) ? 0.0 : data[ngen-1]; 2673 double valp1 = (ix == nx-1) ? 0.0 : data[ngen+1]; 2674 if (valm1 < 0 || valp1 < 0) { 2675 data[ngen+1] = 0.0; 2676 } else { 2677 //data[ngen+1] = valp1-valm1; // assume dx=1 2678 data[ngen+1] = ((valp1-valm1) + 1) * 0.5; // assume dx=1 2679 } 2680 2681 // gradient in y-direction 2682 valm1 = (iy == 0) ? 0.0 : data[ngen-4*nx]; 2683 valp1 = (iy == ny-1) ? 0.0 : data[ngen+4*nx]; 2684 if (valm1 < 0 || valp1 < 0) { 2685 data[ngen+2] = 0.0; 2686 } else { 2687 //data[ngen+2] = valp1-valm1; // assume dy=1 2688 data[ngen+2] = ((valp1-valm1) + 1) * 0.5; // assume dy=1 2689 } 2690 2691 // gradient in z-direction 2692 valm1 = (iz == 0) ? 0.0 : data[ngen-4*nx*ny]; 2693 valp1 = (iz == nz-1) ? 0.0 : data[ngen+4*nx*ny]; 2694 if (valm1 < 0 || valp1 < 0) { 2695 data[ngen+3] = 0.0; 2696 } else { 2697 //data[ngen+3] = valp1-valm1; // assume dz=1 2698 data[ngen+3] = ((valp1-valm1) + 1) * 0.5; // assume dz=1 2699 } 2700 2701 ngen += 4; 2702 } 2703 } 2704 } 2705 2706 load_volume(index, nx, ny, nz, 4, data, 2707 field.valueMin(), field.valueMax(), nzero_min); 2708 2709 delete [] data; 2710 } 2711 } else { 2712 return result.error("data not found in stream"); 2713 } 2714 2715 // 2716 // Center this new volume on the origin. 2717 // 2718 float dx0 = -0.5; 2719 float dy0 = -0.5*dy/dx; 2720 float dz0 = -0.5*dz/dx; 2721 volume[index]->move(Vector3(dx0, dy0, dz0)); 2722 2723 return result; 2724 } 2725 2726 Rappture::Outcome 2727 load_volume_stream3(int index, std::iostream& fin) 2728 { 2729 Rappture::Outcome result; 2730 2731 Rappture::MeshTri2D xymesh; 2732 int dummy, nx, ny, nz, nxy, npts; 2733 double x0, y0, z0, dx, dy, dz, ddx, ddy, ddz; 2734 char line[128], type[128], *start; 2735 2736 int isrect = 1; 2737 2738 float temp1, temp2, temp3; 2739 float vmin, vmax; 2740 int count; 2741 2742 char temp[24]; 2743 do { 2744 fin.getline(line,sizeof(line)-1); 2745 2746 // skip leading blanks 2747 for (start=&line[0]; *start == ' ' || *start == '\t'; start++); 2748 2749 if (*start != '#') 2750 { 2751 sscanf(start, "%s%f%f%f", temp, &temp1, &temp2, &temp3); 2752 if (!strcmp(temp, "size")) 2753 { 2754 dx = temp1; 2755 dy = temp2; 2756 dz = temp3; 2757 } 2758 else if (!strcmp(temp, "size")) 2759 { 2760 x0 = temp1; 2761 y0 = temp2; 2762 z0 = temp3; 2763 } 2764 else if (!strcmp(temp, "minmax")) 2765 { 2766 vmin = temp1; 2767 vmax = temp2; 2768 } 2769 else if (!strcmp(temp, "count")) 2770 { 2771 count = temp1; 2772 } 2773 else if (!strcmp(temp, "<FET>")) 2774 { 2344 2775 break; 2345 2776 } … … 2891 3322 g_vol_render = new VolumeRenderer(); 2892 3323 2893 2894 3324 /* 2895 3325 //I added this to debug : Wei … … 2906 3336 */ 2907 3337 2908 2909 3338 //create an 2D plane renderer 2910 3339 plane_render = new PlaneRenderer(g_context, win_width, win_height); … … 2921 3350 2922 3351 2923 void initTcl(){ 3352 void initTcl() 3353 { 2924 3354 interp = Tcl_CreateInterp(); 2925 3355 Tcl_MakeSafe(interp); … … 2966 3396 // get screenshot 2967 3397 Tcl_CreateCommand(interp, "screenshot", ScreenShotCmd, 3398 (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL); 3399 3400 Tcl_CreateCommand(interp, "test", TestCmd, 2968 3401 (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL); 2969 3402 … … 3726 4159 } 3727 4160 4161 glPushMatrix(); 3728 4162 //now render things in the scene 3729 4163 if (axis_on) … … 3746 4180 3747 4181 perf->enable(); 3748 //g_vol_render->render_all();3749 g_vol_render->render_all_points(); 4182 g_vol_render->render_all(); 4183 3750 4184 perf->disable(); 3751 4185 … … 3754 4188 if (g_heightMap[ii]->isVisible()) 3755 4189 g_heightMap[ii]->render(); 4190 } 4191 4192 glPopMatrix(); 4193 4194 float mat[16]; 4195 glGetFloatv(GL_MODELVIEW_MATRIX, mat); 4196 4197 for (int i = 0; i < g_pointSet.size(); ++i) 4198 { 4199 if (g_pointSet[i]->isVisible()) 4200 { 4201 g_pointset_renderer->render(g_pointSet[i]->getCluster(), mat, g_pointSet[i]->getSortLevel()); 4202 } 3756 4203 } 3757 4204
Note: See TracChangeset
for help on using the changeset viewer.