lwjgl

Where can I find sample uses of LWJGL?

I have seen the official demos on lwjgl.org but I would like to see some more tutorial level examples. ...

Texturing Vertex Buffer Objects

What I want to do is drawing a (large) terrain with OpenGL. So I have a set of vertices, lets say 256 x 256 which I store in a vertex buffer object in the VRAM. I properly triangulated them, so I've got an index buffer for the faces. // vertexes glBindBufferARB(GL_ARRAY_BUFFER_ARB, vertexBufferId); glVertexPointer(3, GL_FLOAT, 0, 0); //...

Java: Getting JPen to work with LWJGL

Hello, For the last few days I've been trying to get the JPen (pen tablet input library) to play nice with LWJGL, but I can't for the life of me get it to work. The initial problem was getting a Component to give to JPen, but using one of the AWT examples from LWJGL should fix that, as they give you access to a Frame and Canvas. What I...

opengl frustum culling without glGet* calls

Various examples of view frustum calculations are using glGetFloatv() to get the current projection and modelview matrices (GL_PROJECTION_MATRIX, GL_MODELVIEW_MATRIX), and based of that do some view frustum culling. I have read that glGet* is something you do not want in your main render loop; "Using "Get" or "Is" functions slows ...

Browser based 3D games with LWJGL in Java

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? ...

Compiling Java LWJGL project with NetBeans (package org.lwjgl does not exist)

I try to compile a (LWJGL) Java project using NetBeans. I clicked on the project -> properties and under Libraries -> Compile. I added the Jars location, the source files location and javadoc location. Still when I try to build the project I get the error: package org.lwjgl does not exist. What can I do to resolve this error? ...

Opening a LWJGL window from a SWT app on Mac

I have a SWT app that opens a OpenGL window (using the LWJGL library) after a button is pressed. It is supposed to close it's main SWT window and open a new one with an OpenGL context. Works fine on Windows. On Mac, I get this error: 2010-03-05 02:28:25.315 java[1315:a07] [Java CocoaComponent compatibility mode]: Enabled 2010-03-05 02:2...

lwjgl 101: How can I write the basics?

EDIT: So apparently I was doing everything right, but I had a different problem that made it look as if I was doing something wrong. Sorry about that. --me, newbie This ought to be really simple, but I cannot for the life of me figure out how to compile anything with lwjgl and have it work. I can write something like package gwison; i...

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.lwj...

lwjgl 101: How can I write applets?

I have a working app in lwjgl. It doesn't do much yet; I've just started, but it does compile and run like it's supposed to. I want to make it into an applet. I've followed the guide here, and I have an applet that runs nicely and displays text and such in the applet area and can access the functions of lwjgl (like Sys.alert), but I can'...

Noob question: Draw a quad parallel to the view.

Hi all, ok what I want to do is to draw a quad in the scene that lays on a plane parallel to the view. So it should appear flat. More in particular, I think I didn't get very well how the mechanism of gluLookAt works in comparison with the functions glTranslate and glRotate: If I position the view "manually" using the functions glTran...

Producing an anaglyph rendering with LWJGL ???

Hi, How to produce an anaglyph rendering with LWJGL ? Help me! Thanks ...

Memory Size Allocation on GPU - opengl texture loading question

I'm loading pixels from an image which is 32 w by 32 height. The format I'm loading them in is ARGB via java. When I bind this to the video card, I can expect that the video card might use somewhere around 32*32*4 bytes, or 4K. Similarly, 1024 w, 1024 h would be 1024*1024*4 = 4MB. Is my understanding correct? Now I understand wh...

lwjgl: How can I use glCallLists?

So I have a bunch of addresses for my display lists. I can do those and get those on the screen with GL11.glCallList(address) easily enough. My problem is that I don't know how to use the potentially more efficient GL11.glCallLists(something) to call a bunch of lists with one native call. I've tried creating an IntBuffer with IntBuffer i...

What are the possible reasons for textures not appearing in GLSL?

I was learning about how to use textures with GLSL (in LWJGL) to create a simple fragment shader that blurs a texture. The first attempt (for testing purposes) was a very simple shader which just takes the original color values: uniform sampler2D rectTexture; void main(){ vec4 color = texture2D(rectTexture, gl_FragCoord.st); gl_Fra...

Java LWJGL in Eclipse

Hello, I want to use the LWJGL library in Eclipse, I extracted the files into C:\javalibs\lwjgl. Now when I try to test the LWJGL library like this: C:\javalibs\lwjgl>java -cp .;res;jar\lwjgl.jar;jar\lwjgl_test.jar;jar\lwjgl_util.jar;jar\lwjgl_fmod3.jar;jar\lwjgl_devil.jar;jar\jinput.jar; -Djava.library.path=C:\javalibs\lwjgl\native\wi...

RTS like Mouse in an isometric view (LWJGL)

I really have an issue with mouseclicks in an isometric view. Simply i have a flat map, and, like i said, a camera in an isometric view. Now when i click in the window i want to get the Coordinates where i clicked on the map. Any Help? ...

Open format for 3d models in an OpenGL application?

Hi, I am looking to develop a game for opengl and wondering what format you recommend for using internally. The idea being to open up for contributions so some format with a lot of features, open, available and quite possibly also sample loading/rendering. Platform is java and lwjgl.org I've been looking at collada but not sure it's su...

UV mapping for a dome?

Hi, I am trying to understand how can I change UV mapping of a dome, I need a different texture map projection than this one coded below: protected final void createDome(final float radius) { int lats=16; int longs=16; GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glBindTexture(GL11.GL_TEXTURE_2D, textures2x4[0].getText...

IcedTea and lwgjl

I have recently found myself on a Linux computer and am liking it so far. However, I have been having an issue and dont really know the source. I am trying to make a java project that uses lwjgl in eclipse (something I have done in windows) but when I run the code my display window comes up black and blinking and I get this error report...