File tree Expand file tree Collapse file tree 2 files changed +9
-25
lines changed
fixtures/html/webgl-conformance Expand file tree Collapse file tree 2 files changed +9
-25
lines changed Original file line number Diff line number Diff line change @@ -41,26 +41,9 @@ <h1>WebGL getParameter Binding Test</h1>
4141 }
4242 }
4343
44- // Create WebGL1 context
45- const canvas1 = document . createElement ( 'canvas' ) ;
46- const gl1 = canvas1 . getContext ( 'webgl' ) ;
47-
48- if ( gl1 ) {
49- results . innerHTML += '<h2>WebGL 1.0 Binding Parameters</h2>' ;
50- testParameter ( gl1 , 'ARRAY_BUFFER_BINDING' , gl1 . ARRAY_BUFFER_BINDING ) ;
51- testParameter ( gl1 , 'ELEMENT_ARRAY_BUFFER_BINDING' , gl1 . ELEMENT_ARRAY_BUFFER_BINDING ) ;
52- testParameter ( gl1 , 'FRAMEBUFFER_BINDING' , gl1 . FRAMEBUFFER_BINDING ) ;
53- testParameter ( gl1 , 'RENDERBUFFER_BINDING' , gl1 . RENDERBUFFER_BINDING ) ;
54- testParameter ( gl1 , 'TEXTURE_BINDING_2D' , gl1 . TEXTURE_BINDING_2D ) ;
55- testParameter ( gl1 , 'TEXTURE_BINDING_CUBE_MAP' , gl1 . TEXTURE_BINDING_CUBE_MAP ) ;
56- testParameter ( gl1 , 'CURRENT_PROGRAM' , gl1 . CURRENT_PROGRAM ) ;
57- } else {
58- log ( 'WebGL 1.0 not supported' , false ) ;
59- }
60-
6144 // Create WebGL2 context
6245 const canvas2 = document . createElement ( 'canvas' ) ;
63- const gl2 = canvas2 . getContext ( 'webgl2' ) ;
46+ const gl2 = navigator . gl || canvas2 . getContext ( 'webgl2' ) ;
6447
6548 if ( gl2 ) {
6649 results . innerHTML += '<h2>WebGL 2.0 Binding Parameters</h2>' ;
Original file line number Diff line number Diff line change @@ -725,13 +725,6 @@ namespace endor
725725 }
726726
727727 private:
728- /* *
729- * @returns the client state of the WebGL context.
730- */
731- WebGLState &clientState ()
732- {
733- return clientState_;
734- }
735728 /* *
736729 * an XR-compatible WebGL context could be configured as an `XRWebGLLayer` object and be connected to a specific WebXR
737730 * session. At the same time, each WebXR session could own 1 base layer, thus the XR-compatible WebGL context to a WebXR
@@ -771,6 +764,14 @@ namespace endor
771764 std::string renderer;
772765 // The default handedness of the coordinate system to use.
773766 commandbuffers::MatrixHandedness defaultCoordHandedness = commandbuffers::MatrixHandedness::MATRIX_RIGHT_HANDED;
767+ /* *
768+ * @returns the client state of the WebGL context.
769+ */
770+ // Read-only accessor
771+ const WebGLState &clientState () const
772+ {
773+ return clientState_;
774+ }
774775
775776 protected:
776777 TrClientContextPerProcess *clientContext_;
You can’t perform that action at this time.
0 commit comments