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 - dydya-stepa

Pages: [1] 2
1
General discussions / why sfml is not on the wikipedia ?
« on: March 16, 2012, 04:55:55 pm »
why?

2
System / How to handle language switch? (Ctrl+Shift or Alt+Shift)
« on: March 07, 2012, 11:34:42 am »
Want to improve my text box so a user can decide in what language to type. So far seems like sfml doesn't handle language switch by default - nothing happens and i'm always with my system default language.

3
System / How to disallow all but text characters for all languages?
« on: March 05, 2012, 06:01:31 pm »
I want to allow only text characters for a textbox. How can I filter out all the other characters from evt.Text.Unicode. I'm talking about commas, semicolons and so on.

4
General / should i use inline functions?
« on: February 28, 2012, 02:11:09 pm »
should i use inline function or the compiler will take care of it?

i noticed sfml code doesn't use it a lot

5
Graphics / Flipped Y coordinate in a shader
« on: January 07, 2012, 03:24:05 pm »
/* idea
RenderImage image;
image.Create(800, 600);
*/

I have a render image (slightely outdated SFML 2.0). If I draw into it with shader and then draw into window it works ok.

image.Clear();
image.Draw(background , shader);
image.Display();

sf::Sprite sprite(image.GetImage());
window.Draw(sprite);

If I try to set shader in the second call Y coordinate is flipped in result shader

image.Clear();
image.Draw(background);
image.Display();

sf::Sprite sprite(image.GetImage());
window.Draw(sprite, shader);

Why ?

6
Graphics / need some help with glowing text
« on: December 30, 2011, 06:25:31 pm »
does anyone know how to create such a glowing effect like here

http://cooltext.com/Logo-Design-Animated-Alien-Glow

Searched a lot but couldn't find anything. Lots of info about glowing for 3d but I think this can be done much easier rather than for 3d.

7
Graphics / need some help with radial gradient and smoothstep
« on: December 30, 2011, 06:21:51 pm »
I've written this shader to create a radial gradient (translated code from hlsl found on internet)

uniform sampler2D tex;

const vec2 center = vec2(0.5, 0.5);
const vec3 start = vec3(1.0, 0.0, 0.0);
const vec3 end = vec3(1.0, 1.0, 1.0);
const float radius = 1.0;

void main()
{
   float dist = clamp(distance(center, gl_TexCoord[0]) / radius, 0.0, 1.0);      
   gl_FragColor = vec4(mix(start, end, dist), 1.0);
}
1) The result shows me blue and black but i would like to have a red - white transition. If I change smoothstep() to mix() then it works but produces banding effect.

2) I would like to have a circle instead of an ellipse which is the case if screen width != screen height

any suggestions?

8
Graphics / Several post effects at the same time?
« on: December 29, 2011, 01:45:02 pm »
Interesting question came to my mind - I want to draw a shockwave after an explosion. I'm thinking to do it using a post effect to whole screen. What if many explosions happen one after each other? So they will have to run simultaneously. How can I do that if I can ?

9
Graphics / Video memory question
« on: December 25, 2011, 01:23:22 pm »
what happens if the size of textures loaded is larger then the available video memory ?

Let's say I want to load 100 sprites in total 100 Mb but video card has only 64 Mb ?

10
Graphics / Does it make sense to use texture atlases with sfml?
« on: December 05, 2011, 03:11:12 pm »
Just saw some notes about texture atlases in another thread.

Does it make sense to use them with sfml? Upcoming graphics API for sfml ?

11
Graphics / pixel shader to scale the image ?
« on: December 01, 2011, 06:34:03 pm »
need to scale image down and up.

non sfml related but maybe anyone know how to do it in opengl ?

12
Graphics / Texel size when rendering a sprite with a shader
« on: November 30, 2011, 04:00:04 pm »
i'm rendering a sprite into window like this:

window.Draw(sprite, shader)

My window's size is 800*600 but my sprite's size is 1024*1024. I'm rendering it with some offset so only portion is shown. The shader (blur) needs texel size which is 1 / width for horizontal and 1 / height per vertical.

So the question is what the width and height should be equal to?

13
Graphics / Multipass shaders ?
« on: November 26, 2011, 10:15:57 am »
does anybody know how to do multipass shaders in opengl ?

i need to make a gaussian blur which is a vertical and horizontal passes according to description. I don't know much about shaders. Not sure if i need 2 passes in this case.

So help and advices are appreciated.

sample code or a nice reference would be perfect.

14
System / stack trace in error messages?
« on: November 24, 2011, 01:06:29 pm »
it it possible to log stack trace in sfml error messsages? as sometimes it's quite hard to find where it happens

Impossible to create render image (failed to create the target image)
Impossible to create render image (failed to create the target image)
Impossible to create render image (failed to create the target image)

15
General / OpenGL / GLSL versions in SFML 2.0 ?
« on: November 06, 2011, 12:03:46 pm »
which versions of opengl and glsl sfml supports ?

Pages: [1] 2