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 - BlackPhoenix

Pages: [1]
1
Graphics / Grabbing a shape with the mouse
« on: July 30, 2010, 09:44:46 pm »
Hello,

The title pretty much says it all. I want to grab a small circle that I draw with the mouse, and move it. Like drag and drop.

Also I wonder why the code below doesn't work

Code: [Select]
while(Input.IsMouseButtonDown(sf::Mouse::Left))
            selector.SetPosition(Input.GetMouseX(),Input.GetMouseY());


Thanks

2
Graphics / Wierd problem: Transparent render window
« on: May 23, 2009, 12:38:18 pm »
I unistalled the drivers, rebooted and then installed the latest and rebooted again. While running the application, the gpu reads a temperature of 54-56 Celcium which is normal I think. For all I know it may even be a bug of the source engine  :D

3
Graphics / Wierd problem: Transparent render window
« on: May 22, 2009, 02:28:19 pm »
Quote from: "nitram_cero"
Try reinstalling the drivers (uninstall, reboot, install, reboot) and checking if the GPU cooler is working correctly. An overheated GPU could be going erratically nuts :)


I installed the latest drivers but the problem persists, and my vga is fanless (nvidia 7600 gt)...Anyway, it seems to be the kind of problem that requires a format to be solved, and I definitevely wont be doing that. I'm getting used to restarting the pc every time i want to work on my project. Thanks for all your help  :)

4
Graphics / Wierd problem: Transparent render window
« on: May 19, 2009, 08:32:18 pm »
Quote from: "SamuraiCrow"
What's the alpha-blending set to on the background color?


I'm using the standard value through App.Clear() so I guess it's 255. I've narrowed down the problem. It occurs after launching a game from Steam, so far only games based on the source engine, like Half life 2 or Team Fortress 2.

5
Graphics / Wierd problem: Transparent render window
« on: May 18, 2009, 07:38:50 pm »
Thanks for the input, no I use a standard 4:3 17" lcd monitor. 800x600 with 32bpp is listed as a supported mode... Problem returns every time I switch on the pc. Maybe it has something to do with OpenGL not initializing correctly, or my vga?

edit: Ok just downloaded another project using SFML from the SFML projects subforum and had the exact same problem, meaning it is not my code generating this behavior... Maybe I havent installed it correctly? But then why dont I get any errors, and worse why does it work sometimes? I'm totally clueless   :(

6
Graphics / Wierd problem: Transparent render window
« on: May 14, 2009, 11:03:39 pm »
Hello,

I'm having a very wierd problem that I cannot explain at all. I'm using SFML 1.4 with Codeblocks 8.02. So here's what happened:

I tested yesterday my program and the window displayed stuff, as it was supposed to. Today I decided to go on with my Pong project but when I run the program again, the window showed nothing. I mean it was like it was transparent, showing the background of the desktop. Actually I had the same problem 2 days ago when I decided to return to making Pong after a long time. Well I remember that the last time I left it, it actually showed stuff, but when I run it again 2 days ago, nothing. Well I didnt care much at the time and went on to update a lot my code, almost done it all again, so i dont know what have I done to fix it  :( . Sorry if it's a bit confusing...Here's my main(), I think it's a standard clear draw display loop...

Code: [Select]
int main()
{
    // Create the main window
    sf::RenderWindow App(sf::VideoMode(800, 600), "Pong!");

    //Board pong;

    float32 timestep = 1.0f/60.0f;
    int32 iterations = 10;

    BoardActors pong(30.0f,&App);

    // Start the game loop
    while (App.IsOpened())
    {
        // Process events
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
                App.Close();
        }

//ignore that stuff
        //pong.board_physics->world->Step(timestep,iterations);
        b2Vec2 pos = pong.board_physics->ball->GetPosition();
        std::cout<<pos.x<<"\t"<<pos.y<<std::endl;
        //std::cout<<pong.board_physics->player2->IsStatic();


        //Drawing
        // Clear screen
        App.Clear();
        pong.updateGraphics();
        pong.board_graphics->draw();

        App.Display();
    }

    return EXIT_SUCCESS;
}


pong.board_graphics->draw()
Code: [Select]

void BoardGraphics::draw()
{
    display->Draw(lowerBound);
    display->Draw(upperBound);
    display->Draw(player1);
    display->Draw(player2);
    display->Draw(ball);
}


I also tried creating a simple circle to display but that didnt work either  :(
What am I doing wrong?

edit: Ok it seems that I've posted on the wrong subforum... Sorry about that, mods please move the post to the Window subforum.

It seems that I've solved the problem, though not sure if this "solution" will last...The only thing I've changed was this:

Code: [Select]

sf::RenderWindow App(sf::VideoMode::GetDesktopMode(), "Pong!",sf::Style::Fullscreen);


Actually it doesnt make any sense at all, because I switched back to the original right after I saw that it worked on fullscreen and 1280x1024 and...it worked again. Could it be that 800x600 is not a valid video mode??

7
General / Problem with integrating SFML into wxWidgets
« on: March 05, 2009, 08:47:38 pm »
I get the exact same error too...Can anyone help?

Pages: [1]