# 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.

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Desktop in your own language, or choose a sample question below to start a conversation:

What is HOOPS Envision for Desktop?
What are the latest release notes for HOOPS Envision for Desktop?
How do I start evaluating HOOPS Envision for Desktop?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...