Texture Mapping in OpenGL

So I have recently started using LWJGL and after watching several videos from the coding universe I had learnt to create a 3D model. The challenge for me now is mapping the texture provided with the blender model to be mapped straight to the model. Ive searched here and there and arrived at the conclusion that it was something to do with UV mapping. My question to anyone who had successfully achieved this, is how do you map a texture to a model?

I’ve made a video showing it.

POWq9aeDLls

I already know how to apply textures to models. The question I have is how do I add this texture the the model within my code because when I load the texture in it has not got the texture desapite having it in blender

You need to load the image into an OpenGL texture. You need to load the UV coordinates with the model from blender. Then you need to apply the texture, and pass the texture coords to OpenGL.

That was very vague but I don’t know enough of how you are doing things to help you anymore than that.

-How are you loading the model from blender?
-How are you rendering (VAOs, VBOs, shaders etc.)?

But a better idea would just be to read a tutorial. Look at @SHC’s signature and you will see a link to his tutorial series which includes one on texturing. But I think it would be a good idea if you read all of them.

I had some source code which I’ve written for my old series I wrote here. Here are the files from that source.

If you have any doubts, ask them here and I’d be glad to help you.

@quew8

Thank you for recommending my series.