Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Hopuranium

Pages: [1]
1
Java / RenderTexture won't clear when moving the view of the renderTexture
« on: December 24, 2017, 04:14:34 pm »
Hello crab people :o,

I have an issue when I try to clear a renderTarget because when I want to, the area do not clear everything when I changed the center of the renderTexture position. I apply the texture of the RenderTexture in a sprite.

Inside the function that update the view:
View view = new View();
view.setSize(renderTexture.getView().getSize());
view.setCenter(CENTER);
this.renderTexture.setView(view);
 

Inside the function that render sprites in the RenderTexture:
renderTexture.clear(CLEAR_COLOR);

for (Sprite canvas : canvases)
      renderTexture.draw(canvas);

renderTexture.display();
 

Then in the RenderWindow main function:
Sprite sprite = ....;
sprite.setTexture(renderTarget.getTexture());
//LOOP
//view modifications
... using the first function
//graphics
window.clear();
window.draw(sprite);
window.display();
 

The problem is that the RenderTarget seems to not clear all the space. Then it let the previous drawings, and the next ones.

2
Hello Guy! (i'm french)

I'm working on a JSFML project for school.
And I have started to code a game on Windows using JSFML (and intelliJ) and it works well.
But I want to run the game (code) on Eclipse on Linux and the console throws me an exception:
with "UnsatisfiedLinkError " and says that there are missing files with .so.1 as extension in "jsfml.jar".

Thanks you ;)


Pages: [1]