Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

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.

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

There are following steps to translate a Triangle.

2.

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.

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.

3.

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

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:

4.

How Can We Create A Canvas Program?

Answer»

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>

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>

5.

What Is Html5 Canvas In Webgl?

Answer»

In WebGL, HTML5 <CANVAS> provides an EASY and powerful technique to draw graphics USING JavaScript.

Syntax:

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

Syntax:

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

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

Syntax:

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

Syntax:

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

6.

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:

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

There are two types of rendering:

7.

What Is Opengl?

Answer»

OPENGL stands for Open Graphics Library. It is cross LANGUAGE and cross PLATFORM API for 2D and 3D Graphics.

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

8.

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.

WebGL advantages are:

9.

Who Is The Developer Of Webgl?

Answer»

VLADIMIR Vukicevic is the DEVELOPER of WBGL.

Vladimir Vukicevic is the developer of WbGL.

10.

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.

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.