Below is some of my first work in 3D (please don't be too harsh). It is drawn as squares then rotated 45 degrees to get the isometric look. And because of the nature of what I want, it is done in an orthographic view. For now it uses a border that is part of the image file where the texture is loaded from. I want to get rid of that and just use a plain texture, but I am having some problems.
Code:
glGenTextures(1,&texture);
glBindTexture(GL_TEXTURE_2D,texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
float color[4] = {1.0,1.0,1.0,1.0};
glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, color);
glTexImage2D(GL_TEXTURE_2D,0,GL_RGB,grass->GetWidth(),grass->GetHeight(),
0,GL_RGB,GL_UNSIGNED_BYTE,grass->GetImage());
This is where I do all my texture initialization (image loading code can be provided if needed). I enable GL_TEXTURE_2D above this... What I don't get is why if I turn on borders after setting the GL_TEXTURE_BORDER_COLOR, everything that is textured (only one texture is used so far) turns white.