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

Pages: 1 ... 3 4 [5] 6 7
61
Window / [Solved] Stretch to fit screen
« on: July 04, 2008, 03:40:56 pm »
Use a fixed value like
Code: [Select]
defaultView.SetFromRect(sf::FloatRect(0.f, 0.f, 1024, 768));

62
General / Windows in Linux
« on: July 02, 2008, 01:58:53 pm »
I also think that the window issue has something to do with compiz.
It doesn't play nice with OpenGL applications (Blenders interface is OpenGl based as well).
But I've never had the problem that you describe (except Blender, which refuses to run in windowed mode). Try to update your graphics drivers or use a different window manager.

63
General / Anoying problem
« on: June 27, 2008, 03:55:13 pm »
It could be a code related problem.
Maybe a buffer overflow.
Make sure that all pointers point to a valid location.

64
General / Anoying problem
« on: June 27, 2008, 03:35:56 pm »
Try to rebuild the whole project.

65
General / New SVN Version
« on: June 10, 2008, 07:27:47 pm »
Thanks for your reply.
I definitely agree on the last argument, it was just that I'm a big fan of exceptions  :).
IMHO exceptions do not break the code flow, they however require other programming techniques.

66
General / New SVN Version
« on: June 09, 2008, 05:02:34 pm »
Quote from: "Laurent"
As I don't use exceptions, there's no way to notify an error on loading failure. That's why you have to use the LoadFromFile function, which returns a boolean. And yes, this is all on purpose ;)

What are your reasons for not using exceptions?

Instead of writing (just to pick up the above code):

Code: [Select]

if(!FontSmall.LoadFromFile("./gamedata/gfx/FreeSansBold.ttf", 8))
      exit(EXIT_FAILURE);

if(!FontMedium.LoadFromFile("./gamedata/gfx/FreeSansBold.ttf", 10))
      exit(EXIT_FAILURE);

if(!FontBig.LoadFromFile("./gamedata/gfx/FreeSansBold.ttf", 12))
      exit(EXIT_FAILURE);


You could write:

Code: [Select]

try
{
     FontSmall.LoadFromFile("./gamedata/gfx/FreeSansBold.ttf", 8);
     FontMedium.LoadFromFile("./gamedata/gfx/FreeSansBold.ttf", 10);
     FontBig.LoadFromFile("./gamedata/gfx/FreeSansBold.ttf", 12);
}
catch (LoadingExeption& Ex)
{
     Ex.WriteErrorToLog(Log);
     return EXIT_FAILURE;
}


This way you could also provide constructors taking the filename (or something like sf::File, ever thought about that?) as a parameter directly.

It simplifies things a lot. (I was actually going to post this in feature requests.)

67
Graphics / Framerate > 1000
« on: June 03, 2008, 07:11:06 pm »
Same here.
It runs slower than normal but still not at the desired framerate.
And the same code was working before (with vsync enabled it still displays 75 fps).
The fps also seem to increase over time (when setting low rates such as 25 fps: fps <= 100 --> fps >= 4500).
It's likely that it has something to do with the new frame-limiting code, but I can't figure out what it is... :?

68
Graphics / sf::Sprite::GetWidth/sf::Sprite::GetHeight
« on: May 06, 2008, 07:28:26 pm »
They have been replaced by sf::Sprite::GetSize()
Code: [Select]

sf::Sprite::GetWidth()  --> sf::Sprite::GetSize().x
sf::Sprite::GetHeight() --> sf::Sprite::GetSize().y

69
General / Compatibility to other computers
« on: April 20, 2008, 07:20:37 pm »
Quote
I think this means having only one execution file without additional DLLs or something isn't possible while using SFML. You always have to add CRT files.

You could try to recompile sfml with /MT, but I never tried this.
Quote
You told me I would have to download the redistributable for computers without VC++. I didn't do so and my apps still worked. So is there no use of the redist in general or did I just have luck (my apps aren't too complex atm)?
Your target computer probably has them already installed (vista comes with them out of the box).

And stop worrying about those redists.
Most computers already have them installed.
If this is not the case you could tell the user to download them or you provide them along with your application.
Think about it:
There are applications that need the .Net-framework, which is much bigger.
Still it has to be installed in order to run them.

70
General / Compatibility to other computers
« on: April 20, 2008, 05:09:55 pm »
No, no, you got me all wrong.
You need to make a difference between linking sfml statically and linking the VC static runtime. Two completely different things.
Both (dll and static) versions of sfml are build with /MD and are linked against the dynamic runtime, so your application will have to be build using the same option, choosing either to link with sfml-dll or sflm-static (which again depends on your linker input).
There is nothing wrong with static linking in general. :wink:

71
General / Compatibility to other computers
« on: April 20, 2008, 02:13:40 pm »
This setting is related to the VC runtime only.
Static linking means that you include the library in your executable, dynamic linking uses an external shared library (.dll on windows, for example sfml-graphics.dll).
You could try to rebuild sfml with /MT, but I'm not sure if this is really a good idea.

72
General / Compatibility to other computers
« on: April 19, 2008, 06:17:16 pm »
Make sure that
Code: [Select]
Configuration Properties/C/C++/Code Generation/Runtime
is set to Multithreaded-DLL (/MD).
Mixing /MD (sfml) and /MT is known to cause problems.

Quote
All modules passed to a given invocation of the linker must have been compiled with the same run-time library compiler option
(taken from msdn)

73
General / Compatibility to other computers
« on: April 19, 2008, 03:11:02 pm »
As said above, static linking works just fine (the executables even run on Linux using WINE).
All you need to do is to provide the VC2008 redistribuables.
You can find more information here:
http://msdn2.microsoft.com/en-us/library/ms235299.aspx

You also might want to read this page (it's for the 2005 version, but it could help):
http://msdn2.microsoft.com/en-us/express/aa700755.aspx

There is no need for the stdafx and _tmain().
Just create a Win32 application and disable the option to use precompiled headers.
Then create a new source file with the main() function in it, it should work.

74
D / DSFML (a port to the D language)
« on: April 15, 2008, 10:10:40 pm »
This looks quite interesting.

BTW: Do you know any good D IDE (offering code completition etc.)?
I wasn't able to find one myself when I looked at D last year.
Has the situation changed?

75
General / Compatibility to other computers
« on: April 15, 2008, 06:17:45 pm »
Like dunce said, use TortoiseSVN or Subclipse (Eclipse plugin) (or even the command line).
More information on subversion:
http://subversion.tigris.org/

If you use the command line
Code: [Select]
svn co https://sfml.svn.sourceforge.net/svnroot/sfml sfml
should do the job.

The 1.2 SDK should work, too. You are probably missing the Windows SDK which doesn't come with the Express editions.
You can find it somewhere in the depths of Microsofts download center.
There are lots of resources on how to configure it for use with the Express edition.

Pages: 1 ... 3 4 [5] 6 7
anything