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 - replaceits

Pages: [1]
1
SFML projects / Sf Fireworks
« on: January 03, 2014, 02:58:14 am »
Hey all! Since it was New Years yesterday (I know I'm late) I decided to make a simple fireworks program.
Feel free to mess/tinker with it!

Github: https://github.com/replaceits/Sf-Fireworks

No binaries included, you'll have to compile your self.
Only controls are Left click to launch a firework and Escape to exit.

Any ways happy new years everyone!  ;D

2
Graphics / Moving borderless windows? [Linux]
« on: July 07, 2013, 09:09:29 pm »
So after writting a few custom system monitors for my computer I realized that I am unable to move any borderless window made in SFML (it would just look bad in a window). Every window in Linux thats borderless I've been able to move with Alt+Leftclick, SFML seems to be the exception though   ??? Is there a way to get this working or must I write my own code to get this to work? (It's not that big of a deal just wondering if I actualy need to code it in or not :P )

~Using Arch with KDE if that helps at all

3
General discussions / Typo?
« on: June 03, 2013, 03:36:10 am »
So in the OpenGL.cpp example that has the line
// Define a 3D cube (8 faces made of 2 triangles composed by 3 vertices)
shouldnt this be
// Define a 3D cube (6 faces made of 2 triangles composed by 3 vertices)
;D

