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

Pages: [1]
1
General discussions / Music does not rewind.
« on: May 14, 2024, 06:57:23 pm »
I'm using 2.5.1, and I noticed that when music streamed from a .flac file stops from playing to the end, it doesn't rewind, so the next time you play it, it immediately stops. I fixed it by calling stop() right before play().
If it's a known bug, or if it was fixed, or if I'm missing something, you can delete the thread, since I'm ok with my hacky fix, just thought you'd know.

2
Graphics / Re: Suggestion for displaying text
« on: August 27, 2013, 09:18:11 pm »
Thank you very much, you were incredibly helpful. Keep up the amazing work.

3
Graphics / Re: Suggestion for displaying text
« on: August 27, 2013, 08:08:22 pm »
Yes the ugly hack worked perfectly. I'm sorry what exactly is it, does it effect performance? Should I go on about doing it less ugly and hacky now or is it okay to use?

4
Graphics / Re: Suggestion for displaying text
« on: August 27, 2013, 07:31:56 pm »
Yes, I imagined it would, since I tried it with 2rc, 2.1 and the current source, and it was always the same, so I'm sure It's me who's not getting something.
I have a view that's 480x270 that's set to a 1440x810 window, so everything is scaled times 3.

http://imgur.com/YfTyYgR
that's my cursor sprite below the text

How come the text uses actual pixels (at least the antialised ones), and how is there still alpha with FT_RENDER_MODE_MONO?


5
Graphics / Re: Suggestion for displaying text
« on: August 26, 2013, 03:43:18 pm »
I tried the new revision, looks the same. I used the Grand9k font at size 8.

6
Graphics / Re: Suggestion for displaying text
« on: August 26, 2013, 02:05:48 am »
I changed the
FT_Glyph_To_Bitmap(&glyphDesc, FT_RENDER_MODE_NORMAL, 0, 1);
line to
FT_Glyph_To_Bitmap(&glyphDesc, FT_RENDER_MODE_MONO, 0, 1);
in Font.cpp, and built the libraries again with cmake, and it's still blurry. How is that possible, I can't figure out what I'm doing wrong. Is anybody kind enought to tell me what all the steps are and what I might have missed?

7
Window / sprite lagging behind the cursor
« on: November 09, 2011, 04:20:51 am »
yeah, i guess it had to do with the mouse drivers, on my laptop it's working fine. I have a logitech G500, and I played around with the settings in setpoint, turned off the acceleration, but it didn't help. thanks, at least now i know it's not my code.

8
Window / sprite lagging behind the cursor
« on: November 07, 2011, 10:34:39 pm »
I'm rather new to all this, and I'm not sure if this even qualifies as a problem, it's more of a question on how all this works, and if maybe I'm doing something wrong, so i pasted the whole code.

I created a sprite that replaces the cursor, and then set the position of the sprite to Mouse::GetPosition. But the sprite seems to be trailing behind the cursor, especially in fullscreen. Then i set the framelimit to 60 and it didn't help, but if I set it to 58 it still trails a little, but it's a lot better.

Oh I also commented out the 121 and 133 lines in WindowImpl before building the libs, I thought it might help(it didn't).

I'm using SFML2, winxp

any help or info would be appreciated.

Code: [Select]


#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>

int main()
{
sf::VideoMode VMode(1280, 960, 32);
sf::RenderWindow Window(VMode, "SFML Sample Application", sf::Style::Default, sf::ContextSettings());

sf::View View;
View.Reset(sf::FloatRect(0, 0, 320, 240));

Window.SetView(View);
Window.SetFramerateLimit(60);
//Window.ShowMouseCursor(false);

sf::Mouse Mouse;

sf::Texture CursorTexture;
CursorTexture.LoadFromFile("Cursor.png");

sf::Sprite CursorSprite;
CursorSprite.SetTexture(CursorTexture);
CursorSprite.SetSubRect(sf::IntRect(0, 0, 9, 9));
CursorSprite.SetPosition(0.0f, 0.0f);


        while (Window.IsOpened())
        {
                sf::Event Event;            

while (Window.PollEvent(Event))
{
if (Event.Type == sf::Event::Closed)
Window.Close();

if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Keyboard::Escape))
Window.Close();

if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Keyboard::Return))
{
Window.Create(VMode, "SFML Sample Application", sf::Style::Fullscreen);
Window.SetView(View);
Window.SetFramerateLimit(60);
//Window.ShowMouseCursor(false);
}
}
CursorSprite.SetPosition((sf::Mouse::GetPosition(Window).x /4) - 4, (sf::Mouse::GetPosition(Window).y /4) - 4);

                Window.Clear(sf::Color(25, 25, 25));
Window.Draw(CursorSprite);
Window.Display();
        }

        return 0;
}


Pages: [1]