# cee::win::ViewerWin32

class `ViewerWin32` : public Viewer

  Subclass of viewers for setting up the OpenGL render context for Win32 applications.

  The viewers are thin wrapper layers between the View class and the native system and enables rendering in for instance Qt based application. Use the correct subclassed viewer.

  Public Functions

  `ViewerWin32`()

    Constructs a ViewerWin32.

  bool `createOpenGLContext`(vis::OpenGLContextGroup *contextGroup, HWND hWnd, const OpenGLContextSpecWin &spec = OpenGLContextSpecWin())

    Creates an OpenGL render context. Use this method for the first or only Viewer in the app.

  bool `createOpenGLContext`(vis::OpenGLContextGroup *contextGroup, int windowHandleAsInt, const OpenGLContextSpecWin &spec = OpenGLContextSpecWin())

    Creates an OpenGL render context. Use this method for the first or only Viewer in the app.

  bool `createSharedOpenGLContext`(vis::OpenGLContextGroup *contextGroup, ViewerWin32 *shareWithViewer, HWND hWnd)

    Create 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 `createSharedOpenGLContext`(vis::OpenGLContextGroup *contextGroup, ViewerWin32 *shareWithViewer, int windowHandleAsInt)

    Create 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 `createSoftwareOpenGLContext`(vis::OpenGLContextGroup *contextGroup, HWND hWnd)

    Creates a software openGL render context.

  bool `createSoftwareOpenGLContext`(vis::OpenGLContextGroup *contextGroup, int windowHandleAsInt)

    Creates a software OpenGL render context.

  void `deleteOpenGLContext`()

    Deletes the OpenGL render context.

  void `swapBuffers`()

    Swaps buffers.

  Public Static Functions

  static bool `supportsHardwareOpenGL`(HWND hWnd)

    Returns true if OpenGL has hardware support.

  static bool `supportsHardwareOpenGL`(int windowHandleAsInt)

    Returns true if OpenGL has hardware support.

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