22.09.2016 Views

JIT Spraying Never Dies

JIT%20Spraying%20Never%20Dies%20-%20Bypass%20CFG%20By%20Leveraging%20WARP%20Shader%20JIT%20Spraying

JIT%20Spraying%20Never%20Dies%20-%20Bypass%20CFG%20By%20Leveraging%20WARP%20Shader%20JIT%20Spraying

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

WebGL and Its Usage<br />

• WebGL (Web Graphics Library)<br />

– a JavaScript API for rendering interactive 3D computer graphics and 2D graphics within any<br />

compatible web browser without the use of plug-ins.<br />

– WebGL programs consist of control code written in JavaScript and shader code (GLSL).<br />

– Officially supported by MS IE11 & Edge.<br />

• Create a WebGL Shader program<br />

1. Define Shaders with GLSL in the page.<br />

2. Add a Canvas element to the page, and create a new WebGL rendering context<br />

(getContext("experimental-webgl")).<br />

3. Get Shader source code and compile shader (createShader, shaderSource, compileShader).<br />

4. Attach Shaders to program and link program (createProgram, attachShader, linkProgram) .<br />

5. Feed data from JavaScript into Shader program through attribute or uniform<br />

(getAttribLocation, enableVertexAttribArray, bindBuffer, vertexAttribPointer,<br />

getUniformLocation , uniformxxx).<br />

6. Draw to the screen (drawArrays, drawElements).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!