WebGL Interview Questions & Answers

  1. Question 1. What Is Webgl?

    Answer :

    WebGL stands for Web Graphics Library. It is a JavaScript API that is used for rendering 3D graphic in any compatible web browser. It is written in JavaScript.

  2. Question 2. Who Is The Developer Of Webgl?

    Answer :

    Vladimir Vukicevic is the developer of WbGL.

  3. HTML 5 Interview Questions

  4. Question 3. What Are The Advantages Of Webgl?

    Answer :

    WebGL advantages are:

    • It is JavaScript programming.
    • Increasing support with mobile browsers.
    • It is open source.
    • No need for collection Automatic memory management.
    • It is easy to set up.
  5. Question 4. What Is Opengl?

    Answer :

    OpenGl stands for Open Graphics Library. It is cross language and cross platform API for 2D and 3D Graphics.

  6. HTML 5 Tutorial

  7. Question 5. What Is Rendering And Its Type?

    Answer :

    Rendering is the process of generating an image from a model by using computer program.

    There are two types of rendering:

    • Software Rending
    • Hardware Rending
  8. Web Designing Interview Questions

  9. Question 6. What Is Html5 Canvas In Webgl?

    Answer :

    In WebGL, HTML5 provides an easy and powerful technique to draw graphics using JavaScript.

    Syntax:

    In WebGL, HTML5 provides an easy and powerful technique to draw graphics using JavaScript.

    Syntax:

    1.  

  10. Question 7. How Can We Create A Canvas Program?

    Answer :

    We can create a Canvas program by using following codes:

      

         

         

            

         

         

           

              

          

  11. Web Designing Tutorial
    Computer Graphics Interview Questions

  12. Question 8. What Are Vertex Shader And Its Task?

    Answer :

    Vertex shader is the program code that is used to move the geometry from one place to another. It handles the data of each vertex.

    The following tasks are:

    • Vertex transformation
    • Normal transformation and normalization
    • Texture coordinate generation
    • Texture coordinate transformation
    • Lighting
    • Color material application
  13. Question 9. What Are The Drawing Modes Supported By Webgl?

    Answer :

    WebGL supported following drawing modes that are listed in table:

    Mode                                     Description

    gl.POINTS                        It is used to draw a series of points.

    gl.LINES                           It is used to draw a series of unconnected line segments.

    gl.LINE_STRIP                   It is used to draw a series of connected line segments.  

    gl.LINE_LOOP                    It is used to draw a series of connected line segments.

                                                    It also joins the first and last  vertices.

    gl.TRIANGLES                    It is used to draw a series of separate triangles.

    gl.TRIANGLE_STRIP            It is used to draw a series of connected triangles in strip fashion.

    gl.TRIANGLE_FAN               It is used to draw a series of connected triangles sharing the first vertex.

  14. Graphic Design Interview Questions

  15. Question 10. What Is The Use Of Translation And Its Step To Translate A Triangle In Webgl?

    Answer :

    In WebGL, Translation is used to move a triangle (any object) on the XYZ plane.

    There are following steps to translate a Triangle.

    • Prepare the Canvas and Get the WebGL Rendering Context.
    • Define the Geometry and Store it in the Buffer Objects.
    • Create and Compile the Shader Programs.
    • Create and Compile the Shader Programs.
  16. Computer Graphics Tutorial