diff options
| author | raysan5 <raysan5@gmail.com> | 2015-06-02 09:54:51 +0200 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2015-06-02 09:54:51 +0200 |
| commit | 6a4afae5cc3c6b8677c8c22f02bdf2b926d517a8 (patch) | |
| tree | 359403ad83f775dd3b2e205fc1876e79327eefa1 /src/rlgl.c | |
| parent | fd851d1d8b4919d802bcc5041f9a9ff37669d159 (diff) | |
| download | raylib-6a4afae5cc3c6b8677c8c22f02bdf2b926d517a8.tar.gz raylib-6a4afae5cc3c6b8677c8c22f02bdf2b926d517a8.zip | |
Improved ResolveCollisionCubicmap()
Now it supports multiple maps one next to the other
Diffstat (limited to 'src/rlgl.c')
| -rw-r--r-- | src/rlgl.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -877,7 +877,7 @@ void rlglInit(void) TraceLog(INFO, "Number of supported extensions: %i", numExt); // Show supported extensions - for (int i = 0; i < numExt; i++) TraceLog(INFO, "Supported extension: %s", ext[i]); + //for (int i = 0; i < numExt; i++) TraceLog(INFO, "Supported extension: %s", ext[i]); // Check required extensions for (int i = 0; i < numExt; i++) @@ -1377,12 +1377,16 @@ void rlglDrawModel(Model model, Vector3 position, float rotationAngle, Vector3 r glEnableVertexAttribArray(model.shader.normalLoc); } + glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, model.texture.id); + //glActiveTexture(GL_TEXTURE1); + //glBindTexture(GL_TEXTURE_2D, 4); glDrawArrays(GL_TRIANGLES, 0, model.mesh.vertexCount); glBindTexture(GL_TEXTURE_2D, 0); // Unbind textures - + glActiveTexture(GL_TEXTURE0); + if (vaoSupported) glBindVertexArray(0); // Unbind VAO else glBindBuffer(GL_ARRAY_BUFFER, 0); // Unbind VBOs @@ -2128,11 +2132,9 @@ void rlglSetDefaultShader(void) int GetShaderLocation(Shader shader, const char *uniformName) { - int location = 0; - - location = glGetUniformLocation(shader.id, uniformName); + int location = glGetUniformLocation(shader.id, uniformName); - if (location == 0) TraceLog(WARNING, "[SHDR %i] Shader location for %s could not be found", shader.id, uniformName); + if (location == -1) TraceLog(WARNING, "[SHDR ID %i] Shader location for %s could not be found", shader.id, uniformName); return location; } |
