All Questions
4,644 questions
0
votes
0
answers
103
views
Perspective projection for a 3D-engine in java
General about the project:
I am trying to program my own 3D engine in java, but I have some issues with programming the camera right. What I have already programmed is a window and the 3d objects that ...
1
vote
1
answer
85
views
Java Graphics fillArc() is not precise enough
(Specifically, I'm using Graphics2D, but it inherits the fillArc() method from Graphics, so I listed the question under that class.)
The fillArc method accepts its parameters in the following order:
...
0
votes
0
answers
58
views
Bug in JDK 9+ in Linux: StackOverflowError in Graphics
Our AWT-based Java app is giving a StackOverflowError on Ubuntu Linux JDKs 11 to 23 frequently (but thread-stochastically). See 3 example stack traces below. Suggestions or commiseration? We've ...
1
vote
0
answers
24
views
Lit faces always rendering in front up in front JavaFX
I'm making a simple 3d viewer/editor app, and the renderer for some reason always renders the lit sides on top and unlit ones in the back. here is the full project
https://drive.google.com/drive/...
0
votes
0
answers
61
views
How can I fix transparent lines in my scaled images (Javax.swing)?
I am trying to make a small games with a native resolution of 320x180, then scale it up for a bigger window. but I'm getting transparent lines in my sprites.
right now I'm drawing to a BufferedImage ...
0
votes
1
answer
81
views
How can I fix the lines in my 3D engine from glitching when they go offscreen in Java?
I'm coding a 3D Engine in Java, and I've noticed that whenever an object goes out of the camera's view, the lines go all crazy all over the screen. The object also reappears onscreen, but upside-down.
...
1
vote
0
answers
45
views
BufferedImage.Type_INT_RGB and BufferedImage.TYPE_INT_ARGB drawing differently?
I noticed that when trying to draw a square with a black border for BufferedImage graphics it works fine if it is instantiated as TYPE_INT_RGB but it deforms if the BufferedImage was made as ...
0
votes
1
answer
40
views
Overlay a Logo and Details on an Image After Capture
I am trying to achieve a result similar to the photo below. I want to display the file information, address, and logo in the top right corner of the image. I have developed an application that allows ...
2
votes
0
answers
48
views
Widgets HiDPI but pixel-accurate layout placement and graphics
I'm making a modern-looking application (in the same theme/style as IntelliJ IDEA) that's DPI aware and everything should be pixel-accurate.
I'm using FlatLaf as the theme.
I'm forcing -Dsun.java2d....
0
votes
1
answer
59
views
Illegal Argument when trying to draw
I'm trying to draw a chess piece on the board I created but keep getting an error that seems my picture can't be found.
Exception in thread "main" java.lang.IllegalArgumentException: input ==...
-1
votes
1
answer
48
views
Only one texel rendering during mass batch rendering using SSBOs
First, this is my second time asking this question. The first time, I was given many different tips that I applied into this new question.
Currently, I am working upon a 2D tile renderer. Switching ...
1
vote
1
answer
81
views
Screen resolution scale in JavaFx game
I'm creating a board game in JavaFx, and it works fine in my desktop PC, with a 1920x1080 screen. When i try to open it in my Laptop (which is 1920x1080 as well, but with the default screen size at ...
3
votes
1
answer
112
views
How can I reduce the flickering in this java program?
I'm new to Java graphics, so most of this code is stuff I've gathered from the internet and injecting it into my own program. This program is meant to have a red square, controlled by the arrow keys, ...
1
vote
1
answer
47
views
Flipping (inverts) Y axis in a Codename One
Here's the code that inverts the y axis to draw from bottom to top (rather than top to bottom as usual).
import javax.swing.*;
import java.awt.Color;
import java.awt.Graphics;
import java.awt....
0
votes
0
answers
38
views
Custom Java 3D renderer is breaking when implementing a perspective projection
I'm not very experienced with Java or computer graphics, but I thought I'd try and program a rough 3D engine in Java as I've been finding APCS pretty fun. I've gotten as far as implementing vertices, ...