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

Pages: 1 ... 86 87 [88] 89
1306
Window / Get the Window FPS
« on: January 29, 2009, 08:22:59 pm »
Thanks! Worked like a charm with accumulating the time.

But now I have to solve a way to make the alpha-value change for the image based on the time given. I tried with Sprite::SetColor(); before, it didn't really do anything....

I had like this to try it but the display didn't change:
Code: [Select]
sf::Sprite sprite;
sf::Color color;
for(int i = 255; i >= 0; i--) {
color.a = i;
sprite.SetColor(color);
// And then I drew it to the display
}


Ow yeah, sorry, It's off-topic. But my solution to this was to use Image(Color(0, 0, 0, 35)) instead. But that ends up with that I can't change the color.

** EDIT **
Never mind, I fixed it

1307
Window / Get the Window FPS
« on: January 29, 2009, 08:06:34 pm »
Quote from: "Laurent"
The frame time is the duration of the last frame. So it will always give you the actual FPS.

I'm not sure why you need this information, it's usually only needed for debug display. The frame duration is actually a much more useful information.


Well as I said in my edited part of the last post. I want to specify the "duration" of the fade.
Though I maybe only need the frame duration. Who knows

Thanks.

1308
Window / Get the Window FPS
« on: January 29, 2009, 07:52:16 pm »
Quote from: "Laurent"
FPS = 1 / GetFrameTime()


Donno if that will work for me.

I'm kind of making a "BlackOut" - fade effect for like changing scene. And the scene change includes initiation of the new scene, etc. etc and the initiation of the BlackOut object.

So the GetFrameTime() could be longer than the time for one frame. Or am I wrong? Will GetFrameTime never go above max-seconds for a frame? Like if FPS is 20 then it will never go above 1 / 20?

**EDIT**

Ow yeah, I don't want you to think that I'm letting you do the work for me. I'm trying out various things. I have a simple solution of where I just draw the image for fading 15 times. But I want to be able to regulate it by specifying a time.

1309
General discussions / SFML 2.0
« on: January 29, 2009, 07:36:30 pm »
Sounds promising :)
Even though I'm new to SFML ;)

Though I'm wondering what the change will be to PostFX? Will sf::Shader be easier or what?

1310
Window / Get the Window FPS
« on: January 29, 2009, 07:25:43 pm »
I can't seem to find a function like: GetFramerateLimit(); for Window.
Soo.... Is there some other way to find the value for what the current frame rate is?
I know how to get the time since the last display update but that won't do it.

1311
Window / Create your own events
« on: January 21, 2009, 01:24:39 pm »
Can I somehow create my own events? Like making an event called "HoverOverButton" or something like that?

1312
Graphics / sf::Text destructor crashes app
« on: January 19, 2009, 11:42:00 pm »
Wierd thing, you said the default font did it? I told my sf::String object to use another font with: "text.SetFont(font);" but I still get the same thing.
Do I have to use the constructor to avoid the error?

1313
Feature requests / Event Messaging/Mailing
« on: January 19, 2009, 11:29:29 pm »
Looks interesting. Will have a look at it under my Programming Lesson. Don't think the teacher will complain ^_^

Thanks for the tip.

1314
Graphics / sf::Text destructor crashes app
« on: January 19, 2009, 11:10:21 pm »
Hmm you don't have a destructor for either classes. Couldn't be that the default destructor is messing something up? Though I can't think of a reason why it would.

I'll put some cout here and there and see if I can narrow down the error.

1315
Graphics / sf::Text destructor crashes app
« on: January 19, 2009, 10:52:50 pm »
Your sure it's the font? Since It happens when the String is removed? I'll have a look at the source code and see If I can find anything.

Does this happen for everyone or is it isolated?

1316
Feature requests / Event Messaging/Mailing
« on: January 19, 2009, 10:50:47 pm »
Well since this isn't Ruby I have to implement an abstract base class too. Kinda like Drawable. Ruby has it easy for itself as you don't have to take note to the type of the object when calling functions (When you are actually sending a message to the object).

Though If I get a complete system working. I'll be sure to post it at the Wiki, though under what name?

1317
Graphics / sf::Text destructor crashes app
« on: January 19, 2009, 10:45:25 pm »
I don't know much of the internal functions of the library.

But I'm working at Windows at the moment, but it feels like I would get a SEGMENTATION FAULT if I would have done this in Linux. So my guess is that somewhere we tries to dealloc NULL or something.

1318
Feature requests / Event Messaging/Mailing
« on: January 19, 2009, 10:34:43 pm »
I got this idea from Rubygame. In Rubygame they got the classical Event Polling but you can extend the EventQueue class with a MailQueue module which gives EventQueue the ability to have objects subscribed to it together with an event. And when that event is polled it is sent like a mail to each object subscribed to that event making it much easier to make interactive objects.

Would it be possible to add this to SFML? If it is I can help out with writing it.
I think I've written it several times for SDL/Xlib though calling it SignalSender instead.

1319
Graphics / sf::Text destructor crashes app
« on: January 19, 2009, 10:13:12 pm »
It's probably me that has done something wrong. But every time I try to run my application with sf::String it crashes when it shuts down(working perfectly until then). When I uncomment the line where I create the object the error disappears.

Can't see what's wrong.

1320
Graphics / Images and OpenGL
« on: January 17, 2009, 12:06:09 am »
Wow, I fixed it, replaced: window.Clear() to glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); instead.
I used it before and it didn't help much, but it seems like I made something wrong that I must have changed.

Pages: 1 ... 86 87 [88] 89
anything