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

Pages: [1]
1
DotNet / Re: c# example for particle system?
« on: September 02, 2013, 09:16:20 pm »
(...)
@SymegPL
Hey, thanks for sharing. I will have a look at your lib. Is the client/server part stabil?
(...)

Should be stable, but I cant guarantee that.

2
DotNet / Re: c# example for particle system?
« on: August 28, 2013, 09:16:21 pm »
You can look at my implementation at: https://github.com/Symeg/Smart2DGameFramework/tree/master/Smart2DGameFramework/Graphics/Particles
Demo on youtube (fire particles, old video, now is better performance)

You can also find other useful tools :)

3
DotNet / Re: How to connect SFML.NET to Visual Studio 2012?
« on: August 28, 2013, 09:14:44 pm »
csfml-window2.dll, csfml-graphics2.dll and csfml-audio2.dll are NATIVE dll's. You should add to references only MANAGED libraries (sfmlnet-window2.dll, sfmlnet-graphics2.dll and sfmlnet-audio)2.dll . NATIVE dlls must be in working directory.
Quote
http://www.sfml-dev.org/download/sfml.net/

(...)Since it's a .Net library, there's only one archive per architecture, which works for any OS and compiler. However, since the name of CSFML libraries appear in the source code, and are different on each OS, for OS X and Linux you will have to write a special configuration file which maps the names of the CSFML DLLs to the names of the corresponding CSFML shared libraries on your OS (for example, "csfml-graphics-2.dll" -> "libcsfml-graphics.so.2"); see the Mono documentation for more details.(...)

4
DotNet / SFML.Net 2.0 RenderTexture bug - flickering
« on: July 01, 2013, 12:09:47 am »
@EDIT I updated my graphics driver and problem now doesn't occurs!
Probably this problem is caused by my graphics card (GF 7300 GT)
It's very strange because when i minimize and restore app this problem doesn't occurs!


Hello.
Sorry for my bad English.

I am clearing and drawing some vertices on RenderTexture every frame and i am drawing RenderTexture result on RenderWindow.
The image "flashes" every 10 frame.

When i am drawing directly to RenderWindow this problem doesn't occurs.

I downloaded SFML.Net 2.0 directy from the site of course.

The following video shows a bug:


Source code which i am used to make video:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SFML;
using SFML.Window;
using SFML.Graphics;

namespace sfmltest
{
    class Program
    {
        static void Main(string[] args)
        {
            RenderWindow window = new RenderWindow(new VideoMode(800, 600), "sfml test");
            window.Closed += (s, e) => { window.Close(); };

            RenderTexture renderTexture = new RenderTexture(800, 600);

            Sprite sprite = new Sprite(renderTexture.Texture);

            Vertex[] circle = BuildCircle();

            while (window.IsOpen())
            {
                window.DispatchEvents();

                window.Clear();

                renderTexture.Clear(new Color(0, 0, 0, 0));
                renderTexture.Draw(circle, PrimitiveType.TrianglesFan);
                renderTexture.Display();

                window.Draw(sprite);

                window.Display();
            }
        }

        static Vertex[] BuildCircle()
        {
            Vertex[] circleVertices = new Vertex[36 + 2];

            circleVertices[0] = new Vertex(new Vector2f(400, 300), Color.Green);

            float currentDir = 0f;
            float dirStep = 360f / (circleVertices.Length - 2);
            for (int i = 1; i < circleVertices.Length - 1; i++)
            {
                Vector2f pos = new Vector2f();
                pos.X = (float)Math.Cos(Math.PI / 180 * currentDir) * 250f;
                pos.Y = (float)-Math.Sin(Math.PI / 180 * currentDir) * 250f;
                pos += new Vector2f(400, 300);

                circleVertices[i].Position = pos;
                circleVertices[i].Color = new Color(192, 255, 64, 64);

                currentDir += dirStep;
            }

            circleVertices[circleVertices.Length - 1] = circleVertices[1];

            return circleVertices;
        }
    }
}
 

5
Window / Re: Get pressed key via Keyboard class.
« on: March 31, 2013, 08:32:57 pm »
Yes i know. I wrote it in my last post.
This works. Thank you.

6
Window / Re: Get pressed key via Keyboard class.
« on: March 31, 2013, 12:50:28 pm »
Ok, thank you. I've got another question.
How to get char from passing Key code and is shift pressed, alt pressed?
Example:
char c = ConvertToChar(Keyboard.Key.A, true, true);
//KeyCode, isShift, isAlt
in PL should return Ą
Is it possible only with MapVirtualKey WinAPI function?

@EDIT I will check TextEntered event.

7
Window / Re: Get pressed key via Keyboard class.
« on: March 30, 2013, 11:29:02 pm »
Yes. I saw method which allows to check if specified key is pressed. I need last pressed key.
I stayed longer on this sentence:
Quote
This tutorial explains how to access global inputs: keyboard, mouse and joysticks. This must not be confused with events: real-time inputs allow you to query the global state of keyboard, mouse and joysticks at any time ("is this button currently pressed?", "where is the mouse?") while events notify you when something happens ("this button was pressed", "the mouse has moved").
and I believe this is possible only with events?

Sorry for my bad english btw.

8
Window / Get pressed key via Keyboard class.
« on: March 30, 2013, 08:18:53 pm »
Is it possible to get pressed key on keyboard via Keyboard class? Something similar to OnKeyboardKeyPressed event.
Example (C#):
Keyboard.Key key = Keyboard.GetLastKey();

9
DotNet / Re: SFML 2.0 .NET on OS X Issues
« on: March 29, 2013, 11:20:06 pm »
http://www.mono-project.com/DllNotFoundException

I don't use Mac OS and Mono but try this:
<configuration>
    <dllmap dll="csfml-graphics-2.dll" target="libcsfml-graphics-2.0.dylib" />
</configuration>

10
Feature requests / Modern UI support by GL2DX
« on: February 08, 2013, 04:31:38 pm »
Hello!
I found OpenGL to DirectX wrapper - https://gl2dx.codeplex.com/ which can be used in Windows 8 Modern UI apps.
Would be possible to run SFML on this wrapper?

11
DotNet / Re: SFML Events w/C#.NET
« on: January 27, 2013, 10:05:47 pm »
Yes. When window is closed then OnClose method was triggered.

12
DotNet / Re: [2.0 RC] View bug
« on: January 27, 2013, 07:08:38 pm »
But classes are passed by reference, not value.

@EDIT I saw on the source. GetView always create new "View" object.
Thank you.

13
DotNet / [2.0 RC] View bug
« on: January 27, 2013, 06:10:17 pm »
Hello! Sorry for my bad english.

I have problem with View class. When i apply new position, rotation etc. to view it works, but nothing changes on screen. It was only change when i use SetView method.
Exapmle:

window.GetView().Move(new Vector2f(5,5));//nothing changes on the screen

window.SetView(window.GetView().Move(new Vector2f(5,5)));//only now view was applied to the screen

It is bug or not?

Thanks for replies.
Utermiko

Pages: [1]
anything