Getting started with OpenGL-3-drawing polygons

polygon(1) Both sides of the polygon and how it is drawn.Although we have not really used three-dimensional coordinates to draw drawings, it is necessary to establish some three-dimensional concepts.From a 3D perspective, a polygon has two faces. Each face can be drawn in different ways: fill, draw only edge contours, and draw only vertices. Fi ...

Posted by steekyjim on Sun, 16 Jan 2022 00:37:42 +0100

Getting started with OpenGL 2.0 - graphics rendering pipeline

1, Foreword In OpenGL, everything is in 3D space, while the screen and window are 2D pixel arrays. The process of converting 3D coordinates to 2D coordinates is managed by the graphics rendering pipeline of OpenGL. The macro aspect of graphics rendering pipeline: it consists of two main parts. The first part transforms 3D coordinates into 2D ...

Posted by Jabop on Wed, 05 Jan 2022 20:11:08 +0100

C-4: loading texture on cube

Operation requirements: 1. Three texture filtering methods are used to load textures (linear sampling, mipmap and nearest point sampling); 2. The image loaded with texture can be set by yourself; 3. The texture of each face is different; 4. The mouse or keyboard controls the switching of texture filtering methods. Initialize OpenGL Sa ...

Posted by lurius on Mon, 03 Jan 2022 22:03:14 +0100

OpenGL high quality text rendering

High Quality Text RenderingprefaceIt is challenging to retain text of the highest possible quality in real-time 3D graphics. Objects can dynamically change their position, rotation, scale, and viewing angle. All of this has a negative impact on quality because text is usually generated only once, not in each frame. Depending on the font engine ...

Posted by jerr0 on Tue, 28 Dec 2021 14:37:24 +0100

Computer graphics experiment 3

1, Purpose of the experiment: 1) Be familiar with and master the principle and implementation process of five basic two-dimensional geometric transformations, including translation, proportion, symmetry, rotation and staggered cutting;2) Be familiar with and master the principle and implementation process of two-dimensional coincidence transfo ...

Posted by dombrorj on Mon, 27 Dec 2021 16:18:10 +0100

Normal mapping of advanced lighting in opengl

normal map opengl official documents The core modification is the normal value in the clip shader uniform sampler2D normalMap; void main() { // Get normals from normal map range [0,1] normal = texture(normalMap, fs_in.TexCoords).rgb; // Convert normal vector to range [- 1,1] normal = normalize(normal * 2.0 - 1. ...

Posted by focus310 on Sat, 06 Nov 2021 19:20:13 +0100

Lesson 18, Cube Mapping (Loading Sky Box)

I'm not going to go into that much here, but I'm going to look at the cube map mainly from the direction in which the code is going to run. Add Sky Box Vertices float skyboxVertices[] = { // positions -1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, ...

Posted by uglyrat on Tue, 19 Oct 2021 18:13:02 +0200

Qt based OpenGL: QOpenGLShaderProgram and GLSL

Qoopenglshaderprogram encapsulates the compilation process of ShaderProgram. Whether it is loading SourceCode or SourceFile, Qt encapsulation is very good. If it is not encapsulated, the code will be written into the string as shown in the figure below. There is no color identification, and there must be a newline character on each line, which ...

Posted by jabba_29 on Sun, 03 Oct 2021 20:30:23 +0200