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

Pages: [1]
1
Feature requests / The Ability to Pass Floats To/From Shaders
« on: October 23, 2015, 01:57:30 am »
Lol like... why is this not a feature?  I can't even pass an array of floats to my fragment shader...  What am I supposed to do?  Convert each float to a 32-bit integer via static_cast, and pass 4 pieces of that integer to the shader via the r-g-b-a components of each pixel of a texture, then convert it back somehow in the shader via the sampler2D?  Ridiculous.  :o

And if I want to use a shader to output something to a render texture, the reverse problem applies because SFML doesn't use floats for components of sf::Color, which is insane.  I mean, I know it's supposed to make it look cleaner or easier or whatever, but Uint8 components just don't make sense and form an unnecessary limitation on the developer.  Why not just store color components as floats in sf::Color, and give the user a better class interface to use either Uint8/float depending on their code?

Or maybe there is just some secret way of doing this in the API that I just haven't found yet.  Maybe someone can enlighten me?

2
General / Is it possible to use SFML just as an OpenAL wrapper?
« on: August 25, 2015, 10:48:56 pm »
I'm running an application using another library for drawing stuff to the window, but I really like the audio portion of SFML, as well as a few other parts of the library such as input handling and networking..  Is there some way to initialize just the OpenAL internals without creating a RenderWindow?

I tried just using the API in sf::Listener and I just get a bunch of OpenAL errors which I assume is because the internals are not being initialized properly.

More specifically, when I try calling sf::Listener::setPosition for example, I get a bunch of
Quote
An internal OpenAL call failed in AudioDevice.cpp (173) : AL_INVALID_OPERATION,
the specified operation is not allowed in the current state

Pages: [1]
anything