LWJGL
June 19, 2013, 08:37:47 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.9.0 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: Basic 2D Textures (Sprites) Solely Using LWJGL  (Read 2566 times)
cholo71796
Newbie
*
Posts: 1


« on: April 19, 2012, 19:10:57 »

I'm trying to draw 2D images using LWJGL. When I search for this in Google I get stuff about doing it in C++. If I add "LWJGL" I get a thread on this forum directing the OP to NeHe... I also get the Space Invaders example on the LWJGL wiki. However, since I don't understand how to do what I want to do, the vaguely commented code there doesn't help much.

Can someone explain rendering textures to a quad in LWJGL for me or direct me to a source that does? It would be greatly appreciated.
Logged
mattdesl
Newbie
*
Posts: 26


« Reply #1 on: April 19, 2012, 20:22:13 »

Since LWJGL is just a thin wrapper around OpenGL, most tutorials will tend to be in C++ or another non-Java language. Also, most tutorials expect you to have at least a basic understanding of what OpenGL is and how it works.

So I'd suggest reading up on the basics, first:
http://arcsynthesis.org/gltut/

LWJGL ports:
https://github.com/rosickteam/OpenGL

Since OpenGL doesn't know anything about image decoders (PNG, GIF, JPG, etc) you will have to either write those yourself, or use an existing set of decoders like ImageIO (converting BufferedImage to ByteBuffer), or TWL's image decoders.

Alternatively, you could use Slick-Util, which packages some of these decoders into a small utility library. The space invaders tutorial should get you started with Slick-Util.

If all of this means nothing to you, then maybe you'd be better off starting with a higher-level library like Slick2D or LibGDX.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!