# Flipping these coordinates.

• 01-13-2014, 11:14 PM
zFollette
Flipping these coordinates.
Well, I am making a minimap for my 3D project and as expected, the minimap renders weird. It is displaying as if it was facing right. Here is a picture:

EDIT: Never mind, I fixed it. Code posted.

Attachment 5850

My mind is at a blank right now, I've had a really long day so I am going to make this post short and sweet. Code:

Code:

```glEnable(GL_BLEND);         glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);         glColor4f(1, 1, 1, 0.5f);         glBegin(GL_QUADS);         glVertex2i(10, 10);         glVertex2i(210, 10);         glVertex2i(210, 210);         glVertex2i(10, 210);         glEnd();                 int[] pos = getChunk((int) position.x, (int) position.z);         for (int x = 0; x < 10; x++) {             for (int y = 0; y < 10; y++) {                 if (chunk[pos[0]][pos[1]].isActive(x, 1, y)) {                     glColor4f(0, 0, 0, 0.5f);                     glBegin(GL_QUADS);                     int x1 = 200 - (x * 20) + 10;                     int x2 = 200 - ((x * 20) + 20) + 10;                                         int y1 = (y * 20) + 10;                     int y2 = ((y * 20) + 20) + 10;                                         glVertex2i(y1, x2);                     glVertex2i(y2, x2);                     glVertex2i(y2, x1);                     glVertex2i(y1, x1);                     glEnd();                 }             }         }         glDisable(GL_BLEND);```
Note that this is openGL, but the coordinate problem has nothing to do with that specifically.
• 01-15-2014, 12:54 AM
pj6444
Re: Flipping these coordinates.
Where did you learn to use OpenGL? Did you also use LWJGL?
• 01-15-2014, 02:41 AM
zFollette
Re: Flipping these coordinates.
Quote:

Originally Posted by pj6444
Where did you learn to use OpenGL? Did you also use LWJGL?

Yes, LWJGL. I learned by myself.