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

Pages: [1]
General discussions / (OpenGL or SFML) doesn't render anythig
« on: January 12, 2014, 01:55:13 pm »
Hi guys, I have 2 classes, first one is my ScreenHost and second one is ViewController.
ScreenHost creates a ViewController and adds some Graph objects to it, then it waits until DataArived event raised and it calls Render() method on ViewController.
The problem is ViewController doesn't show anything, it just shows a white screen while the Render() method runs properly! But when I call Render() right after constructor it draws my shapes.
Here's my code (summerized):

/////// ScreenHost.SetScreen()
        public void SetScreen()
            vc = new ViewController(800,  600, Rows, Cols);
            // If i call  vc.Render() it works

/////// ScreenHost.DataArived  event

        void DataArived ()
            // it runs Render() but doesn't show anything except a white screen (Render clears screen with black color)

/////// ScreenHost.DataArived  event

        public void Render()
            // it clears screen with black color

Finally I successfully tested this:
Vertex[n] to highlight graph's edge which is PrimitiveType.LinesStrip
Vertex[n*2+1] to fill graph, this one is PrimitiveType.TrianglesStrip
The point is this Vertex[] is faster than Convex more than 2 times!

isn't is possible just to fill VertextArray?

Thank you nexus for your response, I'm trying VertexArray, if this could not help me I will go for ConcaveShape.

DotNet / Wrong behavior while drawing and filling ConvexShape - SFML.Net
« on: January 05, 2014, 08:43:31 am »
Hi, I don't know did I miss some property to set or it is a bug, this is the problem:
My program is supposed to visualize a signal, so I need to draw a graph and fill inside of this graph, so I create a convex and set n+2 points to specify graph's border (n points for graph line and 2 point to make convex a closed shape((width, height) and (0, height)), it draws graph but has some malfunctions in 2 parts: 1- when draws outline it has some distortion 2- it fills convex like 3d, but I want to fill just inside of graph
I put graph's image:

Pages: [1]