Changeset 1163 for trunk/packages
- Timestamp:
- Sep 24, 2008, 10:07:23 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/Command.cpp
r1161 r1163 2619 2619 2620 2620 2621 2622 int2623 NanoVis::render_2d_contour(HeightMap* heightmap, int width, int height)2624 {2625 int old_width = win_width;2626 int old_height = win_height;2627 2628 resize_offscreen_buffer(width, height);2629 2630 /* plane_render->set_screen_size(width, height);2631 2632 // generate data for the legend2633 float data[512];2634 for (int i=0; i < 256; i++) {2635 data[i] = data[i+256] = (float)(i/255.0);2636 }2637 plane[0] = new Texture2D(256, 2, GL_FLOAT, GL_LINEAR, 1, data);2638 int index = plane_render->add_plane(plane[0], tf);2639 plane_render->set_active_plane(index);2640 2641 offscreen_buffer_capture();2642 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //clear screen2643 2644 //plane_render->render();2645 // INSOO : is going to implement here for the topview of the heightmap2646 heightmap->render(renderContext);2647 2648 // INSOO2649 glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, screen_buffer);2650 //glReadPixels(0, 0, width, height, GL_BGR, GL_UNSIGNED_BYTE, screen_buffer); // INSOO's2651 */2652 2653 2654 // HELP ME2655 // GEORGE2656 // I am not sure what I should do2657 //char prefix[200];2658 //sprintf(prefix, "nv>height_top_view %s %g %g", volArg, min, max);2659 //ppm_write(prefix);2660 //write(0, "\n", 1);2661 2662 2663 2664 2665 //plane_render->remove_plane(index);2666 2667 resize_offscreen_buffer(old_width, old_height);2668 2669 return TCL_OK;2670 }2671
Note: See TracChangeset
for help on using the changeset viewer.