1
General / wxWidgets and SFML2 Issues
« on: June 24, 2011, 11:32:36 am »
Hmm, then I don't know. I know that with 2.9 something changed with the handle or something - can't quite remember - so the code was not working any more.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
[...]
What flags did you use to compile? I couldn't reproduce all warnings with -Wall -Wextra...
Thor\Detail\MovedPtr.inl||In function 'bool thor::operator==(const thor::MovedPtr<T, OwnershipPolicy>&, const thor::MovedPtr<T, OwnershipPolicy>&)':|
Thor\Detail\MovedPtr.inl|153|warning: no return statement in function returning non-void|
Thor\Detail\MovedPtr.inl||In function 'bool thor::operator!=(const thor::MovedPtr<T, OwnershipPolicy>&, const thor::MovedPtr<T, OwnershipPolicy>&)':|
Thor\Detail\MovedPtr.inl|161|warning: no return statement in function returning non-void|
Thor\Detail\MovedPtr.inl||In function 'bool thor::operator==(const thor::MovedPtr<T, OwnershipPolicy>&, const thor::MovedPtr<T, OwnershipPolicy>&)':|
Thor\Detail\MovedPtr.inl|153|warning: no return statement in function returning non-void|
Thor\Detail\MovedPtr.inl||In function 'bool thor::operator!=(const thor::MovedPtr<T, OwnershipPolicy>&, const thor::MovedPtr<T, OwnershipPolicy>&)':|
Thor\Detail\MovedPtr.inl|161|warning: no return statement in function returning non-void|
Thor\Detail\SmartPtrImpl.inl||In function 'void thor::detail::ForwardDestroy(T*) [with T = thor::detail::ResourceSlot<sf::Image, thor::Resources::ImageKey>, U = thor::detail::ResourceSlot<sf::Image, thor::Resources::ImageKey>, OwnershipPolicy = thor::NoCopy]':|
Thor\Detail\SmartPtrImpl.inl:148|53|instantiated from 'thor::detail::SmartPtrImpl<T, OwnershipPolicy>::SmartPtrImpl(U*) [with U = thor::detail::ResourceSlot<sf::Image, thor::Resources::ImageKey>, T = thor::detail::ResourceSlot<sf::Image, thor::Resources::ImageKey>, OwnershipPolicy = thor::NoCopy]'|
Thor\Detail\MovedPtr.inl:38|16|instantiated from 'thor::MovedPtr<T, OwnershipPolicy>::MovedPtr(U*) [with U = thor::detail::ResourceSlot<sf::Image, thor::Resources::ImageKey>, T = thor::detail::ResourceSlot<sf::Image, thor::Resources::ImageKey>, OwnershipPolicy = thor::NoCopy]'|
Thor\Detail\ResourceManager.inl:132|102|instantiated from 'thor::ResourcePtr<Resource> thor::ResourceManager<Resource, ResourceKey>::AddResource(thor::ResourceManager<Resource, ResourceKey>::SlotIterator, const ResourceKey&) [with Resource = sf::Image, ResourceKey = thor::Resources::ImageKey, thor::ResourceManager<Resource, ResourceKey>::SlotIterator = std::_Rb_tree_iterator<std::pair<const thor::Resources::ImageKey, thor::detail::ResourceSlot<sf::Image, thor::Resources::ImageKey>*> >]'|
Thor\Detail\ResourceManager.inl:76|30|instantiated from 'thor::ResourcePtr<Resource> thor::ResourceManager<Resource, ResourceKey>::Acquire(const ResourceKey&) [with Resource = sf::Image, ResourceKey = thor::Resources::ImageKey]'|
Thor\Detail\SmartPtrImpl.inl|63|warning: statement has no effect|
sf.cpp(22196) : error C2039: 'PollEvent': Ist kein Element von 'sf::RenderWindow
'
int main()
{
// Create the main rendering window
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
sf::Image Image;
Image.LoadFromFile("<PathToImage>")
sf::Sprite Sprite(Image);
unsigned int Alpha = 255; //Used to store the alpha value
int Direction = -1;
// Start game loop
while (App.IsOpened())
{
// Process events
sf::Event Event;
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
App.Close();
}
Alpha += Direction
if(Alpha = 0) Direction = 1 //If Alpha is 0 then start increasing it
else if (Alpha = 255) Direction = -1 //Else if Alpha is 255 start decreasing it
// Clear the screen (fill it with black color)
App.Clear();
Sprite.SetColor(sf::Color(255, 255, 255, Alpha)); //Set the Alpha value of the color to the stored Value
App.Draw(Sprite) ///Draw the Sprite
// Display window contents on screen
App.Display();
}
return EXIT_SUCCESS;
}
int main()
{
// Create the main rendering window
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
// Start game loop
while (App.IsOpened())
{
// Process events
sf::Event Event;
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
App.Close();
}
// Clear the screen (fill it with black color)
App.Clear();
// Display window contents on screen
App.Display();
}
return EXIT_SUCCESS;
}
Top/Left------------------Top/Right
| |
| |
| |
| |
Bottom/Left------------Bottom/Right