diff options
| author | Palaui <sucdepressec@gmail.com> | 2014-12-09 13:10:05 +0100 |
|---|---|---|
| committer | Palaui <sucdepressec@gmail.com> | 2014-12-09 13:10:05 +0100 |
| commit | 29d8b48503f3064cdc1f3a87c01b4264e716a220 (patch) | |
| tree | 31096a173fa4fb61fd9d912169abbf65fcf269c6 /src/rlgl.c | |
| parent | 63ed471ed24ed1b328cc90f03a88130511725e88 (diff) | |
| download | raylib-29d8b48503f3064cdc1f3a87c01b4264e716a220.tar.gz raylib-29d8b48503f3064cdc1f3a87c01b4264e716a220.zip | |
Corrected some bugs...
[core] Added SetMousePosition()
[models] LoadHeightmap() - Corrected textures bug
[raymath] Functions renaming
[WEB] Prepare environment for emscripten!
Diffstat (limited to 'src/rlgl.c')
| -rw-r--r-- | src/rlgl.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -301,6 +301,10 @@ void rlRotatef(float angleDeg, float x, float y, float z) if (x == 1) rot = MatrixRotateX(angleDeg*DEG2RAD); else if (y == 1) rot = MatrixRotateY(angleDeg*DEG2RAD); else if (z == 1) rot = MatrixRotateZ(angleDeg*DEG2RAD); + + //Vector3 vec = (Vector3){ 0, 0, 1 }; + //VectorNormalize(&vec); + //rot = MatrixFromAxisAngle(vec, angleDeg*DEG2RAD); // Working MatrixTranspose(&rot); @@ -1305,7 +1309,8 @@ unsigned int rlglLoadTexture(unsigned char *data, int width, int height, bool ge #if defined(GRAPHICS_API_OPENGL_33) // NOTE: We define internal (GPU) format as GL_RGBA8 (probably BGRA8 in practice, driver takes care) - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); + //glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); // OpenGL + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); // WebGL #elif defined(GRAPHICS_API_OPENGL_ES2) // NOTE: On embedded systems, we let the driver choose the best internal format glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); @@ -1562,6 +1567,7 @@ static GLuint LoadDefaultShaders(void) char fShaderStr[] = " #version 110 \n" // NOTE: Equivalent to version 100 on ES2 #elif defined(GRAPHICS_API_OPENGL_ES2) char fShaderStr[] = " #version 100 \n" // NOTE: Must be defined this way! 110 doesn't work! + "precision mediump float; \n" // WebGL, required for PLATFORM_WEB #endif "uniform sampler2D texture0; \n" "varying vec2 fragTexCoord; \n" |
