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

Pages: [1]
1
Graphics / sf::Color toInteger() returns ARGB instead of RGBA ?
« on: May 29, 2018, 09:55:48 pm »
Hello

I found that the toInteger() function from sf::Color returns components in ARGB instead of RGBA format, which is not very compatible with the rest of the API which uses RGBA format. Is it a bug or it's meant to work like that ?

2
Graphics / Batching sf::Text draw calls ?
« on: February 21, 2018, 10:27:08 am »
Hello

I've noticed the draw() function is very expensive due du driver things, I've already batched my sf::Shapes for great performance improvements, now I'm looking for batching sf::Text drawings since I have lots of them but I'm not sure how to do that.
Do you have ideas ? Is there a way to get the glyph Texture and all rects that represents the Text so I can put them in a single VertexArray ?

3
SFML projects / FM Composer - A sound & music creation tool
« on: February 13, 2018, 10:46:04 am »

Download link http://fmcomposer.org/download.php
Main page : http://fmcomposer.org

Hello,

Today I'd like to show you the project I'm working on since a long time : FM Composer. It's a software allowing the user to design their own sound using FM synthesis and create a song with them.
It's made for musician/composers but also for developers, as the musics created with this tool can be integrated in any other app and altered in real-time, allowing for high degree of interactivity (dynamic instrument changes, tempo changes, reverb, sync'ed and evolving music...)


Sound demo and how to design an instrument : https://www.youtube.com/watch?v=AnDzLdit0Ds

It uses SFML for all input, drawing, events... I only slightly modified the library to get a sharper font rendering and add file drop support on Windows.

You can easily add notes with your (computer) keyboard :


Instrument creation page. Quite a lot of parameters, but it's all there without submenus for fast editing once you are used to it :


A simple piano roll view, with limited editing features but always fun to have :



The sound engine is made from scratch, it's a bit like 80's synths that use FM but in more powerful.
FM Composer is released with a lot of pre-made instruments, covering the whole General MIDI set, so it can import MIDIs without any problem.

Download here if you want to give it a try : http://fmcomposer.org/download.php

There is a complete documentation with tutorial on the website too :)

Of course the program is free and open-source, see the GitHub : https://github.com/stephanedamo/fmcomposer (probably not the best code, but I'm open for improvements !)

4
Window / Changing dynamically window contextsettings
« on: January 22, 2018, 10:45:53 am »
Hello

In my program i need to change the window contextsettings dynamically, what I do atm is closing the window, destroying the window pointer, and re-creating it with the new parameters. It works, but I'd prefer to have a smooth change, without the user seeing the window being closed and re-opened. Is there a way to do that ?

5
Feature requests / Font antialiasing
« on: January 03, 2018, 03:28:55 pm »
Hello

I was always annoyed by how blurry the fonts were when displayed with SFML. Take the same font, display it on a browser and on a SFML window, it's not as sharp with SFML even using all the advices I could found (integer positionning, right view size...). It's especially noticeable on small font sizes.

I've found a way to correct it, by recompiling Freetype and SFML:

the change in Freetype was to uncomment FT_CONFIG_OPTION_SUBPIXEL_RENDERING in ftoption.h

then in SFML to call the function FT_Library_SetLcdFilter with FT_LCD_FILTER_LEGACY as parameter : https://www.freetype.org/freetype2/docs/reference/ft2-lcd_filtering.html

I've tried other filter values but FT_LCD_FILTER_LEGACY  was the best to my taste.

Since some people may prefer the more blurry variant, would adding a "setSharpness" function be a good idea ?

setSharpness could take a sharpness parameter for chosing between the heavy default antialias, some lighter ones or no antialising at all (it's possible, I managed to do it while messing with FreeType options)


6
hello, some problems I have, not sure if they are SFML bugs :
  • I have a program that keeps fixed-size contents no matter the window size (the UI elements are of the same size when the window is bigger). This is done by resizing the view size on Window Resize event. But sometimes on Windows, when I mess with window switching, it doesnt work properly, the whole content get scaled, like if the Resized event wasnt triggered. (or maybe triggered but with the old width/height value)
  • LostFocus event doesn't work when another window get the focus itself (not a user action). I found that with League of Legends, the game laucher brings itself to the foreground, and my app don't get any LostFocus event so i cant disable mouse clicks..

I know my post needs more testing, but it was to see if other people noticed the same problems

7
Feature requests / double click ?
« on: October 15, 2017, 01:46:51 pm »
Maybe it's me but i didnt find a mouse DoubleClick event. Would be nice if included.

It's not reliable to do it manually, since the double click speed is user-configurable in most operating systems, doing it with a hard coded timer (like suggested in an old post i found) would not be good for user experience

8
Feature requests / Show window maximized
« on: September 08, 2017, 12:29:07 am »
Seems this doesnt exist yet, this feature would be quite useful.

Can be done easily with this line of code on windows:

ShowWindow(window->getSystemHandle(), SW_MAXIMIZE);

But not portable, sfml would make it portable...

9
Window / resized window: how to smooth graphics ? (resampling)
« on: October 31, 2014, 01:04:20 pm »
Hi

I have a SFML window, when i maximize it, the graphics are scaled to fit the screen with the nearest neighbor algorithm, which looks very bad when desktop resolution isnt a multiple of the window's native size.

Is there a way to force a better quality resampling? (like the one used for textures with smooth enabled?)

10
Feature requests / Set an object's color without creating a color object
« on: October 30, 2014, 02:09:31 pm »
A small wish for me:

Allow to set color to sprites/shapes without having to create a Color object.

example:
Sprite s;
s.setColor(200,200,200,100);

instead of
s.setColor(Color(200,200,200,100));

same with the RectangleShape constructor. Set directly its size, without having to create a vector2f object:  RectangleShape rect(10,10) instead of RectangleShape rect(Vector2f(10,10))

The small things that makes life easier :)

I like SFML's Oriented Object style , but sometimes it's a bit too heavy

11
Graphics / [SFML2] SetX/SetY disappeared ?
« on: August 06, 2012, 12:39:36 pm »
Hi

I've downloaded the latest SFML2 RC build and I cannot find these useful functions, are they hidden somewhere or temporarily disabled for some reason?

I was a good user of them, I think having "s.SetPosition(s.GetPosition().x,y)" everywhere I need to set only X or Y position of an object is not clean and make the code harder to read (and probably a little bit slower due to the getposition() call)

Pages: [1]