StarlingGraphics / Starling-Extension-Graphics

flash.display.Graphics style extension for the Starling Flash GPU rendering framework
https://github.com/StarlingGraphics/Starling-Extension-Graphics/wiki
MIT License
285 stars 88 forks source link

Adding GraphicsEx APIs and Improving Performance for Stroke.buildGeometry() #55

Closed IonSwitz closed 11 years ago

IonSwitz commented 11 years ago

This pull request contains 4 pieces.

Unfortunately, I had already performed the last 3 when I did the first one, the performance boost, otherwise it might have been smarter to first submit the performance boost as a single pull request first.

If you decline this big request (I am still not sure how GitHub works fully) , I think the performance boost thing could still be valid to deliver as a separate check in. However, I might have to do some git magic in order to achieve that, and I'm not skilled enough to solve that at this point.

Thanks

/IonSwitz

robsilv commented 11 years ago

Hi @IonSwitz, very cool, loving the NaturalSplineExample! :-) I'm not going to pretend to understand the intricate details of why GraphicsEx functionality would be a pain to incorporate into Graphics, but as I'm a noob to this and you've clearly been doing it for a while... I'm happy to trust your judgement.

I'm happy to merge this into master, but I'm going to give @jonathanrpace & @jarrodmoldrich 24hrs to give an opinion, unless they ask for more time to review (chances are they're both pretty busy and need to focus on other work at the mo, so may sit this one out).

Thanks! Rob

IonSwitz commented 11 years ago

I think that the GraphicsEx stuff could be moved into Graphics, BUT that would change the API for Graphics, moving away from the desired goal of keeping Graphics (more or less) identical to the flash Graphics class.

If you and @jonathanrpace and @jarrodmoldrich think that this is not such a big deal, it can easily be moved into Graphics, and I would be happy to do that work, in that case.

Naturally, I think it would be better if there was "One Graphics" class, but I leave that up to you guys. I don't want to stomp all over your project.

jonathanrpace commented 11 years ago

My 2 cents :) - I think keeping this separated out into GraphicsEx makes more sense. It keeps the existing class simpler and easier to manage/fix. And if someone doesn't want to use the advanced features, they don't incur a cost to their filesize (hey - flash is still primarily used on the web!).

Sorry I've not been able to contribute more to this lately - I'm crunching on an XBox One launch title, and moving house at the same time!

robsilv commented 11 years ago

Thanks @jonathanrpace for taking a look. @IonSwitz, I'm happy to defer to Jon's greater knowledge on this one (greater than mine, at least). Plus, even if there was an eventual change of heart, I don't think we'd be precluding ourselves from being able to merge the two in future anyway. I'll leave it for the rest of the day in case anyone else wants to chime in, if not, I'll merge tonight or tomorrow morning.

robsilv commented 11 years ago

Hi @IonSwitz, thanks for your contribution! I've just merged it into the master project.

As you may have noticed, this is a bit of an ad hoc operation - we're a handful of developers who can only manage to devote a little bit of spare time to this project. As such, we're always keen to find people who are willing and able to contribute. You definitely fit the bill, so I'm wondering whether you'd like to be added to the team?

As per the rest of us, you'll be under zero obligation to do anything, though if you are able to help, then anything you do will be much appreciated by the growing number of followers of this project. If added, you'll gain the ability to merge your own pull requests into the main project, and the pull requests of others. This'll mean that if the rest of us drop off the radar for a period of time, you'll still be able to move the project forward for the benefit of everyone else.

I'm quite conscious of the fact that I will be disappearing off the grid in 2 weeks and not re-emerging until around Xmas (a long awaited trip to the Southern Hemisphere..), so I'd like to make sure my absence doesn't provide a bottleneck that stops you from being able to add value for everyone else.

How does that sound?

Cheers Rob

p.s. no worries if you're already super busy with other work!

IonSwitz commented 11 years ago

Hello, @robsilv .

I'd be happy to join up, I think this is a great initiative and any way I can help to keep Flash more alive is a bonus. So, absolutely. Count me in!

However, I have a bit of a Git ramp up to do, before I feel confident in merging pull requests. I'm sure I will learn :)

Also, as I mentioned before, I'm using Flash Develop when writing gode here, so my project files for Examples aren't in the same format as for the other Examples. Hopefully people read code rather than project files, but still it might add some frustration to some.

These are minor reservations, though. I would be happy and honored to join up.

robsilv commented 11 years ago

Excellent! I've every confidence you'll learn the ways of Git, if I can do it, I'm sure you can! Don't worry about your project files being in Flash Develop, as you say, the key thing is the code. I'm sure I can add the Flash Builder projects (or someone else can) down the line.

I'm really excited for the potential of this project, I think a lot of people feel it's a much needed extension to Starling to bring things back inline with the old Flash we knew and loved. On top of that though, we also have an opportunity to overshoot the original Graphics API, providing a supercharged version which can handle shaders, as your latest addition demonstrates.

What the project sorely needs is experienced and enthusiastic engineers to realise these goals, so I'm very happy to add you to the fold. I look forward to seeing more fun examples! :-)

Cheers Rob

robsilv commented 11 years ago

Also... Now you're a member of the team, you can create "branches". Like a fork, a branch is a clone of the project, though this clone lives within the main project, along side the master branch as a separate copy. You can view branches of the project here.

Currently there's only 1, the "master" branch, but you could create multiple other branches, each branch having its own goal. For instance, if you look at the current branches for the Starling project, you can see there's currently a "master" branch and a "vertexdata-bytearray" branch, the latter has obviously been created to work on a specific set of changes.

You may, for instance, want to create a branch named "accessModifiers". This branch could contain all your changes to the API where access modifiers have been changed from "private" to "protected", where classes have been made public, etc.

To create that branch, you could use the dropdown in the GitHub Windows client, type in the name and click "create branch". You can then sync that branch with github.com (using the usual "sync" button) and then switch your local development version to be that branch using the same dropdown. Beware: this will delete your current local version of the project and replace it with your new branch!

createbranch

Once you've committed your changes to your new branch on github.com and you're happy with them, you can issue a "pull request" from that branch to the master using the usual website interface.

The neat thing about branches is that it allows you to switch between and maintain multiple different versions of the project, allowing you to compartmentalize different types of upgrades. You can also create experimental branches (e.g. "myCrazyShaderUpdate") and point other users to them, allowing you to have a discussion about them without rolling all your ideas for improvements into one "take it or leave it" bundle.

Sorry for the information overload... Hope that helps! Rob

robsilv commented 11 years ago

p.s. In order to switch from developing your personal fork to developing branches on the main project, you need to do the following:

branches

1) In the GitHub Windows Client, right click your fork and select "stop tracking this repo" 2) Delete your copy of the repo from your file system (not sure this is essential, but advisable at least) 3) Navigate to the main extension's webpage, then click "clone in desktop"

You'll now be working with the main project and can start creating branches. :-)

IonSwitz commented 11 years ago

Ok, thank you! I probably won't be doing any huge sweeping changes just yet. ;) But now I have a great point of reference for when I do decide to take over the Universe and change all syntax to reverse hungarian notation.;)