Creating a window in 0.92

Started by philr, October 07, 2004, 13:28:29

Previous topic - Next topic

philr

Hi guys,

I have just come across lwjgl and have liked what I've seen so far. I downloaded 0.92 last night and have come across my first major problem: creating a window!

I'm following the ported versions of the NeHe tutorials http://lwjgl.org/wiki/tiki-index.php?page=Lesson+1 and they tell you to use the org.lwjgl.opengl.Window class, which appears not to exist. The Display class appears to have roughly the correct type of methods, although I am not sure the best way/order to call them in or even if this does what I need.

Also, I've noticed that the tutorial uses the GL11. I assume that this is faster than going through GL, but does it make that much difference?

Thanks for any help,

Phil[/url]

spasi

Hi and welcome!

Yes, you should use the Display class, the Window one existed in previous versions. Its functionality is now merged with Display.

As for GL11 (and 12,13,etc), my suggestion is to use it, as it "forces" you to know at what version the feature you are using was introduced. By the way, if you are using JDK 1.5 try the new static imports. Cleans up the code considerably.

Enjoy LWJGL! :)

philr

Thanks Spasi. I hadn't heard of the static import feature of 1.5 before. I wonder what else I've missed...

Phil

garazdawi

Well if you haven't heard of generics or enhanced for loops than you've missed that to. I saw a lit of all new features in Tiger somewhere but I can't seem to find it right now. It's in the java 1.5 documentation somewhere...
 put the 'laughter' back in 'slaughter'
The LWJGL Wiki Documenation


philr

Java 1.5 certainly seems to be a leap into the C++ direction (only better :)) I'm not so sure bout the autoboxing or the metadata stuff, but everything else looks good.

Now the stable version has come out I guess I should get downloading  :D

Phil

spasi

The metadata facility is great, especially for J2EE developers. Auto(un)boxing should be used with caution though. I actually find it quite useful for our tools developing, but of course, I don't use it in our engine.

My two favorites are generics and static imports.

One last thing: If you plan on making use of 1.5, make sure that your target users will have it. Not good if you're not distributing a VM with your game. :wink: