DiscussionsIssue archiveOCCT:Visualization

Archived issue #0021902

Improve by capability to make off-screen snapshots of 2d, 3d, and axo viewers

Open CASCADEOCCT:Visualizationclosed0 public notes

Search issues

Description

One of existing drawbacks of test system used for certification of OCCT is
necessiry to run tests on dedicated workstation, since snapshots of 3d viewer
can be made only from existing GUI window shown on the screen. This makes
workstation running this kind of tests unusable for normal work
(due to regularly popping windows), and impossibility to run several tests in
parallel (as windows overlap each others and overlapped fragments get to
snapshot).

Additional information

Documentation remark, added by Commenter 1 2010-11-09 14:03:45:

New features:
3rd-party library FreeImage(Plus) used for image processing
to provide build-in support of popular formats
JPEG, PNG, GIF, BMP and should replace all obsolete code
for image load/dump in the future.
Currently used to save images from Window / OpenGL context.

- New DRAWEXE command v2ddump to perform dump of 2D-viewer.

- DRAWEXE vdump command now allows to dump color buffer with alpha channel
  and depth buffer.

- DRAWEXE xwd command now implemented for Windows systems too.
Improvements:
- DRAWEXE, batch mode improvements (launched with -f Script.tcl
  or with -v flag):
    a) suppress Tk/Tcl control window;
    b) suppress viewer window (commands view, axo, smallview and so on);
    c) suppress 3D-Viewer (OpenGL) window (commands vinit, vdisplay and so on);
    d) suppress 2D-Viewer window (commands v2dinit, v2ddisplay and so on).
  Drawing to these windows performed into offscreen buffer, thus dump should work.

- DRAWEXE xwd and vdump command now perform dump into JPEG, PNG, GIF, BMP formats.
  Notice: XWD format support was removed!

- DRAWEXE 2D-Viewer (v2dinit) and 3D-Viewer (vinit) now could be used simultaneously
  on Windows systems (fixed duplicated class registration).

- V3d_View::Dump() and V3d_View::ToPixMap() methods now use hardware accelerated
  offscreen buffer if available (required OpenGL2+ compatible GPU and up-to-date
drivers).

- Fixed method StdSelect_ViewerSelector3d::UpdateProj()
  to update parameters in first call (not second+).
Modified entities:
- Class Aspect_Window, new methods IsVirtual() and SetVirtual()
  to specify 'virtual window' wich doesn't shown on display but
  say that it do. Used for offscreen rendering.

- Class Draw_Window, compress argument was removed from method Save()
  Method now implemented for Windows systems too.

- Classes Graphic3d_GraphicDriver, OpenGl_GraphicDriver, Visual3d_View
  new methods for offscreen buffer control:
    FBOCreate();
    FBORelease();
    FBOGetDimensions();
    FBOChangeViewport();
  new dump method:
    BufferDump();

- Class ViewerSelector3d, removed InitProj() method.

- New class Image_PixMap which implements system-independent image-buffer
  control. Currently 3rd-party library FreeImage(Plus) is used.

- Enumeration TypeOfImage was extended with new values:
    TOI_RGB,
    TOI_RGBA,
    TOI_RGBF,
    TOI_RGBAF,
    TOI_FLOAT
  which indicate Image_PixMap image type.

- Class V3d_View, method ToPixMap() was changed.
  Buffer type can be specified from TypeOfImage enumeration
  (notice, TOI_FLOAT currently means Depth buffer!).
  System-independent Image_PixMap now returned.

- TKDraw package now depends on TKService.

- TKService package now depends on FreeImage(Plus) library.

- struct CALL_DEF_VIEW was extended with field
    void* ptrFBO
  to store offscreen frame buffer object which should be used for rendering
  when set.

- New class OpenGl_FrameBuffer implements offscreen Frame Buffer Object in OpenGL.

Public activity

No public notes

Participants are labeled by their role within this record.

Related records