Member Avatar

How do I make a cube in javafx that have 6 different textures on each side of the cube? The only way I know how to solve this, is by making 6 imageviews and give them each a specific coordinates that make them look like a cube. Is there a other way to do this? Like, I like to give the cube later on lighting, and some rotations. It will be more complex if I use this method. Btw, I heard about Triangle Mesh, but I don't know how TextureCoords works. handy links: https://docs.oracle.com/javase/8/javafx/api/javafx/scene/shape/TriangleMesh.html https://docs.oracle.com/javase/8/javafx/api/javafx/scene/shape/Box.html

Member Avatar
0
26
Member Avatar

Im new to Java and when tring to get some textures into my game I got this error stated ImageIO cannot b resolved. Here is my code: import java.applet.Applet; import java.awt.Graphics; import java.awt.Image; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; public class gameLoop extends Applet implements Runnable, KeyListener{ public int x, y; public Image offscreen; public Graphics d; public boolean up, down, left, right; public BufferedImage background,foreground,w1,w2,w3,w4; public void run() { x = 100; y = 100; try { background = ImageIO.read(new File("gameBackground.png")); foreground = ImageIO.read(new File("gameForeground.png")); w1 = ImageIO.read(new File("playerWalk1")); w2 = ImageIO.read(new File("playerWalk2")); w3 = …

Member Avatar
0
26
Member Avatar

So i was simply following one of the opengl tutorials - http://nehe.gamedev.net/tutorial/loading_and_moving_through_a_3d_world/22003/ So everything works completely fine except one thing, when i load in textures with SOIL lib its not completely correct, but with GLAUX lib it works just fine but i dont prefer using GLAUX. Here is what i mean: with GLAUX - http://postimage.org/image/rz6lxzo9b/ with SOIL - http://postimage.org/image/4eg27jf0j/ Texture loading code with GLAUX (Dont mind the different filtering here): AUX_RGBImageRec *LoadBMP(char *Filename) // Loads A Bitmap Image { FILE *File=NULL; // File Handle if (!Filename) // Make Sure A Filename Was Given { return NULL; // If Not Return …

0
1

The End.