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

Author Topic: White Window  (Read 3162 times)

0 Members and 1 Guest are viewing this topic.

Kaphonaits

  • Newbie
  • *
  • Posts: 21
    • View Profile
White Window
« on: January 03, 2011, 01:35:17 am »
For some odd reason my SFML program won't render anything until I mouse over it, or press a key or do anything that qualifies as an event.

How do I fix this?
The keyboard is mightier than the sword.

Wander

  • Full Member
  • ***
  • Posts: 170
    • View Profile
    • Email
White Window
« Reply #1 on: January 03, 2011, 02:41:02 am »
Do you have a
Code: [Select]
Window.Clear(); right before you draw the first item?
This might help. I'm not sure if this is the reason or not.
-Wander

Terrydil

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
White Window
« Reply #2 on: January 03, 2011, 03:12:39 am »
Or perhaps your drawing code is actually inside your event handling code, so nothing would get drawn until an event gets handled.

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
White Window
« Reply #3 on: January 03, 2011, 03:36:31 am »
Quote from: "Terrydil"
Or perhaps your drawing code is actually inside your event handling code, so nothing would get drawn until an event gets handled.


I'd place a bet on that : )

Wander

  • Full Member
  • ***
  • Posts: 170
    • View Profile
    • Email
White Window
« Reply #4 on: January 03, 2011, 03:40:15 am »
I think I would have to agree. ;D
-Wander

Kaphonaits

  • Newbie
  • *
  • Posts: 21
    • View Profile
White Window
« Reply #5 on: January 03, 2011, 04:56:43 am »
That was it! (Damn, I swear I had put it outside of the event loop)

Thanks.
The keyboard is mightier than the sword.

 

anything