diff --git a/engine/src/gl_texture.c b/engine/src/gl_texture.c index dcdf07c..359cad3 100644 --- a/engine/src/gl_texture.c +++ b/engine/src/gl_texture.c @@ -5,25 +5,6 @@ #include void GBGLTexturePrepare(GBGL gl, GLuint* texture, unsigned char* rgba, int width, int height) { - int y; - - /* image gets flipped here... because opengl coord system is quite confusing */ - for(y = 0; y < height / 2; y++) { - int x; - for(x = 0; x < width; x++) { - int p; - for(p = 0; p < 4; p++) { - unsigned char* s1 = &rgba[(y * width + x) * 4 + p]; - unsigned char* s2 = &rgba[((height - 1 - y) * width + x) * 4 + p]; - unsigned char p1 = *s1; - unsigned char p2 = *s2; - - *s2 = p1; - *s1 = p2; - } - } - } - glGenTextures(1, texture); glBindTexture(GL_TEXTURE_2D, *texture); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, rgba); diff --git a/engine/src/skybox.c b/engine/src/skybox.c index e3a2203..32e687b 100644 --- a/engine/src/skybox.c +++ b/engine/src/skybox.c @@ -46,13 +46,13 @@ void GBSkyBoxDraw(GBSkyBox skybox) { GBVector2 t[4]; GBNumber s = 0.0001; - t[0][0] = 0, t[0][1] = 1; + t[0][0] = 0, t[0][1] = 0; - t[1][0] = 0, t[1][1] = 0; + t[1][0] = 0, t[1][1] = 1; - t[2][0] = 1, t[2][1] = 0; + t[2][0] = 1, t[2][1] = 1; - t[3][0] = 1, t[3][1] = 1; + t[3][0] = 1, t[3][1] = 0; GBGLIgnoreDepth(gl); GBGLShadowDisable(gl);