Okay so I was wondering, if you update the sub-image of a texture your using with a buffered image, shouldn’t it put the buffered image inside of the texture your using actively???
Ex: Say I have a bullet whole picture and a white wall. I get the place on the texture where the collision occurs. then I used a code similar to this :
public void updateSubTexture(GL gl, float xf, float yf) {
ClassLoader loader = Box.class.getClassLoader();
BufferedImage sourceImage;
try {
sourceImage = ImageIO.read(loader.getResource("Splat3.gif"));
//TextureData splat = new TextureData(GL.GL_RGB, 0, false, sourceImage);
TextureData splat = TextureIO.newTextureData(sourceImage, false );
int x = (int)(xf * 512f);
int y = (int)(512f - (yf * 512f));
myTexture.bind();
myTexture.updateSubImage(splat, 0, x, y);
} catch (IOException e) {
e.printStackTrace();
}
}
Shouldn’t I get this “Splat3.gif”'s contents onto my textures surface?? Or is does this do something completely different. Right now it kind of works, but the image that is showing up is entirely black box(possibly appropriate to the image size) and just not what I have drawn. Any ideas? Graphics card issue maybe?
:EDIT: Here’s a picture for better visualization haha
Right now I am just painting walls haha, it’s pretty fun but it’s not exactly what I had in mind…