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

Pages: [1]
Graphics / Crash if I set vertex color
« on: March 15, 2014, 11:35:08 pm »
This is the weirdest bug I've ever seen...

Some code:
void Graph::update(SceneData dimens) {
    for (int x = 0; x <= dimens.screenWidth; x++) {
        points[x].position = sf::Vector2f( x, (dimens.xLow+(x*dimens.step)));
        points[x].color = sf::Color::Black;


    Graph graph;

    while (window.isOpen()){

        sf::Event event;
        while (window.pollEvent(event))
            if (event.type == sf::Event::Closed)

    return 0;

So when I run this, the graph draw fine and stays on the screen. However, if I move my mouse for more than a second it crashes. This does NOT happen when I run it using the CodeBlocks debugger, so the only info I have about the crash is from the Windows crash dialog, which says its in ntdll.dll. It also does not happen if I comment out

points[x].color = sf::Color::Black;

I have no idea what moving the mouse and setting the color have to do with each other, so...yeah.
Any ideas?

Window / Window Initialization
« on: February 01, 2014, 02:39:17 am »
When I try to create a window object in Visual Studio C++, the line
sf::Window window = sf::Window(sf::VideoMode(200,200),"Title");
works fine, but when I try the same thing in Code::Blocks MinGW, I get a nonCopyable error. Instead I have to use
sf::Window window(sf::VideoMode(200, 200), "Title");
Any reason why?

General / Flipped Textures
« on: July 03, 2013, 07:34:22 pm »
Im using Opengl with SFML and im trying to map a texture, but its coming out flipped. In order to get the texture to appear the 'proper' OpenGL way (with the origin at the bottom left), I have to flip the sf::Image horizontally and then vertically. Is this the right way, or am I doing it wrong?

Ive looked around for answer to this but i cant find one. I found this:
but it doesnt seem to have a solution.

DotNet / text affecting other text
« on: March 31, 2013, 05:48:26 am »
im running into problems using two Text objects. i think it may be a bug but im not sure. anyway the problem is this: im using getLocalBounds of both texts to center them. However, if i update one text's string and not the other's, it causes the unchanged text's bounds to also change, causing it to go ff center. I dont know why this is. It only happens when i update one text. if i comment out that update, the other stops moving around. If you guys have any ideas thatd be great. thanks

DotNet / pollevent
« on: January 14, 2012, 06:28:56 pm »
im starting out using the .net binding, but when i try to use the window.pollevent, it says the funtion is inaccesible due to its protection level. help?

Graphics / Atom Zombie Smasher feature
« on: November 04, 2011, 07:23:10 pm »
hey guys. I recently bought atom zombie smasher, and i found out that it uses SFML. Its wierd because when the game opens, the window creation is really smooth, but when i make an SFML app fullscreen, the screen goes black for a second(which also happens with other games). Does anyone know how the creator managed to do this?

Graphics / SubRect
« on: September 09, 2011, 01:42:26 am »
Hi. I dont know if this is a bug on my part or yours, but there a problem with sprite.setsubrect(). When ever I change the subrect of the sprite, the whole image pops up on the screen. This is very brief, but Im changing the subrect constantly, so I pretty much see an opaque version of the whole image. Thanx in advance.

General / SFML 2 include
« on: September 08, 2011, 01:39:37 am »
Ive compiled SFML 2 as per the tutorial, but I cant find where Im supposed to put the include dirctory. I know theres supposed to be a graphics.cpp, system.cpp, etc, but I cant find those in any of the folders. Thanks in advance

Graphics / Frame Buffer
« on: September 05, 2011, 04:57:59 am »
Is there a framebuffer objectin sfml?If not, can someone show me how to remove tearing from an application? Thanks.

Graphics / Animation......again
« on: September 04, 2011, 01:30:59 am »
Hello everyone. Ive made an animation class that inherits from sprite, and uses a subrect to change the frames. Im trying to make a class that holds multiple animation objects. However, the problem with this is that I can't use the functions of sprite with this object. For example say this class was called mario.
I could do Draw(*Mario.getPointerOfCurrentSprite)
but I cant do mario.move()
or mario.SetX() because each Animation(Sprite) has its own location. Any Help?

Graphics / Problem loading images
« on: September 01, 2011, 04:25:17 pm »
Hello everyone, I've encountered a problem with SFML using code::blocks. Whenever I use code::blocks to run a program that has to load an image, it is unable to do so. The console says the reason is : unable to do so. As a result I have to go to the folder where the exe is and run it from there. Help is appreciated.thanks

Graphics / How to do animation
« on: August 23, 2011, 11:18:57 pm »
Hello everyone. Im kinda new to sfml, and im trying to figure out how to do animation. Actually, I know how to do animation, but theres a few part about that are really bugging me. For example, if i wanted to switch between three images for a running animation, I would switch between three images with a Sleep(int) in between these, right? But the problem with this is that while its sleeping, NOTHING else can happen. I dont know how to get around this.

I hope you understand what  im saying here, but yeah...

Pages: [1]