Provides means to print current GL driver state info. 更多...
import 语句: | import QtCanvas3D 1.1 |
Since: | QtCanvas3D 1.0 |
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));
另请参阅 Context3D .
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.