Finally I solved it. The problem was that I used one array for vertices, normals and texture coordinates instead of storing in separate arrays and bind them separately.
Type: Posts; User: mandyedi
Finally I solved it. The problem was that I used one array for vertices, normals and texture coordinates instead of storing in separate arrays and bind them separately.
I changed my code, I'm suing VAO and I put the glUniform1i in the init. The result is still the same. Maybe the problem is somewhere else? I'm suing SDL for handling the window and load images.
I'm...
Thanks for the help. I've never used VAO so it is a bit confusing. I know what it is used for, but I don't really understand what should I put in the init and put in the draw.
For example the...
I tried, draw only the first, then I draw only the second. The texture was the same noisy image.
What is wrong exactly? Here is the whole class with the init method to get a clearer picture of my code:
#include "global.h"
#include "CModel.h"
#include "CModelLoader.h"
#include...
You should open a new thread and describe exactly what is you problem, copy some sample from the code. We can't find out what is your home work, and it would be great to not spoil my thread.:)
Do you say that instead of using glActiveTexture(GL_TEXTURE0) before the loop I should call it inside the loop before glBindTexture and in each loop set different unit?
I tried it but it doesn't...
Hello,
This problem may not be related directly to shaders, but I don't even know exactly where the problem is. Since I moved from fixed pipeline to shaders, the texture appears wrong. Here is a...