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.


Messages - Daedheldir

Pages: [1]
1
The size of the shape wasn't actually the problem, the size of the render texture was, it was unable to contain all the detail I wanted it to. Thank you very much eXpl0it3r for your help!

2
I have found out that because my tile is 1 pixel wide it only draws one pixel from the texture regardless of the texture rect, not sure how to change that...

3
Still doesn't work :( In the meantime I swapped the rectangle shape for vertices because memory allocation started to become problematic, but even with vertices I can't draw them into render texture, while still using the  noise texture :(

EDIT:
I've just wrote a simple program that sets texture to a rectangle and then draws it into render texture, the render texture is then set to another rectangle, which is then drawn into the render window, and the result is a white rectangle, so I assume that the render texture only saves the shape and its color, not its texture :/ Is it intended ?

4
Hi everyone!

I have a question about sf::RenderTexture. I'm trying to create perlin noise tile map, but I want each tile to have a noise texture. It works when I draw all the tiles through render window, but having 1024^2 iterations in each drawing cycle isn't desireable... So I decided to draw them into sf::RenderTexture first, and then use that texture to draw only once, but when I tried that, the noise texture on the tiles is gone. Here is my code:

Code:
(click to show/hide)

Images:

Current effect when drawing the render texture
https://imgur.com/gO4Yy84

Desired effect
https://imgur.com/3pTNzn9

Am I missing something obvious?

Pages: [1]