cee::win::ViewerWindowed

class ViewerWindowed : public Viewer

Create a Win32 viewer with its own OpenGL (sub) window.

This viewer will create a sub-window which will be used for OpenGL rendering The sub-window and the render context etc. will be managed by the viewer.

Public Functions

ViewerWindowed()

Constructs the viewer.

bool create(vis::OpenGLContextGroup *contextGroup, HWND parentWnd)

Creates the sub window with a new render context.

Use this method for the first or only viewer in the App

bool create(vis::OpenGLContextGroup *contextGroup, int parentWndHandleAsInt)

Creates the sub window with a new render context.

Use this method for the first or only viewer in the App

bool createShared(vis::OpenGLContextGroup *contextGroup, ViewerWindowed *shareWithViewer, HWND parentWnd)

Creates the sub window with a shared OpenGL context.

Use this method for the second, third, etc. Viewer in the app. This will allow the OpenGL context to share OpenGL resources, and thus a model can be shown in multiple views.

bool createSoftware(vis::OpenGLContextGroup *contextGroup, HWND parentWnd)

Creates the sub window with a shared OpenGL context.

Use this method for the second, third, etc. Viewer in the app. This will allow the OpenGL context to share OpenGL resources, and thus a model can be shown in multiple views.

void destroy()

Destroys the OpenGL context and the sub window.

HWND windowHandle()

Returns the window handle of the sub window.

void setView(vis::View *view)

Sets the view to show in the viewer.

Warning

A view cannot be associated with more than one viewer. It is illegal to set the same

void setPosition(int x, int y, int width, int height)

Sets the position of the window.