The default minification filter requires a complete mipmap set, or the texture is considered invalid. Either set the minification filter to a non-mipmap filter, or upload a complete mipmap set (all mipmap level down to 1x1).
Maybe you should try to play with the parameters of glTexImage2D. Specifically, the type and format parameters. Usually you could have some trouble loading the data into memory properly. While trying out various combinations you will probably get access violation errors, so you could include it in a try catch block as well. In my case almost 100% of the cases where a program was running correctly but the texture was not displaying was improper setting of the above parameters. Also try to do a debug run and see if by the time you’re about to call glTexImage2D the pointer to the data is valid (maybe you don’t load the file properly). Hope it helped!
I’m not sure, but why do you use 3 for the internal format of glTexImage2D?
If I look at gl.h, 3 stands for GL_LINE_STRIP ("#define GL_LINE_STRIP 0x0003")
Use instead GL_RGB, I think that is what you want.
And I hope you have not forget glEnable(GL_TEXTURE_2D);
TexParameter are part of texture objects (wrap modes, filer mode, priority, border color, etc.). There exists an immediate mode texture object, the one with id 0, which gets these parameters if you didn’t call BindTexture before. Look up the specs.
If you call BindTexture all the parameters set for that object are restored automatically. No need to call TexParameter again.
The pitfall here is that there are also defaults and the critical is the min filter which defaults to GL_LINEAR_MIPMAP_NEAREST and needs a full mipmap chain to make the texture object consistent. Binding inconsistent texture objects disables the texture unit.