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

Pages: [1]
1
General / Documentation tutorial
« on: August 30, 2011, 02:03:03 pm »
thank you thank you thank you thank you thank you.


I'd got the debug version of sfml-graphics-d.dll, but I'd forgot to put the -d on the end of window.dll.

I knew it couldn't have been the code, but couldn't see the issue.

Did I say thank you?  :D

2
General / Documentation tutorial
« on: August 30, 2011, 01:10:46 pm »
This has got me stumped and very annoyed.

Just come back to SFML, used it in my second year at uni, and then in third year we went on to OpenGL, which I hated.
So now I'm trying to make some simple 2D games for my portfolio.

However, I'm stuck at just getting a simple SFML window to display.
The clock example in the tutorial for setting up sfml worked, and I have no link errors.

Here's my code
Code: [Select]


#include <SFML/Graphics.hpp>
#include <iostream>

int main()
{
    //create main window
sf::RenderWindow App(sf::VideoMode(800,600), "SFML test");


sf::Image Image;
if(!Image.LoadFromFile("ball.jpg"))
return EXIT_FAILURE;
sf::Sprite Sprite(Image);

while(App.IsOpened())
{
sf::Event Event;
std::cout << "event created" << std::endl;
while(App.GetEvent(Event))
{
std::cout << "inside while loop" << std::endl;
if(Event.Type == sf::Event::Closed)
App.Close();

}

//clear window
App.Clear();

App.Draw(Sprite);


//update window
App.Display();


}




    return EXIT_SUCCESS;
}


When I run with debugging, the error I get is :
Quote

Microsoft Visual Studio C Runtime Library has detected a fatal error in sfml-test.exe.
.
If I enter debugging, it says its on the line with "while(App.GetEvent(Event))".  (There is a green arrow on the line).


Still reacquainting myself with visual studio as I've been doing a lot of java in netbeans recently.

Can anyone help me before I start pulling my hair out?

Thanks

3
Window / OpenGL - first tutorial. Include window is not enough?
« on: October 14, 2010, 02:50:18 pm »
sorry for the thread revival, :D

Just has this problem, got it fixed with this thread though.

However, when the window opens, the screen will stay blank white until I move my mouse.  Then, if I leave my mouse still, the animation will pause for a few seconds, then update, then pause, then update etc.

If I move my mouse around in the window, the animation is smooth.

Is this supposed to be the case, the movement of my mouse seems to effect the motion of the cube, but I can't see how this could be true.

I have noticed this sort of behaviour on the net, where there is a video, and if you hover over the thumbnail, it runs through a few preview pictures, if I move the mouse around on them, it plays smoothly, if I don't, it usually just stays on the first image.


So basically, is this SFML related and the fact that it does it elsewhere is just a coincidence, or as I'm sarting to think, is there something messed up deeper within my system, (graphics drivers perhaps)?

Thanks, and sorry for the seemingly huge first post, :D

Pages: [1]