Understanding of OpenGL global coordinates and local coordinates

tags: opengl

void display(void)
{
   glClear (GL_COLOR_BUFFER_BIT);
   glColor3f (1.0, 1.0, 1.0);

   glPushMatrix();
   glutWireSphere(1.0, 10, 10);   /* draw sun */
//   glRotatef ((GLfloat) year, 0.0, 1.0, 0.0);
   glTranslatef (2.0, 0.0, 0.0);
   glRotatef ((GLfloat) day, 0.0, 1.0, 0.0);
   glutWireSphere(0.2, 5, 5);    /* draw smaller planet */
   glPopMatrix();
   glutSwapBuffers();
}

Intelligent Recommendation

World coordinates and local coordinates in Unity

I have a student, just in contact with Unity3D, if you have a place where you understand, you will also hope that all the gods don't enlighten it ~ Private vector3 _Vec3targetscreenspace; // Target ob...

UE4 local coordinates and world coordinates

Add the code to the Tick function, and you can see the changes in Actor in world coordinates and local coordinates....

Qt+OpenGL - 3D coordinates to 2D coordinates

Principle introduction:https://learnopengl-cn.github.io/01%20Getting%20started/08%20Coordinate%20Systems/   Code In order to get the coordinates of the vertices in the model displayed in the wind...

OpenGL vertex coordinates and sampler2D texture coordinates

When using non-fixed pipelines for texture rendering, the mapping relationship between texture and vertex coordinates is often used. Here, the two-dimensional texture coordinate mapping is introduced ...

More Recommendation

OpenGL converts the normalization coordinates into the original coordinates

As shown in the figure: The original image is based on 2x2 pixels, and the pixel value of each group is representing the value of the upper left corner (that is,0~8), Find the average filtering of the...

OpenGL screen coordinates transform into world coordinates

Screen coordinates transform into world coordinates method one Method Two...

Qt + OpenGL - Screen coordinates turn OpenGL normalized coordinates

OpenGL is a coordinate system that transforms coordinates to a screen center as a coordinate system with a screen center. The X, Y axis of the screen display area is [-1, 1]. Figure: The coordinate sy...

OpenGL-transform, homogeneous coordinates (unfinished)

Learned in the OpenGL Programming Guide,Strong push: detailed explanation of caster99 blogger、The homogeneous coordinate understanding of jeffasd god、Homogeneous coordinates Baidu Encyclopedia OpenGL ...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top