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

Author Topic: [SFML 2] I need your help for the ATI fix  (Read 15993 times)

0 Members and 1 Guest are viewing this topic.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
[SFML 2] I need your help for the ATI fix
« Reply #15 on: March 02, 2011, 11:49:44 am »
It can't be a function, it needs to be a RAII class so that the automatic destruction performs the internal cleanup.
Laurent Gomila - SFML developer

Oneiros

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
[SFML 2] I need your help for the ATI fix
« Reply #16 on: March 02, 2011, 11:51:00 am »
Quote

I'd like to keep full words, this is one of my coding rules. So we'd be back to sf::Initialize(r).


I have the same rule :D

I think just "Initialize", "start" or "Render" won't be good for newbie, because they need to know what they init with it.

It's an action and we need to know on what this action ,... "act" and here we just create something so a verb (alone) is not a good idea I think.

Maybe somthing like "sf::InitializeRender" will be better than just "sf::Initialise"

Or much like say Devlin
Quote
sf::GraphicsEnabler;


or sf::Draw(ing)Enabler;

After all It's an objet that let us "Draw" something without an active render target.

And sorry for my english :s

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
[SFML 2] I need your help for the ATI fix
« Reply #17 on: March 02, 2011, 11:57:03 am »
Quote
After all It's an objet that let us "Draw" something without an active render target.

Nop. If you draw then you have a render target, so you don't need this class. This is more for loading images etc. before creating your render target.
Laurent Gomila - SFML developer

devlin

  • Full Member
  • ***
  • Posts: 128
    • View Profile
[SFML 2] I need your help for the ATI fix
« Reply #18 on: March 02, 2011, 12:43:24 pm »
sf::InitialContext;
sf::BackgroundContext;

Could be suitable in that case.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
[SFML 2] I need your help for the ATI fix
« Reply #19 on: March 02, 2011, 01:28:15 pm »
Perhaps sf::ThreadLocalContext? Even though "context" may be not clear for beginners, it's probably the most general and exact notion...
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
[SFML 2] I need your help for the ATI fix
« Reply #20 on: March 02, 2011, 01:37:00 pm »
Quote from: "Nexus"
Perhaps sf::ThreadLocalContext? Even though "context" may be not clear for beginners, it's probably the most general and exact notion...

I agree that this name is a perfect match according to what the class does. However I'm not convinced, it looks too complicated/technical to me. But I guess there's no perfect name for it, I'll have to find a compromise.
Laurent Gomila - SFML developer

Oneiros

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
[SFML 2] I need your help for the ATI fix
« Reply #21 on: March 02, 2011, 03:21:09 pm »
Oups yes i'm not actualy in graphic and made a mistake in my mind :oops:
Quote
Perhaps sf::ThreadLocalContext? Even though "context" may be not clear for beginners, it's probably the most general and exact notion...


I agree.(and will probably name my variable with "context")

Newbie will realy use sfml and graphics without any RenderTarget?

A window, It's the first thing that many tutorial I have seen, show to start.

A good doc with an simple explanation to beginner is more helpfull that just a name that can say something else in an other lib. (personnaly a use more technical/generic name for class name and use a variable name that show what i do with it in actual context)

something like this in doc :
Code: [Select]
   
// Create the main window
// If you want to work on graphics without having any RenderTarget(like RenderWindow, RenderImage,...) you have to create an instance of sf::???????.
// ex: sf::ThreadLocalContext BackGroundGraphic.
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");


Will more help me that just the name of this object and i have both technicaly name and meagningfull explanation of it.

If I begin, I just need this and if I want to know more I can see the doc for more detailled explanation.
Or search on web these term : thread, Context.(and if i'm not english  BackGround :D)

Spidyy

  • Sr. Member
  • ****
  • Posts: 493
    • View Profile
[SFML 2] I need your help for the ATI fix
« Reply #22 on: March 02, 2011, 03:59:56 pm »
Will that also fix the thread related problems, like loading renderImage in different thread? :p

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
[SFML 2] I need your help for the ATI fix
« Reply #23 on: March 02, 2011, 04:07:52 pm »
Quote
Will that also fix the thread related problems, like loading renderImage in different thread? :p

It's not supposed to solve anything else than the ATI crash. It's the same as before, except that there won't be a global context in the main thread anymore.

But let's focus on the name, I'll open a new topic for tests/comments/questions ;)
Laurent Gomila - SFML developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
[SFML 2] I need your help for the ATI fix
« Reply #24 on: March 02, 2011, 05:42:22 pm »
Well... we're dealing with a graphic context (meaning an environment where everything is ready to do graphics, not especially the "OpenGL meaning") and threads...

Thus.. I'd use something like GraphicContext and nothing more. I wouldn't add any information about the thread because I suppose that someone dealing with graphics and threading would probably know a little bit about threading and would understand that a graphic context is local to a thread. Anyway, that would be explained too.
Want to play movies in your SFML application? Check out sfeMovie!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
[SFML 2] I need your help for the ATI fix
« Reply #25 on: March 02, 2011, 06:32:46 pm »
sf::GraphicContext sounds good.

By the way, GraphicContext or GraphicsContext?
Laurent Gomila - SFML developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
[SFML 2] I need your help for the ATI fix
« Reply #26 on: March 02, 2011, 06:43:48 pm »
Uh.. I dunno :lol: . I suppose it could be both, I'll let you choose :P .
Want to play movies in your SFML application? Check out sfeMovie!

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
[SFML 2] I need your help for the ATI fix
« Reply #27 on: March 02, 2011, 07:20:53 pm »
Sometimes the simple terms are the best :)

I suggest GraphicsContext, since 1. the SFML module is called Graphics and 2. it's also "graphics card", "graphics processing unit", "graphics software" etc. (And of course 3. it's easier to pronounce :D)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
[SFML 2] I need your help for the ATI fix
« Reply #28 on: March 02, 2011, 10:01:16 pm »
I'll go with sf::GraphicsContext for now, and... I can still change it later if someone has a better idea ;)

But at least I can go on now.
Laurent Gomila - SFML developer

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
[SFML 2] I need your help for the ATI fix
« Reply #29 on: March 02, 2011, 10:48:24 pm »
sf::GraphicsContext or sf::RenderingContext would work. Though you could replace Context with Environment instead if you want it a bit more nooby friendly.
What you also could do is typedef if you want to have a newbie friendly name and a more accurate name as of what it does.

Though the thing is, can't you put in more functionality into it somehow? Maybe like extract what graphics card is being used or something like that. Just having an object exist feels inappropriate. If some functionality like that is put into it then Environment would be a perfect fit also give it a more logical existence.

Code: [Select]

int main()
{
    sf::RenderingEnvironment re;
    std::string someManufacturer = re.GetGraphicsCardManufacturer();
    std::string someModel = re.GetGraphicsCardModel();
    return 0;
}


Just an idea and is actually a useless functionality but would give the context/environment object some more use than just sitting there looking pretty.

Just came up with a use of this, if you can get a hold of the drivers version number, you can do a check-up and look if the drivers are old and warn the end user to upgrade his drivers. League of Legends does that when you enter a new game.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio