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

Author Topic: Is there any way to use custom blend mode without recompilling library?  (Read 1487 times)

0 Members and 1 Guest are viewing this topic.

Shelim

  • Newbie
  • *
  • Posts: 2
  • Still in Kansas
    • View Profile
    • Personal page
I have to specify very unusual blend mode (DestAlpha) for custom object derived from sf::drawable and I don't want to recompile entire SFML (because it will break down in next SFML update). Is there any way to do this without such recompillation (like writing custom OpenGL code?). Just as side note - I am drawing object which don't have textures, only colors.
Do not follow where the path may lead — go instead where there is no path and leave a trail.

Danger? Hah! I walk on the wild side! I laugh in the face of danger! Ha! Ha! Ha!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10916
    • View Profile
    • development blog
    • Email
Re: Is there any way to use custom blend mode without recompilling library?
« Reply #1 on: August 24, 2013, 07:27:26 pm »
You can use the full power of OpenGL with SFML. How you actually do it, is a different question and since I've no knowledge in OpenGL I can't answer it. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Shelim

  • Newbie
  • *
  • Posts: 2
  • Still in Kansas
    • View Profile
    • Personal page
Re: Is there any way to use custom blend mode without recompilling library?
« Reply #2 on: August 24, 2013, 08:25:26 pm »
How you actually do it, is a different question and since I've no knowledge in OpenGL I can't answer it. ;)
I don't have much knowledge in OpenGL either, so I need some directions :)
Do not follow where the path may lead — go instead where there is no path and leave a trail.

Danger? Hah! I walk on the wild side! I laugh in the face of danger! Ha! Ha! Ha!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Is there any way to use custom blend mode without recompilling library?
« Reply #3 on: August 24, 2013, 08:54:37 pm »
You won't be able to render an SFML object with a custom OpenGL blend mode. If you go the OpenGL way, you must handle everything with it.
Laurent Gomila - SFML developer

Ancurio

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Is there any way to use custom blend mode without recompilling library?
« Reply #4 on: August 31, 2013, 08:23:11 pm »
Why not just clone the repo and keep your personal branch with additional blend modes? Unless Laurent completely breaks the blending code you should be able to keep up with master just fine.

 

anything