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

Pages: 1 ... 12 13 [14] 15
196
General / Re: Looking tips, for draving tiled background
« on: January 10, 2013, 09:42:10 am »
Thanks on the information   ;D.

197
General / Re: Looking tips, for draving tiled background
« on: January 09, 2013, 11:46:13 pm »
The fps i get is
470 - 480 on release
270 - 280 on debug
with 32x24 tiles per second
Then you don't have a performance issue, so I understood you wrong. :)

What i was asking for any cool ideas how not to call sf::RenderWindow.draw() function so many times.
Did you look into the posted links above?
Have you checkout what 'sf::VertexArray' is?
Or did you just ignore all that?

What i am trying to achieve is decrease CPU usage. Even at the cost of memory.
It's simply to fix, just limit your framerate. You screen anyways can't handle 300-400 images per second and thus the cycling is just a waste of power. ;)
This can be achieve either with window.setFramerateLimit(60) or window.setVerticalSync(true), but you shouldn't mix them!
I was checking documentation and what it actually is and does(refearring to 'sf::VertexArray'), its just a thing i was looking for.
And for performance issues, well i ... uh, depends what performance issues is defined as, and i have one am trying to improve/reduce.

I was just looking for way to decrease CPU usage. So weaker devices can handle my application.

Thank on help.

198
General / Re: Looking tips, for draving tiled background
« on: January 09, 2013, 11:23:21 pm »
Compiler version? SFML version?
This has to do with graphics, so next time please choose the right section post it in. ;)

Did you make your benchmarks debug or release mode? Because in the end what's important is the release mode.

A quick search in the forum would've gotten you to topics like:
http://en.sfml-dev.org/forums/index.php?topic=10205.0
http://en.sfml-dev.org/forums/index.php?topic=9846.0
...

That is use a sf::VertexArray.
Oh silly me...
Using SFML 2.0 with Visual studio 2010. yesterday i used CMake to build the dll files.
The fps i get is
470 - 480 on release
270 - 280 on debug
with 32x24 tiles per second

What i was asking for any cool ideas how not to call sf::RenderWindow.draw() function so many times.

What i am trying to achieve is decrease CPU usage. Even at the cost of memory.

Google hates me. How do i check what version my compiler is in Visual studio 2010?

199
General / Looking tips, for draving tiled background
« on: January 09, 2013, 10:37:57 pm »
Hello.
What i have problem is, that i draw 32x32 tiles on 1024x768 screen and i get high CPU usage during this operation. The obvious cause is that i call sf::RenderWindow::draw() function too many times (768 times to be exact).
By commenting out the sf::RenderWindow::draw() calls decrease CPU usage from 60-70% down to 10%.

I currently conflict this problem by decreasing the amount of tiles i draw to screen.
Any suggestions, tips?

200
Audio / Re: Just by declaring sf::Music application returns error
« on: December 01, 2012, 06:33:00 pm »
That's exactly what i did.
Only thing is that i cant find OpenAL32.dll i just see soft_oal.dll which they say to rename to OpenAL32.dll and use it.
Whats what i replayed last time :P.
Thanks on time and good help, with good fortune.

201
Audio / Re: Just by declaring sf::Music application returns error
« on: December 01, 2012, 01:11:28 am »
Don't use a random openal32.dll, use OpenAL Soft 1.14 (it's explicitely mentionned in the task tracker).
Well i didn't really find much info how to get it from web.
But it  said just rename soft_oal.dll to OpenAL32.dll in readme. And it seems to work as good as last one.
Tho application still takes 10 sec to open...

202
Audio / Re: Just by declaring sf::Music application returns error
« on: November 30, 2012, 08:24:07 pm »
Downloading a random OpenAL32.dll and replacing the one from sfml fixed the error.
But now my application takes about 10-15 seconds to start...

Thanks FRex on pointing me!

203
Audio / Re: Just by declaring sf::Music application returns error
« on: November 30, 2012, 07:40:49 pm »
I have a big application(game)
It runs as expected. But when i shut it down and code comes to being destroyed i get this error
Quote
At C:\C++\HeroesPath\main.cpp:18
Continuing...
Program received signal SIGSEGV, Segmentation fault.
In ?? () (C:\Windows\system32\nvoglv32.dll)
Its after return at closing brackets,
Tracing the error i fount out it is from declaring a sf::Music object.
The problem does not occur when using Visual studio 2010

