views:

408

answers:

1

I want to create a browser based 3D game using LWJGL with the Java programming language.

Can anyone please provide me with a small example of creating a window and a box in it?

+3  A: 

LWJGL mainly uses a wiki, forum, and IRC community to educate eachother.

Feel free to drop by #lwjgl on irc.freenode.net - there are alot of useful people hanging out there, including the creators of LWJGL.

You can find the wiki here.

To answer your specific question, you probably want to read this wiki entry: Basic Display

Another thing to note is that many of the famous NeHe tutorials have an LWJGL version of the source code listed at the bottom of the page. This basic tutorial may be what you are looking for: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=02

There's also an older tutorial by Kevin glass that teaches you how to write a 2D game, but the last chapter focuses on rendering it using LWJGL: http://www.cokeandcode.com/info/tut2d-4.html

On a side note, if you ever think about doing 2D-only games, check out Slick (also written by Kevin Glass). It uses LWJGL in the backend but provides an API that is familiar to Java2D users.

Matt
Last time I looked, the Nehe LWJGL tutorials were for a slightly old version of LWJGL.
Liam