I am trying to use SOIL with OpenGL to make textures, my code compiles but it does not show anything on my screen. here is my code so far.
int width=50, height=50;
unsigned char* image = SOIL_load_image("img.png", &width, &height, 0, SOIL_LOAD_RGB);
void renderScene(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glColor3f(1.0f, 0.0f, 0.0f);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, image);
glRectf(90.0f, 20.0f, 130.0f, 10.0f);
glRectf(100.0f, 10.0f, 120.0f, -10.0f);
glRectf(80.0f, 5.0f, 100.0f, -5.0f);
glRectf(90.0f, -10.0f, 130.0f, -20.0f);
glutSwapBuffers();
}