GLStateDumpExt QML Type | Qt Canvas 3D 5.6

Qt 5.6 | Qt Canvas 3D | QML Types | GLStateDumpExt QML Type

Qt 5.6.2 Reference Documentation

# GLStateDumpExt QML Type

Provides means to print current GL driver state info. More...

Import Statement: | import QtCanvas3D 1.1
Since: | QtCanvas3D 1.0

- List of all members, including inherited members

## Methods

- string getGLStateDump(stateDumpEnums options)

## Detailed Description

An uncreatable QML type that provides an extension API that can be used to dump current OpenGL driver state as a string that can be then, for example, be printed on the console log. You can get it by calling Context3D.getExtension with `"QTCANVAS3D_gl_state_dump"` as parameter.

Typical usage could be something like this:

      // Declare the variable to contain the extension
      var stateDumpExt;
      .
      .
      // After the context has been created from Canvas3D get the extension
      stateDumpExt = gl.getExtension("QTCANVAS3D_gl_state_dump");
      .
      .
      // When you want to print the current GL state with everything enabled
      // Check that you indeed have a valid extension (for portability) then use it
      if (stateDumpExt)
          log("GL STATE DUMP:\n"+stateDumpExt.getGLStateDump(stateDumpExt.DUMP_FULL));

See also Context3D.

## Method Documentation

string getGLStateDump(stateDumpEnums options)

Returns OpenGL driver state with given options as a human readable string that can be printed. Optional paremeter options may contain bitfields masked together from following options:

- `GLStateDumpExt.DUMP_BASIC_ONLY` Includes only very basic OpenGL state information.
- `GLStateDumpExt.DUMP_VERTEX_ATTRIB_ARRAYS_BIT` Includes all vertex attribute array information.
- `GLStateDumpExt.DUMP_VERTEX_ATTRIB_ARRAYS_BUFFERS_BIT` Includes size and type from all currently active vertex attribute arrays (including the currently bound element array) to verify that there are actual values in the array.
- `GLStateDumpExt.DUMP_FULL` Includes everything.

This command is handled synchronously.