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

Author Topic: Video memory question  (Read 2323 times)

0 Members and 1 Guest are viewing this topic.

dydya-stepa

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Video memory question
« on: December 25, 2011, 01:23:22 pm »
what happens if the size of textures loaded is larger then the available video memory ?

Let's say I want to load 100 sprites in total 100 Mb but video card has only 64 Mb ?

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Video memory question
« Reply #1 on: December 25, 2011, 04:17:36 pm »
The driver manage that. Most likely say just that the operation for creating it failed.

And Sprites aren't that big and is not uploaded to the graphics card like that, I think you mean textures/images
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

dydya-stepa

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Video memory question
« Reply #2 on: December 25, 2011, 04:40:00 pm »
of course i do.

but still i don't get the idea. I will start creating images... Memory occupied by them reaches the video card limit - what happens then ?

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Video memory question
« Reply #3 on: December 25, 2011, 04:48:49 pm »
No one ever covered it for me but I see it as two different things that can possible happen, either the driver tells us (SFML) that the creation of the texture failed or the driver moves unused textures to the primary memory or the secondary. But we should just assume that the driver will fail if this happen. So just check if the Create functions return false.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

dydya-stepa

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Video memory question
« Reply #4 on: December 25, 2011, 06:34:21 pm »
and what should i do if it returns false? abort the game? what's the difference then with a just termination

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Video memory question
« Reply #5 on: December 25, 2011, 06:59:48 pm »
I don't understand the question? You want to know why SFML doesn't abort itself?

You are allowed to handle it however you want yourself. I tell my texture manager to collect unused textures and unload them. You can make an über smart system to handle this if you want. Or you can just keep it simple and abort of course.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio