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.


Messages - zeno15

Pages: [1]
1
SFML projects / Re: SFNUL
« on: December 09, 2014, 03:45:19 am »
Apologies for resurrecting this thread but it was the only relevant one I could find. 

I'm attempting to build SFNUL with Visual Studio 2013, and have run into issues, if anyone had any ideas that'd be greatly appreciated.

Firstly when you say to add preproccessor definitions, is that after cmake has made the visual studio solutions, or before?  And if it is after, where do I actually add them, I've looked and the place where I would normally define SFML_STATIC etc isn't present, unless I'm missing something.

Thanks for your time guys.

2
Graphics / Re: sf::VertexArray color after setting texture coords
« on: August 05, 2013, 10:11:34 am »
Oh righto, that's excellent thanks :)

3
Graphics / [SOLVED] sf::VertexArray color after setting texture coords
« on: August 05, 2013, 06:45:57 am »
I have a simple tile map that uses vertex arrays to display it, and it refers to a texture ive passed to it, it all works fine, I'm just curious as to what effect setting the color of the vertex's has?  I know when I set it to Transparent it shows the color used to clear the screen and when set to black it shows all black, but I was wondering if there was a more official answer than my trial and error,
Cheers

4
Ah thank you :)

I'm allocating them dynamically because that's what I'm doing in a larger project and just didn't release them in this smaller example

5
#include <iostream>
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>

int main() {

        sf::RenderWindow *window = new sf::RenderWindow(sf::VideoMode(800, 600), "My window");
       
        sf::Texture *backgroundtexture = new sf::Texture();
        backgroundtexture->loadFromFile("background.png");

        sf::Sprite *backgroundsprite = new sf::Sprite();
        backgroundsprite->setTexture(*backgroundtexture);

        sf::Image ball;
        ball.loadFromFile("ball.png");
        ball.createMaskFromColor(sf::Color::White);

        backgroundtexture->update(ball, 100, 100);




        while (window->isOpen()) {
                sf::Event event;
                while (window->pollEvent(event)) {
                        // check the type of the event...
                        switch (event.type) {
                                // window closed
                                case sf::Event::Closed:
                                        window->close();
                                        break;
                               
                                // we don't process other types of events
                                default:
                                        break;
                         }
                }

                window->clear();
                window->draw(*backgroundsprite);
                window->display();

        }

}
 

For me run on windows 7 using visual studio 2010 this creates the green background and the ball is updated onto the texture and the white background is turned black.



[attachment deleted by admin]

6
No all the default values are used, I load the texture from a file (.png) and load it to a sprite, then draw the sprite, then i update the texture with the new images.

7
Graphics / createMaskFromColor not working when updating image to texture
« on: November 27, 2012, 03:01:49 am »
I have a background texture that i move around using a view, and I want to add a few circles to it but without the background, so I am using image.createMaskFromColor(sf::Color::White), as the background is white, and then calling texture.update(image, ycoord, xcoord), the texture is updated, but the white background has been turned black, I was wondering if anyone knew the cause of this, the solution or maybe and alternative way to accomplish the same thing,
cheers.

8
General / Re: intel_do_flush_locked failed: No such file or directory
« on: November 23, 2012, 08:13:51 am »
Thanks for the quick reply, when you say the latest sources what does that mean exactly?

Cheers

9
General / intel_do_flush_locked failed: No such file or directory
« on: November 23, 2012, 05:44:00 am »

Hi everyone,

as stated in the title I am getting a
intel_do_flush_locked failed: No such file or directory
error when running my code,

on ubuntu 12.04, using the rc of sfml 2.0 and I have googled and searched the forums far and wide to no avail.

So I was wondering if anyone had any clue what's going wrong here.

I believe it has something to do with the sf::Texture when i try and draw the sprite to the screen in the titleScreen.cpp file, in the render function.

If I import the texture and the sprite all within that function then it works, but if i run it the way I currently have it then it crashes, any help would be appreciated cheers.

File download: https://rapidshare.com/files/697490419/SFMLSpace.tar.gz

Pages: [1]