4
SFML website / Search error when JavaScript is enabled
« on: June 01, 2013, 12:44:13 am »
I've been having this issue since the start of the new site, it seems that every time I try to use the forum search function with JavaScript enabled I get this error "Please try again. If you come back to this error screen, report the error to an administrator.".
However if I view the site with JavaScript disabled it works perfectly fine, I'm not sure if I'm the only one with this problem but I just thought I should point it out. (:

Also I'm using Ubuntu 12.04 with Firefox 21.0, I do believe that the site works fine for me on Windows 8 with Firefox, not sure what's causing the problem here.

5
Graphics / sf::Text & sf::Rectangleshape display at diffrent positions?
« on: December 27, 2012, 04:50:01 am »
So I've trying to create a simple menu for a test project, however I can not get a rectangle to sit exactly behind the text, the text is always lower than the shape when using the same position, size, and origin.

    sf::Text StartButton(sf::String("Start"),DefFont,50);
    StartButton.setColor(sf::Color(255,255,255));
    StartButton.setOrigin(StartButton.getLocalBounds().width / 2, StartButton.getLocalBounds().height / 2);
    StartButton.setPosition(App.getSize().x / 2, App.getSize().y / 2);

    sf::RectangleShape StartRec;
    StartRec.setSize(sf::Vector2f(StartButton.getLocalBounds().width, StartButton.getLocalBounds().height));
    StartRec.setOrigin(StartRec.getLocalBounds().width / 2, StartRec.getLocalBounds().height / 2);
    StartRec.setPosition(sf::Vector2f(StartButton.getPosition().x, StartButton.getPosition().y));
    StartRec.setFillColor(sf::Color(50,50,50));
    StartRec.setOutlineColor(sf::Color(40,40,40));
    StartRec.setOutlineThickness(4);

That declares the two, the size is correct however the position is not, any idea what's going on here?
I've attached a pic of what I'm talking about and a copy of the src (no where near done with it).


[attachment deleted by admin]

6
General / Trouble compiling SFML-2.0 in Linux (Ubuntu 12.10)
« on: November 16, 2012, 06:07:17 am »
I’m having a problem that i can't seem to resolve. CMake doesn't seem to be able to find the OpenGL packages...
sudo cmake -G "CodeBlocks - Unix Makefiles"

CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
  Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindOpenGL.cmake:153 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/SFML/Window/CMakeLists.txt:103 (find_package)

-- Configuring incomplete, errors occurred!
 
Which doesn't make sense considering I have OpenGL installed, for ex.
glxinfo | grep OpenGL
returns
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile
OpenGL version string: 3.0 Mesa 9.0
OpenGL shading language version string: 1.30
OpenGL extensions:
 
So i know its installed.
Any help?

7
Graphics / Having issues loading an image [SFML-2.0]
« on: October 19, 2012, 01:11:37 am »
Ok, so while writing a 2D platformer I ran into an issue I'm not quite understanding.
All of my images will load except one, no matter what format I put it in. All other images will load just fine (there also in the same directory as the other so i doubt its a rights problem).
It seems to only do this for images of this specific size, I have another image (same size) that it refuses to load also. The size is 21x15.
I attached the two images, any help?

Also here's the line of code...
if(!SprSmallStill.loadFromFile("Sprites\\Spr\\Small\\SprSmallStill.png")){return 1;}
    if(!SprSmallWalk.loadFromFile("Sprites\\Spr\\Small\\SprSmallWalk.png")){return 2;}
    if(!SprBigStill.loadFromFile("Sprites\\Spr\\Big\\SprBigStill.png")){return 3;}
    if(!SprBigWalk.loadFromFile("Sprites\\Spr\\Big\\SprBigWalk.png")){return 4;}

    //These two wont load
    if(!GroundBlock.loadFromFile("Sprites\\Scenery\\Nonint\\Block.png")){return 5;}
    if(!GroundPipe.loadFromFile("Sprites\\Scenery\\Nonint\\Pipe.png")){return 6;}

I all ways get this message while debugging as well
Failed to load image "Sprites\Scenery\Ground\Block.jpg". Reason : Unable to open
 file
I have checked all permissions and nothing seems wrong, any format i try to put it in, it wont load, it just seems to be this size.

[attachment deleted by admin]

8
General / SFML 2.0 Class/Member Errors [SOLVED]
« on: October 09, 2012, 12:24:36 am »
When trying to compile This piece of code (with MinGW & Code::Blocks)...
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/System.hpp>

int main ( void )
{
    sf::RenderWindow App(sf::VideoMode(600,600,32), "SFML", sf::Style::Default);
    sf::Event AppEvent;

    App.display();

    while(App.isOpen())
    {
        App.display();
        if(App.pollEvent(AppEvent))
        {
            if(AppEvent.type == sf::Event::Closed)
            {
                App.close();
            }
        }
    }
    return 0;
}
I get these errors...
C:\Users\replaceits\Desktop\CPPFD\OpenGlTest\Main.cpp||In function `int main()':|
C:\Users\replaceits\Desktop\CPPFD\OpenGlTest\Main.cpp|7|error: `Default' is not a member of `sf::Style'|
C:\Users\replaceits\Desktop\CPPFD\OpenGlTest\Main.cpp|10|error: 'class sf::RenderWindow' has no member named 'display'|
C:\Users\replaceits\Desktop\CPPFD\OpenGlTest\Main.cpp|13|error: 'class sf::RenderWindow' has no member named 'isOpen'|
C:\Users\replaceits\Desktop\CPPFD\OpenGlTest\Main.cpp|15|error: 'class sf::RenderWindow' has no member named 'display'|
C:\Users\replaceits\Desktop\CPPFD\OpenGlTest\Main.cpp|16|error: 'class sf::RenderWindow' has no member named 'pollEvent'|
C:\Users\replaceits\Desktop\CPPFD\OpenGlTest\Main.cpp|18|error: 'class sf::Event' has no member named 'type'|
C:\Users\replaceits\Desktop\CPPFD\OpenGlTest\Main.cpp|20|error: 'class sf::RenderWindow' has no member named 'close'|
||=== Build finished: 7 errors, 0 warnings ===|
 
So it seems like it recognizes the classes but none of the members, any idea on what I'm doing wrong here?
My linker settings are...
-lsfml-graphics-s
-lsfml-window-s
-lsfml-system-s
-static-libgcc
And i Have Defined "SFML_STATIC"
All Libs have been staticly built.

Ive tried reinstalling SFML 2.0 multiple times but still no luck. Could this be a mistake i made in CMake or a problem with my MinGW32 compiler?

Also something I found odd is Code::Blocks will do the auto-fill for the members yet when I try to compile it, Code::Blocks says they aren't members..?

9
System / [-lsfml-system-s] Having Touble Staticly Linking System..
« on: September 03, 2012, 09:37:01 am »
Now i have literally spent hours trying to figure this problem out on my own.
I'm using SFML 1.6 with Code::Blocks 10.05.
When trying to staticly link librarys I can link them all staticly except system?

My linker is...
-lsfml-graphics-s
-lsfml-window-s
-lsfml-audio-s
-lsfml-system-s
-static-libgcc
and my code starts with..
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/Audio.hpp>
#include <SFML/System.hpp>

All the librarys are linked staticly, however when running the program it says sfml-system.dll is missing, no other dlls. Simply adding the dll to the executables directory fixes the problem but I'm wondering if there is a way to actually link system staticly? And yes I have googled and researched and tried/tested everything i can think of but no luck, any help would be greatly appreciated. Thank you!
(Also, yes, i have pathing fully configured and my search directorys)

Pages: [1]
anything