Interview Questions

AJAX Interview Questions Android Interview Questions Angular 2 Interview Questions AngularJs Interview Questions Apache Presto Interview Questions Apache Tapestry Interview Questions Arduino Interview Questions ASP.NET MVC Interview Questions Aurelia Interview Questions AWS Interview Questions Blockchain Interview Questions Bootstrap Interview Questions C Interview Questions C Programming Coding Interview Questions C# Interview Questions Cakephp Interview Questions Cassandra Interview Questions CherryPy Interview Questions Clojure Interview Questions Cobol Interview Questions CodeIgniter interview Questions CoffeeScript Interview Questions Cordova Interview Questions CouchDB interview questions CSS Buttons Interview Questions CSS Interview Questions D Programming Language Interview Questions Dart Programming Language Interview Questions Data structure & Algorithm Interview Questions DB2 Interview Questions DBMS Interview Questions Django Interview Questions Docker Interview Questions DOJO Interview Questions Drupal Interview Questions Electron Interview Questions Elixir Interview Questions Erlang Interview Questions ES6 Interview Questions and Answers Euphoria Interview Questions ExpressJS Interview Questions Ext Js Interview Questions Firebase Interview Questions Flask Interview Questions Flex Interview Questions Fortran Interview Questions Foundation Interview Questions Framework7 Interview Questions FuelPHP Framework Interview Questions Go Programming Language Interview Questions Google Maps Interview Questions Groovy interview Questions GWT Interview Questions Hadoop Interview Questions Haskell Interview Questions Highcharts Interview Questions HTML Interview Questions HTTP Interview Questions Ionic Interview Questions iOS Interview Questions IoT Interview Questions Java BeanUtils Interview Questions Java Collections Interview Questions Java Interview Questions Java JDBC Interview Questions Java Multithreading Interview Questions Java OOPS Interview Questions Java Programming Coding Interview Questions Java Swing Interview Questions JavaFX Interview Questions JavaScript Interview Questions JCL (Job Control Language) Interview Questions Joomla Interview Questions jQuery Interview Questions js Interview Questions JSF Interview Questions JSP Interview Questions KnockoutJS Interview Questions Koa Interview Questions Laravel Interview Questions Less Interview Questions LISP Interview Questions Magento Interview Questions MariaDB Interview Questions Material Design Lite Interview Questions Materialize CSS Framework Interview Questions MathML Interview Questions MATLAB Interview Questions Meteor Interview Questions MongoDB interview Questions Moo Tools Interview Questions MySQL Interview Questions NodeJS Interview Questions OpenStack Interview Questions Oracle DBA Interview Questions Pascal Interview Questions Perl interview questions Phalcon Framework Interview Questions PhantomJS Interview Questions PhoneGap Interview Questions Php Interview Questions PL/SQL Interview Questions PostgreSQL Interview Questions PouchDB Interview Questions Prototype Interview Questions Pure CSS Interview Questions Python Interview Questions R programming Language Interview Questions React Native Interview Questions ReactJS Interview Questions RequireJs Interview Questions RESTful Web Services Interview Questions RPA Interview Questions Ruby on Rails Interview Questions SAS Interview Questions SASS Interview Questions Scala Interview Questions Sencha Touch Interview Questions SEO Interview Questions Servlet Interview Questions SQL Interview Questions SQL Server Interview Questions SQLite Interview Questions Struts Interview Questions SVG Interview Questions Swift Interview Questions Symfony PHP Framework Interview Questions T-SQL(Transact-SQL) Interview Questions TurboGears Framework Interview Questions TypeScript Interview Questions UiPath Interview Questions VB Script Interview Questions VBA Interview Questions WCF Interview Questions Web icon Interview Questions Web Service Interview Questions Web2py Framework Interview Questions WebGL Interview Questions Website Development Interview Questions WordPress Interview Questions Xamarin Interview Questions XHTML Interview Questions XML Interview Questions XSL Interview Questions Yii PHP Framework Interview Questions Zend Framework Interview Questions Network Architect Interview Questions

Top 16 WebGL Interview Questions for 2021

1) What is WebGL?

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) Who is the developer of WebGL?

Vladimir Vukicevic is the developer of WbGL.

3) What are the advantages of WebGL?

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.

4) What is OpenGl?

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

5) What is Rendering and its type?

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

6) What is HTML5 Canvas in WebGL?

In WebGL, HTML5 <canvas> provides an easy and powerful technique to draw graphics using JavaScript. Syntax:
<canvas id = "mycanvas" width = "100" height = "100"></canvas>

7) How can we create a Canvas program?

We can create a Canvas program by using following codes:
<html>  

   <head>  

        <style>  

             #mycanvas{border:1px solid red;}  

        </style>        

   </head>  

   <body>  

      <canvas id = "mycanvas" width = "100" height = "100"></canvas>  

   </body>  

      

</html>

8) What are Vertex Shader and its task?

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

9) How can we create WebGL Applications by using HTML5 2DCanvas?

We can create WebGL Application by passing the string experimental-webgl. It uses canvas.getContext() method. Example:
<!DOCTYPE html>  

<html>  

   <canvas id = 'my_canvas'></canvas>  

         <script>  

                   var canvas = document.getElementById('my_canvas');  

                   var gl = canvas.getContext('experimental-webgl');  

                   gl.clearColor(0.9,0.9,0.8,1);  

                   gl.clear(gl.COLOR_BUFFER_BIT);  

         </script>      

</html>

10) What is Buffer and its type in WebGL?

In WebGL, Buffer is the memory area that holds the data. There are various buffers:
  • Vertex buffer objects: It is used to stores the data corresponding to each vertex.
  • Index buffer objects: It is used to stores the data about the indices.
  • Frame buffer: It holds the scene data. This buffer contains details such as width and height of the surface (in pixels).

11) What are the drawing modes supported by WebGL?

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.

12) What is the use of Translation and its step to translate a Triangle in WebGL?

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.

13) What is Scaling in WebGL?

In WebGL, Scaling is used to increase or decrease the size of an object.

14) What is Buffer Objects and its types?

A buffer object is a mechanism that indicates a memory area. It is allocated in the system. It is reside in GPU memory. There are two types of buffer objects:
  1. Vertex buffer object (VBO)
  2. Index buffer objects (IBO)

15) What do you mean by WebGL Graphics Pipeline?

Graphics Pipeline is a sequence of steps that is used to render 3D graphics. It is also known as rendering pipeline. The given following step:

16) WebGL?

In WebGL, typed array is used to transfer the data element such as index and texture. It stores large quantities of data and process them in to native binary format.