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

Author Topic: PNG loader might be broken in 1.2  (Read 20827 times)

0 Members and 1 Guest are viewing this topic.

fixus971

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.fixweb.it
PNG loader might be broken in 1.2
« Reply #30 on: June 12, 2008, 01:44:02 pm »
Hi Laurent.
I think at GPU issue but
 VideoMode(1200, 900, 32) go nicely if I resize background image.
On Win2000 PC I have a good radeon 9800
My friend (developer) have a good one and newer.

It seem a loading problem, not sprite problem.

emm.. can be a problem regarded to the windowed mode?
^_^=>Il calcolatore è straordinariamente veloce, accurato e stupido. Gli uomini sono incredibilmente lenti, imprecisi e creativi. L'insieme dei due costituisce una forza incalcolabile. (Albert Einstein)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
PNG loader might be broken in 1.2
« Reply #31 on: June 12, 2008, 02:54:29 pm »
Ok, then I'll need more details. Which version of SFML ? What does the error output says ? Can you write a minimal code which reproduces the problem ?
Laurent Gomila - SFML developer

fixus971

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.fixweb.it
PNG loader might be broken in 1.2
« Reply #32 on: June 12, 2008, 09:32:52 pm »
Hi Laurent.
My dev friend said me that he try on ATI and IBM GPU of Laptop because now he use only Linux on the big PC.
Because now I have need to use it on laptop with a max graph of 1024..
I catted all big images and compress all texts.
I'm give that program to all my friends to test. ..
.. if you want to see what I do with your kindly SFML..


Now....
I made and tested new minimal test program
Can I send you .zip with im.png & .cpp & .cbp that I make for it?
Do you want to see my first application on SFML?

im.png is an image 1026x32 of 27kb

Program:
Code: [Select]
#include <SFML/Graphics.hpp>

int main() {
    sf::RenderWindow App;
    sf::String sfs;
    sf::Image im;
    App.Create(sf::VideoMode(1200, 900, 32), "Trasporter"); //1024x768
    if (!im.LoadFromFile("./im.png")) return EXIT_FAILURE;
    bool IsRunning = true;
    while (IsRunning) { // Programma simulazione in funzione
        sf::Event Event;
        while (App.GetEvent(Event)) { // Controllo eventi finestra applicazione compresi tasti premuti
            if (Event.Type == sf::Event::Closed) IsRunning = false;
            if (Event.Type == sf::Event::KeyPressed) {
                switch (Event.Key.Code) {
                case sf::Key::Escape:
                    IsRunning = false;
                    break;
                default:
                    break;
                }
            }
        }
        sfs.SetLeft(0);
        sfs.SetTop (0);
        sfs.SetText("OK, loaded! Press Esc to exit");
        App.Draw(sfs);
        App.Display();
    } // while IsRunning
    return EXIT_SUCCESS;
}




Thanks, Fixus
^_^=>Il calcolatore è straordinariamente veloce, accurato e stupido. Gli uomini sono incredibilmente lenti, imprecisi e creativi. L'insieme dei due costituisce una forza incalcolabile. (Albert Einstein)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
PNG loader might be broken in 1.2
« Reply #33 on: June 13, 2008, 03:09:59 am »
Why don't you use 1024 instead of 1026 ? If your GPU doesn't support non-power-of-two textures, you will end up with a 2048x32 texture internally.
Laurent Gomila - SFML developer

fixus971

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.fixweb.it
PNG loader might be broken in 1.2
« Reply #34 on: June 13, 2008, 05:41:03 pm »
Hi, my test code is only an example.
I don't know GPU very well but
I don't understand why I can't load a simple image
 if others soft don't have this problem.

Now it's not a problem for me.. no urgency.. I only want to learn.

Thx Laurent

PS: There is a place to put my SFML program as picture or exe.
I love to share source but in this I put a firm reserved code.
^_^=>Il calcolatore è straordinariamente veloce, accurato e stupido. Gli uomini sono incredibilmente lenti, imprecisi e creativi. L'insieme dei due costituisce una forza incalcolabile. (Albert Einstein)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
PNG loader might be broken in 1.2
« Reply #35 on: June 14, 2008, 03:46:00 am »
SFML uses hardware and 3D acceleration, so it depends on GPU capabilities. And the maximum image size is one of them.
Laurent Gomila - SFML developer

fixus971

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.fixweb.it
PNG loader might be broken in 1.2
« Reply #36 on: June 14, 2008, 11:48:50 am »
OK, Laurent.

I appreciate your SFML strategy :lol:

and your help in forum :P

Good work! Thanks.  :wink:
^_^=>Il calcolatore è straordinariamente veloce, accurato e stupido. Gli uomini sono incredibilmente lenti, imprecisi e creativi. L'insieme dei due costituisce una forza incalcolabile. (Albert Einstein)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
PNG loader might be broken in 1.2
« Reply #37 on: June 14, 2008, 12:33:20 pm »
I forgot to say that I'll try to add an automatic large image handling in version 1.4 ;)
Laurent Gomila - SFML developer

quasius

  • Full Member
  • ***
  • Posts: 166
    • View Profile
PNG loader might be broken in 1.2
« Reply #38 on: June 17, 2008, 10:50:54 pm »
Quote from: "Laurent"
I forgot to say that I'll try to add an automatic large image handling in version 1.4 ;)


Is there currently any kind of internal image space-optimization planned (or there now?)  (i.e. automatically grouping images together on one texture to reduce wasted white space)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
PNG loader might be broken in 1.2
« Reply #39 on: June 18, 2008, 03:05:33 am »
No, this kind of thing is not planned.
Laurent Gomila - SFML developer

NewbiZ

  • Newbie
  • *
  • Posts: 44
    • View Profile
PNG loader might be broken in 1.2
« Reply #40 on: June 21, 2008, 05:42:31 am »
Quote from: "quasius"
automatically grouping images together on one texture to reduce wasted white space
And binds! these are so time expensive!
~ Passer pour un idiot aux yeux d'un imbécile est une volupté de fin gourmet ~

quasius

  • Full Member
  • ***
  • Posts: 166
    • View Profile
PNG loader might be broken in 1.2
« Reply #41 on: June 21, 2008, 06:56:31 am »
Quote from: "NewbiZ"
And binds! these are so time expensive!


Yes.  If Laurent is not doing this, I likely will.  My project is targeting old hardware, so I'm trying to keep the specs as low as possible.  If I end up with something that cleanly implements with SFML, I'll probably post it.  But that is months down on my roadmap.
I'd also wait for Laurent to finish whatever he'll be doing with automatic image chopping of large textures before even touching it.

 

anything