General FAQ

From LWJGL

(Difference between revisions)
Jump to: navigation, search
(General)
(General)
Line 24: Line 24:
Its pretty easy to use, just download the package and have a look at the examples included in the source code on how to use it.
Its pretty easy to use, just download the package and have a look at the examples included in the source code on how to use it.
 +
'''LWJGL's API starts with GL11, GL12, GL13, etc, how can I use it without needing to add those to every OpenGL method?'''
'''LWJGL's API starts with GL11, GL12, GL13, etc, how can I use it without needing to add those to every OpenGL method?'''

Revision as of 23:05, 31 October 2010

Frequently Asked Questions

This page is a collection questions that occur from time to time. If you have a specific problem, please post a question to the forum.


General

Can I use LWJGL in commercial projects?

LWJGL is distributed under a BSD license which allows you to do whatever you want, as long as you include the LWJGL license, and any components you use (OpenAL, Jinput, Slick-Util, etc).


I have a problem with LWJGL, how do I get help?

There are a lot of options for getting help, most notably the IRC channel (#lwjgl on irc.freenode.net) and the Forum. We also have a forum on javagaming.org.


How can I load images and sounds with LWJGL?

Well there are a number of libraries out there to allow you do this and you could always write your own image and sound loaders. However currently the recommended way to load various texture and sound formats in LWJGL is to use the Slick-Util library (note different from Slick2D).

You can get it from http://slick.cokeandcode.com/downloads/util/ and the javadoc is located at http://slick.cokeandcode.com/javadoc-util/

Its pretty easy to use, just download the package and have a look at the examples included in the source code on how to use it.


LWJGL's API starts with GL11, GL12, GL13, etc, how can I use it without needing to add those to every OpenGL method?

LWJGL's api is intentionally designed like that in order to allow you to easily target specific version of OpenGL. However if you do want to code without the class name before the method, you can simply just use java's static import feature.

e.g.

import static org.lwjgl.opengl.GL11.*;

adding the above will allow you to use all the methods in GL11 without adding the GL11. part before the method name. You can safely statically import all of the LWJGL opengl classes that you need as there are not conflicting method names.

Building LWJGL

Fetching the latest code from Subversion and running the ANT build.xml should build the lwjgl project jar files in libs/ and the natives in the subdirectories windows, linux, macosx or solaris.

Distributing LWJGL Applications

What options do I have to distribute my LWJGL Application?

There are a number of technologies that you can use.







Can I use LWJGL with GCJ?

Yes. GCJ 4.0 and greater support LWJGL applications and are able to compile executables. Do note at the time of writing this the GCJ garbage collector is very weak and likely to cause performance problems. It is possible however to write java code in such a way that produces very little or no garbage at all in which case GCJ is pretty good.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox