Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: System specs  (Read 8084 times)

0 Members and 1 Guest are viewing this topic.

StDH

  • Jr. Member
  • **
  • Posts: 56
  • {⛺.⛺}
    • View Profile
    • Worst ever ^^
System specs
« on: June 16, 2014, 05:58:43 am »
wouldn't it will be nice to have some commands
to get system specifications like amount of ram ? :)
in windows it is thru GetSysytemMetrics() [ i hope i am right :) ]

# it could look like this:
sf::System::Cpu::Amount();
sf::System::Cpu::Speed(); [in Hz]

sf::System::Ram::Size(); [in KB]
sf::System::Ram::Usage(); return Vector2u(used, left);

sf::System::Gpu::Size(); [in KB] // i'm not so sure about writing this on my own
 

point: check if game can run of that system, or other :D
You can also use the specs for auto-configuration of the program's settings.

if this will be accepted, then i can write code for windows.
« Last Edit: June 16, 2014, 03:40:57 pm by SDH »
<StDH> Imagine a girl writing you this: My farts smell good
<Slipxy> married.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: System specs
« Reply #1 on: June 16, 2014, 07:42:41 am »
Quote
point: check if game can run of that system
And what if not? You quit with a nice error message? :P
Laurent Gomila - SFML developer

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: System specs
« Reply #2 on: June 16, 2014, 07:59:31 am »
Have you searched before posting? This might be interesting for you.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Xornand

  • Jr. Member
  • **
  • Posts: 78
  • C++ / Python
    • View Profile
Re: System specs
« Reply #3 on: June 16, 2014, 09:17:03 am »
IMO, it would be a nice addition. Something like that is already supported by SDL, so SFML implementing such functionality would seem like a natural approach.

Quote
point: check if game can run of that system
And what if not? You quit with a nice error message? :P
You can also use the specs for auto-configuration of the program's settings.


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: System specs
« Reply #4 on: June 16, 2014, 11:31:17 am »
Quote
You can also use the specs for auto-configuration of the program's settings.
That's a much better use case ;)
Laurent Gomila - SFML developer

Peteck

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: System specs
« Reply #5 on: June 16, 2014, 02:08:44 pm »
I also would like to see this feature. Will be very useful for auto-config as mentioned above.

StDH

  • Jr. Member
  • **
  • Posts: 56
  • {⛺.⛺}
    • View Profile
    • Worst ever ^^
Re: System specs
« Reply #6 on: June 16, 2014, 03:33:00 pm »
Quote
And what if not? You quit with a nice error message? :P
it was morning and nothing else I could think of :D

Quote
You can also use the specs for auto-configuration of the program's settings.
very nice idea, like in "Call Of Duty" and many others :) .
<StDH> Imagine a girl writing you this: My farts smell good
<Slipxy> married.

paupav

  • Full Member
  • ***
  • Posts: 156
    • View Profile
    • Email
Re: System specs
« Reply #7 on: July 26, 2014, 07:12:28 pm »
I agree, that way I could lower moveSmoothness in my game: http://en.sfml-dev.org/forums/index.php?topic=15910.0

dabbertorres

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • website/blog
Re: System specs
« Reply #8 on: July 26, 2014, 07:27:16 pm »
I use a header file I wrote: https://github.com/dabbertorres/systemInfo

Right now it's only complete for Linux, so I could use some help filling out Windows (partially done), and OSX (not even started).

It only depends on OpenGL and your system.

CypherStone

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Blog and Portfolio
Re: System specs
« Reply #9 on: August 19, 2014, 11:31:52 pm »
I've developed my own system class too, which allows me to auto configure my 3D rendering project to match the spec (with manual override). It also doesn't allow the program to run if the version of OpenGL is less than what I require.

I have extra features such as CPU usage, memory usage etc. that allow me to track in-game instead of using task manager. However, this would be too specific and don't think it would suit SFML. But something along those lines would be appreciated.

Jabberwocky

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: System specs
« Reply #10 on: October 29, 2014, 10:23:38 am »
Have you searched before posting? This might be interesting for you.

Unfortunately the links in that post are dead.

I'll add a related request.  I'd really like to see SFML log some basic info about the host computer, or else provide access to this data so I can log it myself.

Here's the most basic info I need:
Quote
GL_VERSION = 4.2.0 - Build 10.18.10.3308
GL_VENDOR = Intel
GL_RENDERER = Intel(R) HD Graphics 4600

That gives me the OpenGL version, the driver, and the graphics card.
This is invaluable information when collecting a log from a user who is having troubles with the game.

This info can be gathered with a couple simple calls from glew.h
Code: [Select]
glGetString(GL_VERSION);
glGetString(GL_VENDOR);
glGetString(GL_RENDERER);

This is what I do in my own project currently, to add this info to the log.  But I'm sure others would appreciate it.  And it would be nice if I didn't have to include/link to the glew stuff in my core app, but instead just rely on the SFML graphics lib.
« Last Edit: October 29, 2014, 10:28:10 am by Jabberwocky »

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: System specs
« Reply #11 on: October 29, 2014, 10:45:42 am »
This info can be gathered with a couple simple calls from glew.h
Code: [Select]
glGetString(GL_VERSION);
glGetString(GL_VENDOR);
glGetString(GL_RENDERER);

This is what I do in my own project currently, to add this info to the log.  But I'm sure others would appreciate it.  And it would be nice if I didn't have to include/link to the glew stuff in my core app, but instead just rely on the SFML graphics lib.
You do know that glGetString() and those definitions are part of OpenGL since at least 1.1 right? You don't have to include/link GLEW to access them, because they are provided out of the box, even on Windows. And yes... you will always have to link against your OpenGL library anyway when using SFML no matter whether you like it or not, so that is also not a reason not to be able to do this.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Jabberwocky

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: System specs
« Reply #12 on: October 29, 2014, 11:00:32 am »
You do know that glGetString() and those definitions are part of OpenGL since at least 1.1 right? You don't have to include/link GLEW to access them, because they are provided out of the box, even on Windows.

I didn't know that!  Thanks for the info.  In that case, my request is less important.

(edit)Although I imagine many users might still appreciate it.  Many of us use SFML because we don't know a lot about low level graphics code.

Turbine

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Re: System specs
« Reply #13 on: November 17, 2014, 03:05:53 am »
Have you searched before posting? This might be interesting for you.

Nexus, perhaps mainlining this community project would be an applicable use of SFML community development team powers. :3