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

Author Topic: SFML2 not working on GeForce  (Read 4790 times)

0 Members and 1 Guest are viewing this topic.

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
SFML2 not working on GeForce
« Reply #15 on: October 20, 2011, 07:04:46 pm »
Quote from: "Laurent"
But do you know where it stops?

EDIT sorry, I missed your other message. So now it works but you don't see anything, right?


Yes, sorry, it has always ran the app but I don't see anything.

EDIT: I think I found the problem - when you create a window, I was using sf::Style::None (which I need so the user does not see the titlebar). If you change it to sf::Style::Titlebar, then it runs fine!

Strange!
SFML 2.1

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML2 not working on GeForce
« Reply #16 on: October 20, 2011, 10:00:51 pm »
Very strange indeed :?
Laurent Gomila - SFML developer

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
SFML2 not working on GeForce
« Reply #17 on: October 21, 2011, 10:12:15 am »
It is. I will do more testing and post back here later.

The good news is that SFML works on this platform, so the fundamentals are OK, it's just a bug (or "hidden feature" :)) somewhere..
SFML 2.1

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
SFML2 not working on GeForce
« Reply #18 on: November 04, 2011, 06:04:40 pm »
This one again.

I'm going to try and explain my problem

I have a target machine which has a 1360x768 monitor, physically rotated 90 degrees anti-clockwise (so "top left" pixel is actually bottom-left).

I create a window which is 1360 wide by 768 high.

I then create a View like this:
Code: [Select]

window1View.Reset(sf::FloatRect(0,0,1360,768));
window1View.SetViewport(sf::FloatRect(0,0,1,1));
window1View.Rotate(270);
window1.SetView(window1View);


I then display a full screen image (which is a rectangle 768 wide by 1360 high).

This is what I see (the red box is the image, and is 472x1064). I scaled the image down 75% so it's not massive :)



So I am missing 296 pixels of the image on the left (or it's positioned 296 too far left). Also the height of the image is incorrect too. But anyway, it makes no sense to me!

Can anyone help?
SFML 2.1

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML2 not working on GeForce
« Reply #19 on: November 04, 2011, 06:19:40 pm »
When you rotate the view, it is rotated around its center point (1360/2, 768/2). So the origin of the world (0, 0) is not visible anymore in the view. But your rectangle is located at (0, 0). So basically you can only see a part of it.

Don't hesitate to draw things on a paper -- I couldn't figure out the situation until I did so :D
Laurent Gomila - SFML developer

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
SFML2 not working on GeForce
« Reply #20 on: November 07, 2011, 04:49:49 pm »
Working now. I had to change the center of rotation. This stuff is mind-bending......
SFML 2.1