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 - seb.dd

Pages: [1]
1
Window / OSX: GetFrameTime() causes SIGABRT signal
« on: October 31, 2009, 02:50:21 pm »
Quote
Instead, use intervals or <,> comparators. Here you could use time > 0.f.


so i improved the comparison: "if (time > 0.f || time < 0.f)"
but it changes nothing.

2
Window / OSX: GetFrameTime() causes SIGABRT signal
« on: October 31, 2009, 02:08:11 pm »
Quote
I tested it and couldn't get 0 even after the window is closed.


i tested it again and you're right. the zero is thrown right after program start. though the signal is recieved at return of test(). i changed the fps code to this:

Code: [Select]

// fps
char buffer[16];
int fps = 100;
float time = App.GetFrameTime();
if (time != 0.f) fps = int(1.f / time);
else printf("zero!\n");
sprintf(buffer, "fps = %d", fps);
App.Draw(sf::String(buffer));


i get the "zero!" right after program start.
but the signal on closing the window is avoided by "if (time != 0.f)"
?

@ Hiura: thanx for tips. do you mean those commands may cause the signal? i assumed that old c-libraries are assimilated by c++ and that for instance "#include <cmath>" would be standard c++.

3
Window / OSX: GetFrameTime() causes SIGABRT signal
« on: October 30, 2009, 07:58:24 pm »
oh no, i got a feeling GetFrameTime() just returns zero after window was closed...

edit:
yes it does. if this behaviour was intended the documentation should point it out.

4
Window / OSX: GetFrameTime() causes SIGABRT signal
« on: October 30, 2009, 07:52:14 pm »
GetFrameTime() causes a SIGABRT signal after Close() was called on the render window.
the signal is recieved at the return of test() and kind of crashes the application.

Code: [Select]

int test()
{
// Create the main window
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SIGABRT");
App.PreserveOpenGLStates(true);

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

App.Clear();

// fps
char buffer[16];
int fps = 100;
fps = int(1.f / App.GetFrameTime()); // this causes the signal
sprintf(buffer, "fps = %d", fps);
App.Draw(sf::String(buffer));

App.Display();
}

return EXIT_SUCCESS;
}

int main()
{
return test();
}

5
General / can't compile first tutorial on intel macbook pro (xcode)
« on: October 26, 2009, 07:47:06 pm »
setting the project's active sdk from "Use Base SDK" to "Mac OS X 10.6" solved the problem,
though i don't know what exactly the difference is and whether this is a good solution :)

6
General / can't compile first tutorial on intel macbook pro (xcode)
« on: October 26, 2009, 05:28:58 pm »
this is the code:
Code: [Select]

////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Window.hpp>


////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
    // Create the main window
    sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");

    // Start main loop
    bool Running = true;
    while (Running)
    {
        App.Display();
    }

    return EXIT_SUCCESS;
}


i get 220 preprocessor and compiler errors. first in the list is:
Quote
Config.hpp:122:19: error: climits: No such file or directory


in case the crt library is not linked correctly. how do i do it manually?
may be some of the million project build settings must be adjusted,
but the starting tutorial alone doesn't do it...

7
Window / 2 mouse event questions
« on: October 24, 2009, 02:31:08 am »
Quote
Do you mean you currently need to do exactly ten slow ticks to get a SFML mouse wheel event ?


around 9 - 12 slow ticks ...

as for the other statements: i understand this is not as simple and that you already have figured out some sophisticated compromise.
and yes, this luring magic mouse possibly opens up a new category anyway ;)

8
Graphics / OpenGL / VC++ / GLU / Linker
« on: October 21, 2009, 04:57:07 pm »
oh and there's still this one:

Quote

Unhandled exception at 0x7738fb14 in XT.exe: 0xC0000005: Access violation reading location 0xcccccccc.


... when the render window is created ... well, enough for today ... need some fresh air ;)

9
Graphics / OpenGL / VC++ / GLU / Linker
« on: October 21, 2009, 04:38:16 pm »
Quote
Seems like you didn't link it  
ยด

ah, thanx. i didn't know including other libs than sfml was necessary.

Quote
you don't have to include GL headers yourself


i want my vector class to know opengl. but it should not depend on sfml, because i have to share it with non-sfml-projects an keep it reusable.
or what about given complex 3d-data-structures that use ogl datatypes and include gl.h but have nothing to do with sfml.

Quote
<windows.h> must be included before any OpenGL header.


now i'm confused. how can my code be platform independent when i have to include <windows.h> ? guess it's just that #include that has to be changed then...

... ah ... maybe my understanding of "platform independence" was too strict ...

10
Graphics / OpenGL / VC++ / GLU / Linker
« on: October 21, 2009, 03:55:40 pm »
building a project from my XCode/MacOS source code on VC++/Vista got me a lot of trouble... especialy the use of opengl.

i still get this linker error:
Quote
unresolved external symbol _gluPerspective@32 referenced in function ...


includes:
Quote
#include <SFML/Graphics.hpp>
#include <GL/glu.h>


seems like GLU isn't linked correctly.

another problem is that: classes that must be independent of sfml but rely on gl.h produce strange compiler errors. it complains about missing ';' before 'WINGDIAPI' in gl.h.

what should i look for?

11
Window / 2 mouse event questions
« on: October 16, 2009, 04:21:40 am »
thanks for quick responses!

never used an apple mouse. a common mouse like mine lets you feel the
wheel ticks. and as a user i expect one tick to have some effect.
with faster movement sfml seems to fire more events per tick but slow
movement (in this case camera movement) feels tenacious. i'm working
at the latest imac with a standard logitech mouse and standard configurations.
in my case 0.5 would mean one event every 5 slow ticks.

just an idea: let's handle it similar to framerate independent animation.
sfml would not care about system dependent values but instead just
notice whether or not the wheel has been turned up/down.
e.g. for a maximum of 50 events per sec: when at least 20 ms have passed
and the wheel float value is != 0 then sfml would divide elapsed ms by 20
and generate a move event with that. the value can be scaled to match
non-apple systems but acceleration and sensbility would be back in the
programmers hands.

Quote
1) The delta is not provided directly as it can be calculated very
easily. I don't understand what your problem is with that.


no real problem here. just wondered how this event type can be useful.
i think deltas would be more appropriate. but maybe it was designed for
a purpose that i just can't imagine right now... i suggest storing both :)

12
Window / 2 mouse event questions
« on: October 15, 2009, 04:45:57 pm »
hello everyone! after getting a lot of help from reading the forum i finally registered :)

first i must admit how i love the framework!

i've been looking for such a thing for a long time, did a lot of comparing,
messed around with sdl and even started writing my own cross platform
library before discovering this rising star. it's exactly what i never hoped to find.


what i like to know:

1)  the mouse move event holds the absolute mouse position wich i'm not
interested in when processing a move event. i could read absolute values
from sf::Input as well. to get delta values i have to save the old position
each frame and manually compute the difference. so in the end the move
event makes no sense to me at all. is there an easier way to get relative
movement values when processing a mouse move event or will this be
fixed in future releases?

2) when scrolling in some application like firefox my mouse wheel works
fine: each "wheel click" moves the page a little. when "scrolling" on my
sfml window it takes around 10 "wheel clicks" in the same direction to
finally fire a mouse wheel event which might be exhausting for the user ;)
(setup: osx / sfml 1.5 / windowed mode) any ideas?

Pages: [1]
anything