1
\$\begingroup\$

I have begun to learn OpenGl and using JOGL. There's something I haven't found any actual or easy guide to though: how can I draw textures? For example, what kind of code would I need to draw a texture at (X, Y, Z) position? I want to use glDrawArrays() or glDrawElements().

\$\endgroup\$
  • \$\begingroup\$ I think this is really a "how to get started" question in disguise. Have you tried any tutorials? Have you looked for any tutorials? \$\endgroup\$ – Maximus Minimus May 31 '17 at 17:24
  • \$\begingroup\$ @LeComteduMerde-fou yes, I looked the tutorials. But in some drawing was by glBegin()/glEnd(), other used OpenGL 2 or less, and still other did not use JOGL. I would be very grateful to you, if you give me any tutorials about this theme. \$\endgroup\$ – wcobalt May 31 '17 at 18:28
  • \$\begingroup\$ So with "drawing a texture", you actually mean "drawing a textured quad", right? If you want to use modern GL, this means implementing the appropriate shader, setting up the uniforms, attributes and samplers and whatnot. Quick websearches yield some results, so it's indeed not clear what your actual question is... \$\endgroup\$ – Marco13 Jun 1 '17 at 0:21
  • \$\begingroup\$ @Marco13 I type in Google next: jogl draw textured quad but code of all results from first page use glBegin() / glEnd(). \$\endgroup\$ – wcobalt Jun 1 '17 at 10:39
  • \$\begingroup\$ For me, the first result for jogl texture example is forum.jogamp.org/… ... \$\endgroup\$ – Marco13 Jun 1 '17 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.