Jesse Welch
Jesse Welch

Reputation: 63

LWJGL not working

I'm working on a homework assignment to modify code given by my professor using LightWeight Java Game Library. The problem is that I can't fully load the test code to begin testing modifications. I've linked against the jar file as it says to in the modifications, but I still have one lingering error. The import statement

import org.lwjgl.util.glu.*;

Cannot be resolved, so I have errors on the following lines, spread throughout the code:

textures[0] = GLApp.makeTexture("green.bmp");
GLU.gluPerspective(45.0f,
                   (float)Display.getDisplayMode().getWidth() /
                       (float)Display.getDisplayMode().getHeight(),
                   0.1f,
                   100.0f);
GLU.gluLookAt(cameraX, cameraY, cameraZ, lookX, lookY, lookZ, 0.0f, 1.0f, 0.0f);

Any ideas on what is going wrong?

Upvotes: 0

Views: 3495

Answers (2)

kap
kap

Reputation: 36

that import is found in the lwjgl_util.jar so you need to also link to that in addition to lwjgl.jar.

you can visit the lwjgl irc channel at #lwjgl on freenode.net if you need further help.

Upvotes: 2

meriton
meriton

Reputation: 70564

It seems a stretch to conclude from an unresolvable import that LWJGL is not working.

Anyway, eclipse doesn't find the package in the classpath. You could verify whether that package is contained in the jar you are using (rename .jar to .zip, open in explorer and check whether it contains a folder matching the package name). If no, it might be spelling error in the import, or a different (version of) the jar than your professor uses. If yes, you did not correctly include that jar in your build path.

Upvotes: 0

Related Questions