Last Article

BJT

18 June 2021 0

The BJT (bipolar junction transistor) is an active electronic component with three terminals (base – collector – emitter). Its interior is composed of two alternately doped semiconductor junctions n and p. The two types of BJT that can be obtained are: the npn model and the pnp model.

Android – OpenGL ES 1

  • OpenGL ES 1 – Tutorial 7 – Blending Colors

    In the following screenshot, the two squares have a common area and their colors are mixed. In our case, the RGBA components of the green square are multiplied by 1 and added to the RGBA components of the red square multiplied by 1.

  • OpenGL ES 1 – Tutorial 6 – Apply Texture

    In the “onSurfaceCreated()” method is enabled the use of textures and the textures are loaded with the “LoadTexture()” method. With “DrawTexture()” we draw the square specifying which texture to use through an index that coincides with the loading order.

  • OpenGL ES 1 – Tutorial 5 – Draw Squares

    Every shape we want to draw must be brought back into triangles, therefore OpenGL will draw the square with 2 triangles. The “indices” variable specifies the vertices to be taken from “vertices” for each triangle (counterclockwise). For the first triangle, pair of coordinates x,y: 0, 1 and 2, for the second triangle, pair of coordinates x,y: 2, 1 and 3.

Android – OpenGL ES 2

  • OpenGL ES 2 – Tutorial 4 – Colored Vertices

    In this tutorial we set the colors of the vertices individually.

  • OpenGL ES 2 – Tutorial 3 – Draw Triangles

    In the first code, for each triangle, we reset, translate, scale and draw. In the second code, we reset, scale (obtaining a basic unit of “100”), translate by 1 (that is 100), draw, translate again by 1 (that is an other 100) on the previous translate, draw.

  • OpenGL ES 2 – Tutorial 2 – Draw a Triangle

    With “this.objtriangle = new ObjTriangle();” we call the constructor of “ObjTriangle” class where we set the data of our triangle. The vertices of the triangle present in “vertices” and “indices” (written counterclockwise) are not in a format useful for OpenGL, in the constructor they are converted and stored in “vertexBuffer” and “indexBuffer”.