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 - Domingo Diego

Pages: [1]
1
Window / [SOLVED] Window Transparency
« on: June 25, 2009, 06:38:50 am »
Hello

I think I might be doing this wrong as nobody has had this problem so far.
(Or maybe it's just not possible)

I'm trying to set the window's background color to be 0% Opaque.

However, when the window runs it runs at 100% Opacity regardless of what number I put in the 4th argument of the sf::Color's constructor.

Here's the code:
Code: [Select]
#include <SFML/Graphics.hpp>

int main()
{
sf::RenderWindow App(sf::VideoMode(800, 600), "Test", sf::Style::None);
App.SetFramerateLimit(600);

while (App.IsOpened())
{
sf::Event Event;
while (App.GetEvent(Event))
{
if (Event.Type == sf::Event::Closed)
App.Close();
}

App.Clear(sf::Color(0,0,0,0));

App.Display();
}

    return 0;
}


That creates a 800 x 600 frameless window that is, unfortunatly, black and completely opaque.

Am I doing this wrong? Is it not possible? (I did search, I couldn't find anyone asking this question...)

Edit:
I am using SFML 1.5

Pages: [1]
anything