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

Pages: [1]
1
Graphics / Text is blurred
« on: February 29, 2012, 04:10:54 pm »


In the bottom example I commented out the scaling and changed the font size from 20 to 10 to maintain the size.
So scaling the text down resolves the issue.

No changes to View or any other transformations have been made.

Is it advised to always scale down the text when rendering?
Is this intended? Is there some better way to fix this?

Using the .NET bindings in C# if that matters.

2
DotNet / How do I clear Pixels?
« on: February 29, 2012, 01:06:58 pm »
Im using C# and I have a "RenderTexture".

Now I want to clear a line of pixels from the RenderTexture.
(So they should all have the argb value of 0,0,0,0)

Code: [Select]

vertices[0].Color = new Color(0, 0, 0, 0);
vertices[1].Color = new Color(0, 0, 0, 0);
vertices[0].Position = new Vector2f(x, 0);
vertices[1].Position = new Vector2f(x, 200);
myRenderTexture.Draw(vertices, PrimitiveType.Lines);


The problem is that its using alpha blending, so nothing is happening :(

I don't want that, I want to clear the pixels in that line.
What's the easiest way of doing that with the .NET bindings ?

3
DotNet / Performance questions
« on: November 12, 2011, 02:57:18 am »
Hello,

1) should I reuse "Shape.Line" objects?

2) Does it impact the performance negatively when I create a new Line object every frame?

3) Are Shape.Line, Shape.Circle, ... only proxys that are drawn with a shader?

4) Are "Shapes" drawn in a batch?

5) I've read that batching is not yet implemented.
When will it be ready? Will it be like batching in XNA or something like that?

(using C# if it matters)

4
Audio / Sounds stop playing after a while
« on: November 05, 2011, 07:20:11 pm »
Hi,

when I spawn lots of sounds, after a time they stop playing.

I load a sound from a file into a SoundBuffer once (in the constructor of the game).
Then everytime I need to play an instance of that sound I create a new sound instance (with the SoundBuffer from the beginning as parameter).
I immediately call Play on the instance without keeping a reference to it anywhere.

This works for a few seconds/minutes.
After a while no more sounds are being played.
The time until this happens varies, when i create more sound instances the time is shorter.

Am I doing anything wrong ?

5
DotNet / Cannot load csfml-audio-2
« on: November 03, 2011, 05:45:11 pm »
Hello

consider this little program:

Code: [Select]


using SFML.Audio;
using SFML.Graphics;
using SFML.Window;

namespace SFML2
{
static class Program
{
static RenderWindow _window;


public static void Main(string[] args)
{
_window = new RenderWindow(new VideoMode(800, 500), "Title", Styles.Default, new ContextSettings(32, 0, 8, 999, 999));

SoundBuffer buffer = new SoundBuffer("ui3.wav");
Sound sound = new Sound(buffer);

while (_window.IsOpened())
{
_window.WaitAndDispatchEvents();

sound.Play();

_window.Display();
}
}
}
}


In my VS project I have the following files:
csfml-audio-2.dll
csfml-graphics-2.dll
csfml-window-2.dll
sfmlnet-audio.dll
sfmlnet-graphics.dll
sfmlnet-window.dll

All set to: Copy if newer.

The program runs and crashes with the error:
System.DllNotFoundException csfml-audio-2.dll could not be found
(or something similar, my VS is in german)

But all files are there. I tried drawing simple sprites and it works.
How do I fix this?
Thanks for any help in advance. I really like sfml (and its bindings :D)

Pages: [1]
anything