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

Pages: [1] 2 3
1
DotNet / Exceptions when using Transform.GetInverse()
« on: June 26, 2012, 05:22:21 pm »
Hey,

I'm having a few problems using the Transform.GetInverse() function.

Using the following program:

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

namespace SFMLGraphicsModule
{
    class Program
    {
        static void Main(string[] args)
        {
            Transform transform = new Transform();
            transform.Rotate(10, 30, 30);
            transform.Translate(49, 59);
            Transform result = transform.GetInverse();
        }
    }
}

I get an unhandled AccessViolationException when attempting to use the function.  Am I doing something wrong here?

Thanks in advance,

Wibbs

2
General / Built in alternatives to gl_scissor_test
« on: June 19, 2012, 03:32:32 pm »
Hey,

I've worked out how to use OpenGL calls to enable and disable a scissor test.  This is primarily to help with rendering of scrollable windows.  However, I was wondering if there was any way of acheiving this with built-in SFML functions, as I can't see anything having looked through the documentation.

Thanks,

Wibbs

3
General / Re: Scene graphs, transformable and transform...
« on: June 19, 2012, 01:11:19 am »
Ah, thanks - I passed over RenderStates without looking at it in detail because of its name.  Looks like it will do exactly what I need  :)

4
General / Scene graphs, transformable and transform...
« on: June 18, 2012, 06:06:02 pm »
Hey,

I'm attempting to implement a simple scene graph, but am having trouble with the way transformable and transform have been implemented and are used by the various drawables.

When traversing the graph to draw each node, you need to be able to apply a cumulative transform to each node. 

However, I cannot see any way of applying this to the node currently being drawn, as the only way of directly changing the orientation of a Drawable is through its Position, Scale and Rotation.  As acumulative transform would be represented as a Transform object, there is no easy way of getting this individual information to use.

Am I missing something obvious here, as I would have thought this should be relatively easy to implement?

Thanks in advance,

Wibbs

5
DotNet / ATI Graphic Card Issue
« on: January 23, 2011, 05:51:59 pm »
I could also do with knowing whether/when there is likely to be a fix to this, as it has the potential to be a deal breaker with using SFML.

6
DotNet / Problems with shape origins and rotation/positioning
« on: January 08, 2011, 04:19:38 pm »
Thing is, the only one of those I can access from the .net bindings seems to be scale.  There does not appear to be a move or scale method.

7
DotNet / Problems with shape origins and rotation/positioning
« on: January 08, 2011, 02:57:34 pm »
Heh, you beat me to it - I've had a further play with my code and think I've got my head around how it's working now, but I have a follow up question.

I am trying to implement a system where you can carry out an arbitary number of translations and rotations (each potentially around a different point) in any order.  My trig. is not as hot as it used to be - is there a straightforward way of representing these transforms with the single setOrigin, Rotation and Position applied in a constant order that an SFML shape uses?

8
DotNet / Problems with shape origins and rotation/positioning
« on: January 08, 2011, 02:13:59 pm »
The problem I am having with setting the origin is that it is actually moving the square at the same time.  If I run the following code:
Code: [Select]
               Shape rect1 = Shape.Rectangle(new FloatRect(0, 0, 100, 100), new Color(0, 0, 0));
                rect1.EnableOutline(true);
                rect1.EnableFill(false);
                rect1.OutlineWidth = 2;
                rect1.Position = new Vector2(0, 0);
                rect1.Origin = new Vector2(-20, -20);


I end up with a square which has been translated by 20, 20, which doesn't seem right

9
DotNet / Problems with shape origins and rotation/positioning
« on: January 07, 2011, 07:50:17 pm »
Hey,

I've run into a problem which I am sure must have a simple solution.  All I am trying to do is draw two squares, both set to the same position and one rotated by a set amount around the centre of the squares.  However, I cannot get my head around how origins work in relation to rotation and positioning.

No matter what I try to do, the origin is set before both the positioning and rotation, which means that the rotation is always relative to the top left corner of the square.  What I want to be able to do is position the two squares, then set a new origin just for the rotation - is this possible?  If not then I cannot see how I can accurately place the two squares without using some horrible trigonometry.

Here's some example code:
Code: [Select]
rect2.Origin = new Vector2(20, 20);
                rect2.Position = new Vector2(300, 300);
                rect2.Rotation = 45;

gives the same result as
Code: [Select]
rect2.Position = new Vector2(300, 300);
                rect2.Origin = new Vector2(20, 20);
                rect2.Rotation = 45;


How do I draw a square at 0,0 rotated 45 degrees around its centre?

Thanks in advance,

Wibbs

10
DotNet / Clarification - extra license requirements for using audio
« on: December 05, 2010, 02:37:33 am »
Hey,

I seem to remember that the third party licenses for the libraries you use means there is an additional requirement for using the audio part of SFML, but I can't remember the exact details.  Is this still the case?

Thanks,

Wibbs

11
DotNet / Setting outline colour independently of fill colour
« on: October 18, 2010, 07:42:41 pm »
Heh,

I've actually just tracked down what the problem was - I was accidentally setting the general shape colour as well as the colours of individual points, which when combined together gave be black.  Now I've removed the line that sets the shape colour it works fine.

Sorry about that,

Phil

12
DotNet / Drawing semi and quarter circles
« on: October 18, 2010, 06:32:09 pm »
Cool,

Thanks for your reply. I'm trying to avoid the use of images if possible, and have it working now.

Thanks,

Phil

13
DotNet / Setting outline colour independently of fill colour
« on: October 18, 2010, 06:30:49 pm »
Hi,

I'm currently trying to get a shape to render with independently set fill and outline colours.  I have worked out how to set the point colour and point outline colour when I'm adding the points to the shape but whatever I seem to do, I can't stop the fill colour from influencing the outline colour thats drawn.  The example I'm working with is trying to draw a black shape with a white outline, and I get the following results...

A shape with a black fill and white outline will always draw as a black outline, even when the fill is disabled.
A shape with a white fill and white outline will draw with a white outline with the fill disabled.

I'm pretty certain this is to do with the way the two colours combine when rendered, and I've tried messing around with the blend mode of the shape, but this didn't have the desired effect either.

I feel there must be something obvious I'm missing here, but can't see it.

Any help would be greatly appreciated.

Thanks,

Phil

14
DotNet / Drawing semi and quarter circles
« on: October 18, 2010, 02:27:49 pm »
Hey all,

I am trying to work out the most efficient way of drawing semi and quarter circles, and was wondering if anyone had any suggestions.  I can obviously draw a custom shape and set points manually, but would much prefer a cleaner method if one exists.

Thanks in advance,

Phil

15
DotNet / Silly problem with updating to SFML 2
« on: October 13, 2010, 11:55:55 pm »
Thanks for the quick fix - it's all working fine now :)

Pages: [1] 2 3