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

Rendering Text in LWJGL

What is the simplest way to render text in LWJGL without any extra jars? I searched around and saw so many complicated solutions, I wondered what is the simplest way?
Amit Assaraf
  • 512
  • 11
  • 34
1
vote
2 answers

Java variables changing randomly

I'm working on a particle engine, in Eclipse on Windows 7, and I have a problem I've never seen before. I have this in my code: float start = startPosition.getY(); p.position.addTo(p.moveVector); float end = startPosition.getY(); if(start !=…
Elec0
  • 2,232
  • 3
  • 19
  • 25
1
vote
2 answers

How to overwrite a key press in LWJGL

i'm using the keyboard class from the LWJGL and am currently using if(Keyboard.isKeyDown(Keyboard.KEY_A)) { //move left } else if(Keyboard.isKeyDown(Keyboard.KEY_D)) { //move right } if i have the 'a' key down then the 'd' key it will move…
Alex Musk
  • 160
  • 11
1
vote
2 answers

How do I fix my Slick UnicodeFont from being upsidedown?

For some reason when I try to print out a string using Slick's UnicodeFont class it is upside-down. (NOTE: I am also using LWJGL, but I dont think its interfering with what slick is trying to do.) Initialized Code: …
bigbass1997
  • 175
  • 1
  • 2
  • 10
1
vote
1 answer

How would I read a sprite sheet in LWJGL?

I currently use LWJGL Textures to draw images on the screen. I would like to read Textures* from a sprite sheet. I am using slick's TextureLoader class to load the textures. I draw an LWJGL Shape and bind a Texture onto it. e.g: Me drawing an…
Amit Assaraf
  • 512
  • 11
  • 34
1
vote
1 answer

Mixed types in VBO?

Let's say I want to upload unsigned integer and float data to the graphics card, in a single draw call. I use standard VBOs (not VAO, I'm using OpenGL 2.0), with the various vertex attribute arrays combined into the single GL_ARRAY_BUFFER, and…
Engineer
  • 8,529
  • 7
  • 65
  • 105
1
vote
1 answer

Rotating a vertex using transformation matrix

I'm trying to rotate a vertex using the lwjgl Matrix4f class. I tried this code: float rotY = (float) Math.toRadians(180); Matrix4f transMat = new Matrix4f(); transMat.rotate(rotY, new Vector3f(0.0f, 1.0f, 0.0f)); …
Qualphey
  • 1,244
  • 1
  • 19
  • 44
1
vote
1 answer

How to access resource editor file to Netbeans

How to access resource editor file to Netbeans?/How resource editor files are imported and opened in Netbeans?Detailed description.
1
vote
2 answers

2-Dimensional Tile-Based Game: Each tile as an object impractical?

I've been trying various ways of creating a two-dimensional tile-based game for a few months now. I have always had each tile be a separate object of a 'Tile' class. The tile objects are stored in a two-dimensional array of objects. This has proven…
GlassZee
  • 1,117
  • 2
  • 11
  • 22
1
vote
1 answer

Why doesn't this want to draw more than once?

i'm learning opengl and I want to draw 50 texture(from one variable) this is what I do: in the update method: public void update(){ while(!Display.isCloseRequested()){ input(); for(int x = 0; x< 100; x++){ block =…
user1103589
1
vote
1 answer

LWJGL cursor trouble when resizing

I have probably a simple math problem that I'm having surprisingly hard time figuring out. I have a resizable LWJGL (OpenGL) window. The game I'm making is in 2D, but I use glFrustum() to get depth for my sprites. Here's a (little bit simplified)…
n00bster
  • 2,525
  • 2
  • 16
  • 15
1
vote
1 answer

Swing + LWJGL not rendering anything. Black Screen

I'm doing a Gr 12 Project. the basic idea is to render a map texture that can be changed via the swing GUI. I'm stuck at rendering using a Display that's .parented to a JFrame. Nothing is showing up and i cant figure it out. ive changed the…
Ross Borchers
  • 145
  • 1
  • 2
  • 11
1
vote
4 answers

Java opengl cubes render

Is it possible create 4 million cubes with a frame rate of 35 fps with java Opengl like minecraft? If it's possible how can I do that? And could you give me some examples of source?
user1491548
  • 111
  • 1
  • 9
1
vote
2 answers

LWJGL - Simple program not working

I'm following tutorials on the lwjgl wiki but when I run the program in the first tutorial nothing happens at all (no window appears). Here is my code for the program: public Test() {} public void start() { try { …
UltraViolent
  • 99
  • 1
  • 2
  • 9
1
vote
1 answer

No smoothing using UnicodeFont

I am attempting to draw a string using Slick2D's UnicodeFont. Unfortunately it looks Is there anyway to make it look nicer (with smoothing or antialiasing)? Here is my code GL11.glEnable(GL11.GL_BLEND); GL11.glLoadIdentity(); GL11.glOrtho(0,…
skynet
  • 9,898
  • 5
  • 43
  • 52