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

Pages: [1]
1
Feature requests / Re: Vulkan Support
« on: February 23, 2016, 05:47:01 am »
Vulkan actually has quite high hardware requirements. According to wikipedia (with reference to Vulkan Overview by Kronos from june 2015), Vulkan requires OpenGL ES 3.1 or OpenGL 4.x level hardware.

it requires opengl es 3.1/opengl 4 level hardware *and* updated software. AMD recently stopped supporting the drivers for my hd5850, which does support opengl 4, but the latest supported drivers for my card does not support vulkan.

this pretty much means, as far as common descrete graphics cards go, you need at least a gtx 6xx/hd6xxx series GPU or newer to run vulkan (on official drivers).

2
Audio / Re: Trouble with setPlayingOffset()
« on: January 06, 2016, 10:59:05 am »
I'm having the same issue OP is getting. For some reference, here's the offending function in my app:

void onMouseUp(int x, int y, unsigned b)
{

        if (b != sf::Mouse::Left)
                return;
       
        if (mouseHoverProgressBar)
        {
                if (playMode == PLAY_FILE_BUFFER)
                {
                        ... irrelevant code here
                }
                else if (playMode == PLAY_FILE_STREAM)
                {
                        sf::Time t = audioStream->getDuration() * (static_cast<float>(x) / rw->getSize().x);
                        audioStream->setPlayingOffset(t); // <<< PROBLEMS HAPPEN IN HERE SOMEWHERE.
                        // audioStream is an instance of a child class of sf::Music.

                        //printf(">>>seeking=%f | duration=%f\n",t.asSeconds(),audioStream->getDuration().asSeconds());
                }
        }

}
 

The program was working flawlessly using sfml 2.2, before upgrading it to 2.3.2 today.

That print statement I have being printed out displays exactly what the OP was having trouble with, for instance on a stereo 200s flac file, seeking to anything above 100s will cause the song to repeat. Seeking to say, something like 99s will bring me very near the end of the song.

In this print example, I seek to just almost half way through the audio, displays that it's only a few minutes through the song, but the last few seconds of the audio is playing instead.
>>>seeking=176.484055 | duration=365.533325

I also tried using an 8 channel flac file, and as I've expected and you've probably guessed, the song fails to seek properly after 1/8th (12.5%) of the duration, and setting the offset to 1/16th of the duration will bring me half way through the song. So, there's some sort of flawed math happening during seeking that's likely not taking into account of the number of channels.

If I were to guess, this line probably needs to factor in the number of channels in the source file.

I've also tested my program against .ogg and .wav files and they did not share the same issue. Only .flac files have this problem.

3
Graphics / sf::Text Sub Rectangle
« on: February 08, 2012, 05:30:09 am »
Eh. That's what I was thinking of doing in the first place.
I was hoping to find a much more efficient way of doing this.

The drawing code is basically just drawing sf::Text on top of a rectangle. Nothing crazy :P

Perhaps some fancy OpenGL functions would do the trick?

4
Graphics / sf::Text Sub Rectangle
« on: February 08, 2012, 04:33:13 am »
Is there a way to do something similar to sf::Sprite::SetSubRect but for sf::Text?

For example:

I'm making a textbox for my game. There's a problem though;



As you can see, the sf::Text is drawn past the textbox.


I guess this also goes as a request. Any ideas?
Thanks

5
Network / Network binding for .NET?
« on: February 26, 2011, 09:35:30 pm »
I guess the same goes for the System package then? :p

Ok thanks!

6
Network / Network binding for .NET?
« on: February 25, 2011, 05:46:22 am »
Wondering if there will ever be a .NET binding for this library. Or is it a WIP?

7
Graphics / GLSL beginner needs help!
« on: December 08, 2010, 10:57:40 pm »
Image here!

I'm a beginner with GLSL, and if you look at the image above, I'm having some issues. D:

The glow looks like it's working just fine, except the strange diagonal tear and strange blocks appearing.

I have two RenderImages, one that renders the shader/glow, and one on top of that one with the points without shading.

The shader RenderImage first uses a shader that "stretches" the pixels horizontally, then it uses a second shader that does the same thing, except horizontally.

Horizontal shader:
Code: [Select]

//HORIZONTAL GLOW

uniform float fadedelta;
/*
//Fading Delta:
float fadedelta = 0f;
for (float i = 0f; i < 10f * glowMul; i++)
fadedelta += (1f - (i / (10f * glowMul)));
fadedelta = 1f / (1f + 2f * fadedelta);
*/

uniform sampler2D img;
uniform float width;
uniform float g; //glow multiplier (glowMul)

void main() {
vec2 step = vec2(1. / width, 0.);
vec4 clr = texture2D(img, gl_TexCoord[0].st);

vec4 c = clr * fadedelta;

float threshold = 10. * g;
for(float i = 0.; i < threshold; i++) {
vec4 c_inc;

c_inc = texture2D(img, gl_TexCoord[0].st + step * i);
c += c_inc * (1. - (fadedelta * i)) * fadedelta;

c_inc = texture2D(img, gl_TexCoord[0].st - step * i);
c += c_inc * (1. - (fadedelta * i)) * fadedelta;
}
gl_FragColor = c * g;
}


Vertical shader:
Code: [Select]

//VERTICAL GLOW

uniform float fadedelta;
/*
//Fading Delta:
float fadedelta = 0f;
for (float i = 0f; i < 10f * glowMul; i++)
fadedelta += (1f - (i / (10f * glowMul)));
fadedelta = 1f / (1f + 2f * fadedelta);
*/

uniform sampler2D img;
uniform float height;
uniform float g; //glow multiplier (glowMul)

void main() {
vec2 step = vec2(0., 1. / height);
vec4 clr = texture2D(img, gl_TexCoord[0].st);

vec4 c = clr * fadedelta;

float threshold = 10. * g;
for(float i = 0.; i < threshold; i++) {
vec4 c_inc;

c_inc = texture2D(img, gl_TexCoord[0].st + step * i);
c += c_inc * (1. - (fadedelta * i)) * fadedelta;

c_inc = texture2D(img, gl_TexCoord[0].st - step * i);
c += c_inc * (1. - (fadedelta * i)) * fadedelta;
}
gl_FragColor = c * g;
}


Thanks for any help. :3

Also if it helps, I'm using C# and the latest build of the SFML 2 .NET binding.
I can post the application source if I need to.

EDIT:

I think I got it

Pages: [1]
anything