Texturing a cube

Started by DeadRabbit, September 15, 2015, 09:36:35

Previous topic - Next topic

DeadRabbit

I'm relatively new to openGL and LWJGL, can anyone point me in the right direction here? What is the proper way to texture a cube (with STB image) in terms of rendering? triangles/triangle strips, element buffer objs/index buffer objs? and do i have to draw every single triangle or can i make it efficiently? Oh and if anyone experienced can point me to the best way to learn openGL and shader programming (like books/tuts), this is pretty hard to grasp :p

FortressBuilder

learnopengl.com has tutorials on texturing and other OpenGL topics. It's in C++, but the OpenGL functions are the same in LWJGL.

DeadRabbit


emris

https://www.youtube.com/playlist?list=PLRIWtICgwaX0u7Rf9zkZhLoLuZVfUksDP

I think tut 5 and 6 will answer your question, or at least give you some idea of one way it can be done.
And his tuts are based on the modern dynamic rendering pipeline using shaders.
=====================================================
Nothing is impossible....except that the state of your mind makes it so.
=====================================================