Changeset 377
- Timestamp:
- Mar 25, 2006, 12:37:21 PM (19 years ago)
- Location:
- trunk/gui/vizservers/nanovis
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/vizservers/nanovis/Makefile
r373 r377 1 1 OBJ_NANOVIS = nanovis.o Socket.o RenderVertexArray.o Plane.o ConvexPolygon.o Vector4.o Vector3.o Mat4x4.o \ 2 Texture1D.o Texture3D.o ColorMap.o Volume.o Texture2D.o ParticleSystem.o Sphere.o Color.o 2 Texture1D.o Texture3D.o ColorMap.o Volume.o Texture2D.o ParticleSystem.o Sphere.o Color.o \ 3 PerfQuery.o 3 4 4 5 AUXSRC = config.h define.h global.h … … 67 68 gcc $(CFLAG) ConvexPolygon.cpp 68 69 70 PerfQuery.o: PerfQuery.cpp 71 gcc $(CFLAG) PerfQuery.cpp 72 69 73 nanovis.o: nanovis.h nanovis.cpp ParticleSystem.o $(AUXSRC) 70 74 gcc $(CFLAG) nanovis.cpp -
trunk/gui/vizservers/nanovis/global.h
r273 r377 56 56 } 57 57 58 59 //query opengl information 60 static void system_info(){ 61 fprintf(stderr, "-----------------------------------------------------------\n"); 62 fprintf(stderr, "OpenGL driver: %s %s\n", glGetString(GL_VENDOR), glGetString(GL_VERSION)); 63 fprintf(stderr, "Graphics hardware: %s\n", glGetString(GL_RENDERER)); 64 fprintf(stderr, "-----------------------------------------------------------\n"); 65 } 66 67 58 68 #endif -
trunk/gui/vizservers/nanovis/nanovis.cpp
r375 r377 38 38 ColorMap* colormap[MAX_N_VOLUMES]; //transfer functions, currently handle up to 10 colormaps 39 39 40 PerfQuery* perf; //perfromance counter 40 41 41 42 //Nvidia CG shaders and their parameters … … 633 634 void initGL(void) 634 635 { 636 system_info(); 635 637 init_glew(); 636 638 … … 667 669 } 668 670 669 //init_vector_field(); //3d vector field 670 load_volume_file(0, "./data/A-apbs-2-out-potential-PE0.dx"); 671 //check if performance query is supported 672 if(check_query_support()){ 673 //create queries to count number of rendered pixels 674 perf = new PerfQuery(); 675 } 676 677 init_vector_field(); //3d vector field 678 //load_volume_file(0, "./data/A-apbs-2-out-potential-PE0.dx"); 671 679 //load_volume_file(0, "./data/nw-AB-Vg=0.000-Vd=1.000-potential.dx"); 672 680 //load_volume_file(0, "./data/test2.dx"); … … 1287 1295 1288 1296 get_near_far_z(mv, zNear, zFar); 1289 fprintf(stderr, "zNear:%f, zFar:%f\n", zNear, zFar);1290 fflush(stderr);1297 //fprintf(stderr, "zNear:%f, zFar:%f\n", zNear, zFar); 1298 //fflush(stderr); 1291 1299 1292 1300 //compute actual rendering slices 1293 1301 float z_step = fabs(zNear-zFar)/n_slices; 1294 1302 int n_actual_slices = (int)(fabs(zNear-zFar)/z_step + 1); 1295 fprintf(stderr, "slices: %d\n", n_actual_slices);1296 fflush(stderr);1303 //fprintf(stderr, "slices: %d\n", n_actual_slices); 1304 //fflush(stderr); 1297 1305 1298 1306 static ConvexPolygon staticPoly; … … 1559 1567 //psys->display_vertices(); 1560 1568 1561 //render volume1569 //render multiple volumes 1562 1570 //volume[0]->location =Vector3(0.,0.,0.); 1563 1571 //render_volume(0, 256); … … 1565 1573 //render another but shifted using the same texture 1566 1574 volume[0]->location =Vector3(-0.5,-0.5,-0.5); 1575 1576 perf->enable(); 1567 1577 render_volume(0, 256); 1578 perf->disable(); 1579 fprintf(stderr, "pixels: %d\n", perf->get_pixel_count()); 1580 perf->reset(); 1568 1581 1569 1582 glDisable(GL_DEPTH_TEST); -
trunk/gui/vizservers/nanovis/nanovis.h
r374 r377 40 40 #include "Volume.h" 41 41 #include "ParticleSystem.h" 42 #include "PerfQuery.h" 42 43 43 44 #include "config.h" -
trunk/gui/vizservers/nanovis/shaders/one_volume.cg
r374 r377 25 25 float4 tex_coord = mul(modelViewInv, IN.TexCoord); 26 26 27 #if 127 #if 0 28 28 //1 component 29 29 float sample = tex3D(volume, tex_coord.xyz); … … 37 37 38 38 39 #if 039 #if 1 40 40 //3 component 41 41 float3 sample = tex3D(volume, tex_coord.xyz).xyz;
Note: See TracChangeset
for help on using the changeset viewer.