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

Author Topic: sf::RenderTexture <-- Colorkey ( SFML2.0)  (Read 2718 times)

0 Members and 1 Guest are viewing this topic.

Criminull

  • Newbie
  • *
  • Posts: 5
    • View Profile
sf::RenderTexture <-- Colorkey ( SFML2.0)
« on: January 24, 2012, 10:51:57 am »
Hi there,  in my rpg tile game i started having troubles with low performance caused by huge maps,
instead of iterating containers (32x32) i just created one texture with all map-ground sprites being drawn on it, worked perfectly
but theres a problem with the second surface of my map - objects which are drawn on Map surface,
sf::RenderTexture doesnt read Colorkey, and when i render my objects, map is hidden by the (255,0,255) colorkey

i think that on creating rendertexture we should be able to choose a color that we dont want to render, this function is only able to do with sf::Image now ;/

@edit
how stupid i am, after i wrote this post, i managed to apply objects just on the map render texture, oh damn

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
sf::RenderTexture <-- Colorkey ( SFML2.0)
« Reply #1 on: January 26, 2012, 12:52:26 am »
You could as well use an image format for your textures that supports real alpha transparency (i.e. PNG). There's no real need for color keying IMO.

 

anything