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

Author Topic: How to show an image on a window?  (Read 2961 times)

0 Members and 1 Guest are viewing this topic.

TheProff

  • Newbie
  • *
  • Posts: 1
    • View Profile
How to show an image on a window?
« on: April 20, 2019, 12:51:03 pm »
I am making a program to explore the Mandelbrot set in C#. The function I have (called renderset) works fine and spits out an image of the specific area you want. I would like to display this onscreen but I can't figure out how. I have tried to make it into a texture and then convert that into a sprite and display it but that doesn't work. (My window opens but is completely black)  Does anybody know a better way to do this or how to fix my current method.

Thanks for any help  :)

Link to code: https://pastebin.com/0jNnJY9A
« Last Edit: April 20, 2019, 12:54:03 pm by TheProff »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: How to show an image on a window?
« Reply #1 on: April 25, 2019, 10:21:43 am »
I feel like this should work just fine. Would have to debug it to find out what's going on. :-\
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything