LWJGL - Texturing VBO's (STLL UNSOLVED)

Ok so I have recently started using LWJGL and for those that dont know it uses parts of openGl. I have been using displaylists up until I realised that VBOs were more efficient and better for newer graphics cards. The program with displaylists was working fine with textures and models up until I started using VBO’s. So the problem I have is mapping textures to a VBO model. Below is a link to the project where you will find that the other models like terrain and lamppost work fine with textures and displaylist however the player (which is using a VBO) does have a texture. Something you will most likely realise is that the program is super unefficiant which is something I have left untouched until I have raw machanics nailed. So the question that meed answering here is: How do I texture a VBO?

source code(explained above):

Thanks in advance!

What do you mean? You put tex coords into a buffer like you would with vertices.

Im sorry, I dont understand what you are confused about :slight_smile:

Quick pro-tip: put the source on an online paste service that offers syntax highlighting, otherwise 99% of people will not download some random zip file :wink:

Now for texturing, you just put the tex coords into the VBO along with the other vertex data. Assuming you are using the fixed-function pipeline, you specify their location using glTexCoordPointer.

There’s a lot of classes is it really necessary? Can you please not just look and help a fellow JGO’er out :slight_smile:

I took a look into the code, and what I said doesn’t change: use glTexCoordPointer along with the glVertex/NormalPointer calls in your update() methods.

Can you not add it yourself in a way that works my friend :slight_smile:
I have tried implementing it myself and Im having no luck with the way I do it…

Ok heres the link with my attempt that doesnt work:

Sorry man, I have no time to debug and add stuff to your own code. Also, there is no point using the fixed function pipeline anyway, try learning the programmable pipeline with shaders.

Here’s a good tutorial: www.arcsynthesis.org/gltut
And the C++ code ported to Java+LWJGL: www.github.com/ra4king/LWJGL-OpenGL-Tutorials/

Alright no worries