Tagged Questions
11
votes
1answer
366 views
OpenGL - white edges on cubes
In a minecraft-like game I'm making, I get white edges on my cubes:
It is much more noticeable in darker textures. The textures are being setup like this:
glTexParameteri(GL_TEXTURE_2D, ...
10
votes
3answers
5k views
How can I make OpenGL textures scale without becoming blurry?
I'm using OpenGL through LWJGL.
I have a 16x16 textured quad rendering at 16x16. When I change it's scale amount, the quad grows, then becomes blurrier as it gets larger.
How can I make it scale ...
8
votes
2answers
441 views
What is the primary use of Vertex Buffer Objects?
From what I've read, it seems VBOs are purely for performance.
I'm working on a very rudimentary learning project in lwjgl and I'm just trying to figure out what more advanced features of the library ...
7
votes
1answer
5k views
Making a HUD/GUI with OpenGL (LWJGL)
I'm at the stage in my game development where I need to make a HUD or GUI. I've never gotten to this part, so I don't know how its done. I tried rendering a simple quad at a fixed position on the ...
7
votes
2answers
892 views
What causes some computers to have no or slow OpenGL, and how to fix it?
I am using Java with JOGL to create OpenGL enhanced 2D graphics. The graphics operations I use are nothing fancy, and should be supported by almost any recent graphics card. For example, my game ...
6
votes
2answers
581 views
How are dynamic blending shadows like this created?
I would like to know, how dynamic shadows, that 'blend' onto other objects, are created.
6
votes
2answers
377 views
An odd performance problem rendering a simple scene (less than 14k vertices) in OpenGL using two vbos with LWJGL
Problem
I have been having a strange degrading performance issue rendering a simple scene containing two "chunks" of 4x4x4 cubes each.
Video of problem
This is a screen capture showing my console ...
5
votes
3answers
591 views
Understanding how to create/use textures for games when limited by power of two sizes
I have some questions about the creating graphics for a game.
As an example. I want to create a motorbike. (1pixel = 1centimeter)
So my motorbike will have 200 width and 150 height. (200x150)
But the ...
5
votes
1answer
431 views
OpenGL: Resizing Display and glOrtho/glViewport
I have researched this question from several sources and have yet to find a firm answer saying that "yes that is correct thinking" or "no, here is how it's done."
I am trying to ensure resolution ...
5
votes
2answers
303 views
How does this snippet of code create a ray direction vector?
In the Minecraft source code, this code is used to create a direction vector for a ray from pitch and yaw:'
float f1 = MathHelper.cos(-rotationYaw * 0.01745329F - 3.141593F);
float f3 = ...
5
votes
1answer
971 views
What's the best way of drawing a glowing 3d line using LWJGL?
Sort of like a strip-light effect; not actually a light source, but just a polygon with glowing edges.
Can this be done easily? Right now I'm contemplating drawing a line more than once with varying ...
4
votes
2answers
159 views
3D models on 2D tilemap perspective when scrolling
I am creating a small top-down game, where the player traverses a 2D tilemap, with an illusion of depth provided by 3D models for things like buildings or trees.
Having gotten to the point where I ...
3
votes
3answers
355 views
Voxel engine artifacts
There are white little dots between blocks at random places, mainly at very near blocks. They disappear when I move the mouse and change the view direction.
I use Vertex Arrays with ...
3
votes
2answers
394 views
Disadvantages of using multiple versions of OpenGL in LWJGL?
So, I'm trying to figure out LWJGL, and my goal is to use OpenGL 3.2 (because pretty shaders are pretty). But in every tutorial I can find for LWJGL, they import a bunch of different OpenGL versions ...
3
votes
2answers
2k views
Texture antialiasing?
In my Minecraft-clone style game, blocks are textured with a border that is lighter then the block color. See picture below:
To achieve this effect without the textures being blurry I use this ...