Thanks a lot for your help ZbuffeR. Have you ever been in those situations that you look at something several times and the answer is right there, in front of your eyes? I’ve already seen the links you’ve been referencing, for several times, but after looking at them again i found the problem. Couldn’t find the solution without you!!!
the problem lies here, in those two lines:
Dim m_data As BitmapData = mBitmap.LockBits(New Rectangle(0, 0, mBitmap.Width, mBitmap.Height), ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format24bppRgb)
Gl.glTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_RGB, mBitmap.Width, mBitmap.Height, 0, Gl.GL_RGB, Gl.GL_UNSIGNED_BYTE, m_data.Scan0)
After following your links i’ve tried to change the image being referenced, to the one on the example of NeHe lesson8, and it works. So i found that the problem had to do with the image being referenced. So i changed those lines to:
Dim m_data As BitmapData = mBitmap.LockBits(New Rectangle(0, 0, 128, 128), ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format24bppRgb)
Gl.glTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_RGB, 128, 128, 0, Gl.GL_RGB, Gl.GL_UNSIGNED_BYTE, m_data.Scan0)
Notice that on the picture height and width i’ve changed to 128, such as NeHe image.
Now my actual problem lies on resizing the image so that all the image is seen on the polygon, not just part of the image (128/128). Do you know how?
I’ve been trying values above 128 and it doesn’t work