LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: harish on February 13, 2016, 14:13:04

Title: Images as Buttons at certain position
Post by: harish on February 13, 2016, 14:13:04
Hi everyone..I am new to LWJGL. I have loaded a 3D model .obj(house like structure).Now ,I need to load some jpg images and they should be displayed on the inner surface of my house like structure.
And one more thing..the images should act like objects which can be chosen by user.
Please Help Me..Thank you.
Title: Re: Images as Buttons at certain position
Post by: Kai on February 13, 2016, 14:29:08
Use stb (demo here (https://github.com/LWJGL/lwjgl3/blob/master/modules/core/src/test/java/org/lwjgl/demo/stb/Image.java)) with LWJGL 3 to load image files in order to upload them to an OpenGL texture object.
The texture coordinates in your Wavefront OBJ file will determine how that texture is being mapped onto your model.
Title: Re: Images as Buttons at certain position
Post by: Hydroque on February 13, 2016, 23:46:32
Along with the model, you need to define these using the program you are using. If you don't know how to do this, it is as simple as painting or wrapping.