Badges
This user hasn't earned any badges yet.Posts
|
Viewing 1 to 10 (10 Total) |
|---|
Re: stage3D based drawTiles implementation (ALPHA)
Hi, One question: is there any reason that it doesn't support drawing on nme.display.Shape and only work with sprite? I guess it may be possible to add in the drawTiles method to nme.display.Shape using the extern trick as well - I personally wasn't that concerned with getting that implemented, I prefer the tilesheet syntax - personal preference really I suppose. Do you think it is possible (and a good idea) to use the graphic (provided to drawTiles) element's position, rotation, scale, blendmode, etc. to alter stage3d calls? I implemented the stage3d tilesheet code to match the behaviour of the standard CPP tilesheet API, which does ignore the graphical elements transform. I'd suggest keeping the two codepaths as consisten as possible is the best plan. Although, slightly confusingly the non-stage3D flash tilesheet implementation DOES use the displayobject's transform - probably because it would be more effort not to. Also, I'd love to see whatever it is you're building once it's ready!
Posted on November 30, 2012 at 12:15 PM
|
Re: stage3D based drawTiles implementation (ALPHA)thanks for that - I have just made the fixes you have pointed out, and will be checking them in shortly.
Posted on November 27, 2012 at 12:38 PM
|
Re: stage3D based drawTiles implementation (ALPHA)So, I think I'm ready to call TilesheetStage3D beta. I have made several changes to improve performance, made it gracefully handle context loss, and done as singmajesty suggested earlier: I wonder if there is an easy way to tell if one display object is over or under another object? This would provide a hierarchy, so even if it is at the bottom, at least multiple drawTiles calls are layered properly. The position of each layer and scale could also be influenced by the parent display objects if that is taken into account with the native API. The answer to is there an easy way to tell if one displayObject is yes - not as easy as I'd have liked, but it is fast. The class now operates pretty much as described in the quote above. I have also made it so it would be possible to integrate this into nme as a whole such that it would work with graphics.clear(), like the native API - what we'd need is the following: import com.asliceofcrazypie.nme.TilesheetStage3D;That, along with the initialisation code is all that's needed, and I think could be included in NME such that this operated transparently, apart from the following caveats that I can't find a way around: -Will rend er below displayList (as discussed earlier, unavoidable) -If displaylist order is changed after rendering, this change will be reflected stage3D display unless it is re-rendered (a major edge-case) As far as I am concerned, this is feature complete, and barring testing/bug fixing is finished. I'm going to be testing it over the next week or two as I go back to working on the project that I created this for in the first place, but would love it if anyone else could have a go and let me know. I'd also love to see this included in the NME and am happy to help make that happen.
Posted on August 27, 2012 at 3:18 PM
|
Re: stage3D based drawTiles implementation (ALPHA)I've just committed an update to the google code repo that has some changes. Firstly, I've re-arranged the structure of the repo to have a samples directory, and added a simple sample of the drawtiles in action, implemented to work cross-plaform.
Posted on August 17, 2012 at 1:34 PM
|
Re: stage3D based drawTiles implementation (ALPHA)So, it seems this discussion has moved on a bit since I last posted - on the subject of a fully stage3D based display list implementation, I agree entirely with singmajesty, and I agree that the logical conclusion if we want a cross-platform hardware accelerated graphics API is to start from scratch.
Posted on August 16, 2012 at 5:39 AM
|
Re: stage3D based drawTiles implementation (ALPHA)Ah, nice idea - I like it! That probably wouldn't be too slow, although I'm not sure how you would work out the depth in the hierarchy from a graphics object. I had considered automatically clearing and rendering using enterframe listeners, but wasn't sure if that was a good plan, as it wouldn't match the behaviour of the standard drawTiles - but it might be a good compromise,
Posted on August 14, 2012 at 3:02 PM
|
Re: stage3D based drawTiles implementation (ALPHA)That would be awesome - I'd love to contribute to NME!
Posted on August 14, 2012 at 2:18 PM
|
Re: stage3D based drawTiles implementation (ALPHA)I'm not at all familiar with HxSL - I will take a look at this when I get a chance.
Posted on August 13, 2012 at 8:44 AM
|
Re: Stage3D support for cpp targetIf anyone is interested, I have approached this problem from a different direction, and have written an implementation of drawTiles that in flash uses stage3D for the rendering. This gives an (almost) completely consistent approach to getting hardware accelerated graphics rendering across almost all platforms. More information, and the source can be found here:
Posted on August 13, 2012 at 4:11 AM
|
stage3D based drawTiles implementation (ALPHA)After much confusion and frustration, I now have a working implementation of drawTiles that can use stage3D when published for flash 11.2+.
Attachments:
TilesheetStage3D.hx
Posted on August 12, 2012 at 10:26 AM
|
