Questions tagged [lwjgl]

The Lightweight Java Game Library (LWJGL) allows access to high performance crossplatform libraries such as OpenGL, OpenCL and OpenAL to write state of the art 2D and 3D applications with Java.

The Lightweight Java Game Library (LWJGL) is an open source Java software library for computer game developers. In particular, it provides an interface for accessing OpenGL, OpenCL, OpenAL and GLFW functionality.

3245 questions
1
vote
1 answer

Faces are black/dark when lighting is enabled in LWJGL

I'm using LWJGL with Clojure and am having difficulty lighting a scene. I am drawing GLU.Sphere objects which are visible when lighting is off but entirely black when lighting is enabled. What am I doing wrong? (ns gltest.core (:import…
mattrepl
  • 602
  • 1
  • 6
  • 18
1
vote
2 answers

LWJGL - How to create a button to close the application

I have made it open a full screen window but now how can i create a button to have it exit the application? Also, do you know any good tutorials to learn. I can't seem to find many? Lastly can i use the opengl code that i learn to work with java in…
core16
  • 113
  • 2
  • 17
1
vote
1 answer

Mac LWJGL Display no maximization option

On windows, my LWJGL application is able to be maximized, as shown here: Maximization allowed http://img28.imageshack.us/img28/8428/maximize.png However, the same application on Mac does not allow you to maximize the display, as shown…
Braden Steffaniak
  • 2,053
  • 3
  • 25
  • 37
1
vote
2 answers

LWJGL, openGL multi-texturing

Lets say i have a pyramid... I know how to draw it, and i know how to set a texture for the whole pyramid, but how can i set a different texture for each wall? I set the texture by adding this GL11.glBindTexture(GL11.GL_TEXTURE_2D,…
Qualphey
  • 1,244
  • 1
  • 19
  • 44
1
vote
1 answer

LWJGL Slow rendering

I have made a simple LWJGL program where it makes a display and renders text to the screen. I render text with Slick-util btw. So my question is why does it take a couple seconds of a black screen(or whatever the clear color is) before it loads up.…
36redsoxfan
  • 250
  • 2
  • 5
  • 15
1
vote
1 answer

LWJGL Collision Detection flaw

I am currently using this code for 2D Collision Detection in my Space Invaders like game : for(byte k = 0; k < enemies.length; k++) { if(shot.x < enemies[k].getTexture().getImageWidth() && shot.x > enemies[k].pos.x) { if(shot.y -…
TV_Dinnah
  • 113
  • 5
1
vote
5 answers

How to import classes in Java without eclipse?

I'm sorry that this may seem like a basic question, but I need help on importing classes. I downloaded the Lightweight Java Gaming Library(LWJGL), but I don't know how to install it. When I try the test, it doesn't work. I have a folder in which I…
Impmaster
  • 187
  • 2
  • 10
1
vote
1 answer

How to speed up sandbox lwjgl game?

I am trying to make a sandbox (Voxel), open-world game. My game uses 32x32x32 block sets called chunks to store block data, each of these has 4 VBOs: vertex, primary color, secondary color, texture coords. These VBO's are stored in this…
adventurerOK
  • 798
  • 5
  • 11
1
vote
1 answer

Issues involving true type fonts and textures LWJGL

So I am trying draw text to the screen with a custom font, which I have done. The issue comes when using textures at the same time. I load my textures like this: int Texture{ try { InputStream in = new…
Voight_
  • 11
  • 3
1
vote
2 answers

Using LWJGL without making too much JNI calls

I want to draw a model with LWJGL and I know that on calling each glVertex method, a JNI call occurs, that is time consuming. Since I have the model in a file, I want to use just one JNI call (add a native method to LWJGL library), and at the native…
Kayhan Asghari
  • 2,817
  • 1
  • 28
  • 47
1
vote
0 answers

How to texture a model in LWJGL?

I have created some chess piece models, I created them in Blender, successfully exported as OBJ and loaded into my LWJGL program. They display correctly with lighting and color, etc. (YEAH!!) Now, being chess pieces, I would like it to have a wood…
nighthawk454
  • 943
  • 12
  • 20
1
vote
1 answer

LWJGL & Slick Coloring Quads Incorrectly

I'm working on a basic GUI for a map editor for a game engine. Everything works correctly except the program is only coloring some of the quads the color I want (gray), and it's coloring some others black, and I can't figure out why. Here's a…
Elec0
  • 2,232
  • 3
  • 19
  • 25
1
vote
2 answers

LWJGL GLSL Shader validity check always fails, though shader works fine

I have a function that checks whether or not the vertex/fragment shared was compiled successfully and is valid to use within LWJGL public static boolean isShaderValid(int shaderToCheck) { IntBuffer iVal = BufferUtils.createIntBuffer(1); …
codemonkey
  • 463
  • 3
  • 15
1
vote
1 answer

OpenGL multithreading in LWJGL (JAVA)

At the beginning of the game I'm loading models and stuff, it's taking some time and therefore there is an empty black screen while loading. So what I want to do is to put all the model loading and the display list creation into one thread and to…
MoonBun
  • 4,322
  • 3
  • 37
  • 69
0
votes
1 answer

GL15 is broken in lwjgl

When I try to call any GL15 function in lwjgl I get A NullPointerException. The problem is caused by a variable called caps inside GL15.class. Caps is loaded in the following way: ContextCapabilities caps = GLContext.getCapabilities();. After this…
jbills
  • 694
  • 1
  • 7
  • 22
1 2 3
99
100