As for linking it dynamically, yes i am linking it this way.
It does not give me error that .dll couldnt be found.

Might be related to issue https://github.com/SFML/SFML/issues/30
This audio bug is really fishy, esecially that old openal32.dll fixes it..
Ok il check it up, thanks. The search on forum is not working for me :(

204
Audio / Just by declaring sf::Music application returns error
« on: November 30, 2012, 06:52:13 pm »
Hello.
Am doing this
int main()
{
    sf::Music audio;
    return 0;
}
Process returned -2147418113 <0x8000FFFF> execution time : 0.100s
Press any key to continue.

I had huge program and was commenting out peace by peace until i stumbled on this.
Why is declaring sf::Music giving me error ? i also tried downloading latest snapshot build and also build my own with cmake and MinGW for codeblocks and am still getting this error, why is that?
Also what can i do to fix this?

Am coming from a post on gamedev.net if you need more info
Quote
http://www.gamedev.net/topic/635055-sfml-application-on-exit-dosent-return-0/

EDIT::
I just tried reproducing error with VisualStudio2010 Express and i was unable.
The error occurs with CodeBlocks10.05 using GCC/MinGW.
Any tips how to fix it on codeblocks?

205
General / Re: Minimizing application on alt+tab keypress
« on: November 28, 2012, 02:56:12 pm »
I am trying to minimize the application window when user alt tabs.
Note that this is not the usual behavior on Windows. Alt+Tab brings the window you select to the front and gives it focus, leaving others how they are.
Mhm... when am in "game" and i press alt + tab and select other window the "game" loses focus.
I am unsure where sf::Event::LostFocus gets its info from, but its triggered when alt + tab is pressed.

206
General / Re: Minimizing application on alt+tab keypress
« on: November 28, 2012, 02:51:54 pm »
After mayor fight with bugs here is how i done it.
Using "windows.h" and sfml events

Here is how i done it in a nutshell if anyone needs it.

when sf::Event::LostFocus is triggered i do following
if isFullScreen == true{save all data of window, create a new window that is not fullscreen "NOTE most update handle from window.h when you recreate a new window", limit frames per second to 1 to save process, and using windwos.h function ShowWindow(myWindow, SW_MINIMIZE), make infinite loop where games only handles 1 event "sf::Event::GainedFocus" }

else { limit frames per second to 1, make infinite loop where games only handles 1 event "sf::Event::GainedFocus}

when in this infinite loop the sf::Event::GainedFocus is triggered

if isFullScreen == true { recreate old window using data that was stored "NOTE most update handle from window.h when you recreate a new window" and use windwos.h function ShowWindow(myWindow, SW_RESTORE) to restore window to its previous location and info, turn off limit on FPS, break the infinite loop and go into game}

else{turn off limit on FPS, go intro normal game related stuff / break the infinite loop};

207
General / Re: Minimizing application on alt+tab keypress
« on: November 28, 2012, 01:30:13 pm »
took me 5,
But i am wondering does SFML have a function to do this.
And you answered no, Thanks on help.

208
General / Minimizing application on alt+tab keypress
« on: November 28, 2012, 01:00:34 pm »
Hello.
I am trying to minimize the application window when user alt tabs.

I tried using void sf::Window::setVisible(bool visible)
but it hides drawing window but also hides from taskbar and user cant access it ever again.
also when in console it gives this "Failed to share openGL context"

Does sfml support this, or i most go OS specific function?
Also how to invoke the "Minimize" on a window using windows7?

EDIT::
The problem is fixed at 5th replay to this post(Scroll down), if your having problems go check it out.

209
Graphics / Re: c++ sfml. Text displayed as blurry
« on: November 11, 2012, 09:41:10 pm »
Id be damn, it works...
Thanks for the info, will spread it.

Passing int as parameters to setPosition(); removes blurr

Also moving it around does not help.

210
Graphics / Re: c++ sfml. Text displayed as blurry
« on: November 11, 2012, 08:52:33 pm »
You mean move text ?

Pages: 1 ... 12 13 [14] 15