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 - Skomakar'n

Pages: [1]
1
Window / Greek or Cyrillic characters makes SFML crash under OS X
« on: May 25, 2011, 07:39:47 am »
I've made a textfield that works pretty well, and under Linux, if it happens to deal with characters that don't add anything to the width of the rectangle around the rendered text, it simply doesn't store them. I don't know why Greek or Cyrillic characters won't work as I'm using wide character strings, so this is also something I would like to get an answer to. Many other characters, such as þ, ð, å, ä, ö, æ and ø work just fine.

The main problem here, though, is that when trying to type Greek or Cyrillic characters when running the program in Mac, the program will simply crash. This is the call stack that Xcode gave me (read from bottom to top):



Also, accented letters don't get noticed by OS X, but they work fine under Linux; that is, in Linux, I can, for instance, first press the grave accent key, and then the A key, and an á will actually appear in my textfield. OS X ignores the accent key and just gives me a regular a.

2
Graphics / Windows/SFML bad at handling many images at once?
« on: December 05, 2010, 10:27:27 pm »
I have made a little particle system for a game, and it works just fine in Linux and on Mac, but in Windows, the graphics of the particles just flicker by, and might not even show up in screen shots. This also holds true for Wine.

This is what it looks like in Linux:



In OS X:



Then, in Windows, no trail of particles is left. They just flicker from the opening of the bottle, and then disappear entirely. Is this an SFML issue? A Windows issue? Because of all of these images being drawn. Not sure what to do any longer.

Well. It's the same image. The same sprite object, which is just moved using SetPosition, and gets its alpha changed using SetColor, and drawn, once for each particle, in a loop, every frame, like so:

Code: [Select]
for (unsigned int i(0); i < particles.size(); ++ i)
 {
    // Move the image accordingly.
    image.getSFMLSprite()->SetPosition(...);
    image.getSFMLSprite()->SetColor(...);

    // Draw the image.
    image.draw(window);
 }


This loop is within a member function of a class of which the image object is a member variable. The datatype is my own Image class, which contains an sf::Image and an sf::Sprite, and its draw() member function simply draws this internal sf::Sprite into the sf::RenderWindow * that is passed to the function.

3
System / Does SFML support horizontal mouse scrolling?
« on: October 25, 2010, 03:04:01 am »
I'm making a little GUI system for my SFML-based engine, and I have boxes with scrolling content working, and I can use the mouse to scroll vertically, but as I'm using a MacBook Pro with a trackpad that can also scroll horizontally, I'm wondering if there is any possibility for SFML to detect horizontal scrolling, so that I can scroll through the content horizontally using the mouse scroll as well, rather than having to click the scrollbar slider and drag it around manually.

Is there?

4
Graphics / Buffers and clipping?
« on: October 13, 2010, 08:48:30 pm »
Hello, there.

It would help me out tremendously, if there were any possibility to somehow work with buffers in SFML, or at least clip graphics in some way.

What I mean, is that I want to be able to define a rectangular area on the screen. Anything entirely outside of this area will not be drawn at all, and anything partially within it will be clipped.

Say I have this image rendered (a couple of sprites and shapes):



I then define a clipping rectangle like so (the non-darkened area):



Which will result in this being the final image rendered onto the screen:



I'm pretty sure it can be done in pure OpenGL, at least.
Would it be possible in SFML by modifying the view somehow? Are there other options? It would, again, help tremendously.

5
General / Qt + SFML: Blank widget?
« on: July 13, 2010, 08:33:52 pm »
I have managed to get a Qt window with an SFML view integrated into it compiling and booting up perfectly fine; the problem is that the widget which is supposed to hold the SFML render viewport is completely blank.

It does work to create the SFML window separately, as a window of its own. It will update, clear to the right colour and render the sprite that I have told it to draw, but when using the Create() member function with the inherited winId() function from QWidget as its argument, after having to do a reinterpret cast to sf::WindowHandle *, or otherwise it won't compile, the widget is left blank.

I can't figure out what's wrong. Please help.
I've put everything I have so far on Pastebin:

main.cpp
classes/SFML/Viewport.h
classes/SFML/Viewport.cpp
classes/GUI/MainWindow.h
classes/GUI/MainWindow.cpp

Pages: [1]