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

Show Posts

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.


Topics - flashrocket

Pages: [1]
1
General / Supporting multiple resolutions
« on: April 19, 2015, 02:35:03 pm »
Hello, I'm tying to write a game and I found problem.Supporting multiple resolutions.
  • What is the best way to do this?
I created an implementation but it had a problem.
I created a small sized sf::View(800x600) and scaled it into a large screen(1366x768)
But during the up scaling I noticed that drawable objects such as sf::CircleShape were crisp while sf::Text was pixelated.
(click to show/hide)
If this is a good implementation then
  • Why does this happen?
  • How do I fix it?

2
SFML website / Possible Typo in Website(SFML Changelog)
« on: April 18, 2015, 09:15:44 am »
In http://www.sfml-dev.org/changelog.php there seems to be a typo in Changelog > SFML 2.2 > Window > Features > 3rd point.
I do not believe FreeBDS exists and it should have been FreeBSD.https://www.freebsd.org/
Correct me if I'm wrong.
(click to show/hide)

3
Graphics / Question in sf::Text
« on: April 16, 2015, 02:56:45 pm »
I created sf::Text and used setPosition(50,50);.
but when i give getGlobalBounds(); I interestingly get the following
If you notice the attachment you see that top is showing 58 rather than 50.
  • Where is this extra 8 pixels coming from?
  • How to remove them?

4
Im learning c++ 11 and i found this error
#include<SFML/Graphics.hpp>

int main()
{
        sf::VertexArray a;
        for(auto& b:a)
        {
       
        }
}
 
error when compiled with GCC
Code: [Select]
g++ test.cpp -o test -lsfml-graphics -lsfml-window -lsfml-system -std=c++11
test.cpp: In function ‘int main()’:
test.cpp:6:14: error: ‘begin’ was not declared in this scope
  for(auto& b:a)
              ^
test.cpp:6:14: note: suggested alternative:
In file included from /usr/include/c++/4.9/bits/basic_string.h:42:0,
                 from /usr/include/c++/4.9/string:52,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/SFML/System/Err.hpp:32,
                 from /usr/include/SFML/System.hpp:34,
                 from /usr/include/SFML/Window.hpp:32,
                 from /usr/include/SFML/Graphics.hpp:32,
                 from test.cpp:1:
/usr/include/c++/4.9/initializer_list:89:5: note:   ‘std::begin’
     begin(initializer_list<_Tp> __ils) noexcept
     ^
test.cpp:6:14: error: ‘end’ was not declared in this scope
  for(auto& b:a)
              ^
test.cpp:6:14: note: suggested alternative:
In file included from /usr/include/c++/4.9/bits/basic_string.h:42:0,
                 from /usr/include/c++/4.9/string:52,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/SFML/System/Err.hpp:32,
                 from /usr/include/SFML/System.hpp:34,
                 from /usr/include/SFML/Window.hpp:32,
                 from /usr/include/SFML/Graphics.hpp:32,
                 from test.cpp:1:
/usr/include/c++/4.9/initializer_list:99:5: note:   ‘std::end’
     end(initializer_list<_Tp> __ils) noexcept
     ^

error when compiled with clang
Code: [Select]
clang++ test.cpp -o test -lsfml-graphics -lsfml-window -lsfml-system -std=c++11
test.cpp:6:13: error: invalid range expression of type 'sf::VertexArray'; no
      viable 'begin' function available
        for(auto& b:a)
                   ^~
1 error generated.

5
Window / Alt tab not working in fullscreen
« on: April 03, 2015, 01:37:49 pm »
In linux(Ubuntu 14.10) some keys dont work in full screen such as alt+tab, volume keys, brightness keys. How to enable them?? :-\

6
General / Differenciating mouse click and mouse drag
« on: May 04, 2014, 02:02:02 pm »
I want to perform different actions for mouse clicked and mouse dragged.
mouse drag means click and move mouse.

7
General / Transform Image
« on: May 01, 2014, 08:07:13 am »
Is there some way to lighten an image or texture?
what im to do is make a sprite more white when mouse is hovered over it.

8
General / Drawing outside window
« on: April 30, 2014, 08:01:48 am »
Does drawing outside the window give a performance hit?
is it worth it to check whether an object is visible then draw it?

9
General / Access docs
« on: April 30, 2014, 07:14:22 am »
I compiled and installed latest sfml on Ubuntu.
I had checked build docs in cmake.
How do you access sfml docs??

10
General / SFML static linking error (Cross compile)
« on: April 14, 2014, 06:19:56 pm »
I have compiled several games natively in Ubuntu using sfml 2.1.
Today i tried to cross compile the tutorial program using code blocks.
Im using the mingw compiler.
Here are the steps i followed correct me if im wrong.
first i compiled and tried to link to linux libs
error
so i downloaded mingw windows version of SFML from downloadpage.
it compiled but it while running it said that i needed libgcc_s_sjlj-1.dll,sfml-graphics-2.dll,sfml-system-2.dll and more libraries.
so i thought linking statically would be the answer and here i am.
Im testing using wine.

Pages: [1]