Profile

Member Since
December 18, 2011

Search Members

  

Moczan

26
@

Badges

This user hasn't earned any badges yet.

Posts

Viewing 1 to 20 (26 Total)

Re: Targetting the desktop (win/mac/linux)

As far as I know it's not in the Assets class yet, but you can easily create one using ByteArray or Bytes classes. Or you can even change the extension of your files to something random and it will prevent most of the kids from getting the images,

Posted on June 21, 2012 at 2:36 PM

Re: getting graphics.beginGradientFill and drawTriangles to work

Thanks for help! I've checked out source of the modified bunny benchmark on Philippe's blog and managed to make it work with texture. Can we use the drawTriangles without texture, just using the colour parameter to draw coloured triangles or it doesn't work like that?

EDIT: I've used 1x1 white bitmap as a texture and used colour array to create a high quality gradients with alpha transparency. Worked wonderful!

Posted on April 03, 2012 at 3:10 AM

Re: getting graphics.beginGradientFill and drawTriangles to work

Installed 3.3.0 today, still can't get that working properly, any suggestions?

Posted on April 02, 2012 at 6:15 AM

Re: Tilesheet.drawTiles has bug with TILE_ALPHA

Is this fix a part of 3.3 update or wasn't included in the update?

Posted on April 02, 2012 at 6:10 AM

getting graphics.beginGradientFill and drawTriangles to work

Hi guys! Today I've installed the NME from repository finally gaining access to Graphics class working on Windows. I started playing with the methods, while most of them are quite self explanatory, I can't get gradientFill and triangles to work. Could somebody explain me what each parameter of beginGradientFill does and what number ranges should I use in ones like alpha or ratio?
Also drawTriangles just takes first array and draws triangle with current fill/lineStyle settings. How can I make it work with parameters like UVs, viewport or even simple colours?

Posted on March 13, 2012 at 5:29 PM

Re: Tilesheet.drawTiles has bug with TILE_ALPHA

That's because drawTiles is broken and even though I've been reporting this bug for months now, nobody is fixing it.

Posted on March 13, 2012 at 6:14 AM

Re: drawTiles RGB parameter bug?

I still think that it's a bug, I was reporting it in the past but it was ignored. Doing an 'empty' drawTiles between proper drawTiles works wonders, but it's a hack and not proper way to solve it.

Posted on March 03, 2012 at 4:48 PM

Re: NME SVN iOS crash

Hey, I've just seen this post, how can I get the working version to test if it resolves the Windows problem I've posted about in the other topic?

Posted on February 28, 2012 at 3:03 PM

Re: graphics.drawTriangle and cacheAsBitmap bugs

I've installed the beta 3.2.1 version and the bug is still there. Any updates?

Posted on February 24, 2012 at 5:04 PM

Re: graphics.drawTriangle and cacheAsBitmap bugs

I run both examples on integrated Intel GPU and nVidia GeForce, the results are the same.

Example 1:
http://pastebin.com/X2M8H8jd
Crashes the application, setting cacheAsBitmap = false in this example yields white screen.

Example 2:
http://pastebin.com/4hMRws2Z
This works fine with cacheAsBitmap = false, but crashes the application as soon as I try to set it to true.

Posted on February 23, 2012 at 2:29 AM

graphics.drawTriangle and cacheAsBitmap bugs

Hi! With recent NME 3.2 update I've found 2 bugs related to rendering. It's on a Win7 64-bit with cpp target
1. graphics.drawTriangle doesn't work (no errors, but it doesn't render anything).
2. Turning cacheAsBitmap = true on Sprite object crashed the entire application.

Posted on February 22, 2012 at 3:41 AM

Re: Drawing convex polygons, cpp target

Thanks for the answer! Does that mean that graphics.lineTo etc. will draw hardware accelerated lines? I assume that cacheAsBitmap = true will turn GPU drawing on?
And last question about anti-aliasing, is there a separate flag for it or is it affected by quality setting?

EDIT: I've tried to set cacheAsBitmap on my Sprite object as true and it unfortunately crashes the application.

Posted on February 21, 2012 at 2:54 PM

Drawing convex polygons, cpp target

Hi!

I would like the ask, is there an ability to draw hardware-accelerated, convex polygons in NME, targeting desktop applications? Since graphics.lineTo is much slower than it's AS3 counterpart (practically unusable), I was unable to create a fast debug draw solution for my game.

Posted on February 21, 2012 at 8:44 AM

"Failed to load resources" 3.1.1 cpp target

Recently, I've started encountering this error at random times. Usually hitting 'build' again works, but it gets annoying. Any solutions?

"Failed to update resources

Called from ? line 1
Called from InstallTool.hx line 575
Called from InstallTool.hx line 95
Called from installers/InstallerBase.hx line 125
Called from installers/DesktopInstaller.hx line 44
Called from data/Icons.hx line 337
Called from InstallTool.hx line 286
Uncaught exception - Error running: ReplaceVistaIcon.exe E:\Dropbox\haXe\WonderBros/\bin/cpp/windows/bin//WonderBros.exe E:\Dropbox\haXe\WonderBros/\bin/cpp/windows/haxe/icon.icoC:\Motion-Twin\haxe\lib\nme\3,1,1\ndll\Windows\
Build halted with errors (haxelib.exe)."

Posted on February 10, 2012 at 4:38 PM

Re: graphics lineTo, drawCircle, drawRect hardware acceleration

Ok, I still can't make it work. I will describe my setup in detail:

First, in my .nmml file, I have hardware="true". The target it -cpp. I add a subclass of Sprite (should I be using Bitmap here?) to the stage and manipulate it's graphics member to drawTiles and to render primitives. I draw 10 lines with total length of approximately 1000 pixels. With cacheAsBitmap = false I get around 22/60 fps (that's on a gaming rig that runs Skryim on High with 60 fps!). With cacheAsBitmap = true I get 60 fps, but running it on a little bit slower machine runs it at 50 fps. When I try to draw 2 circles at the start and end point of lines, the framerate further drops to around 8 fps on cacheAsBitmap = false.

What am I doing wrong? I can't believe that drawing 1000 pixels of lines is such a terrible CPU/GPU hog. I am able to display hundreds of objects in AS3/Flash, why can't I display few lines with haXe/C++/native app?

Posted on January 11, 2012 at 1:28 AM

Re: graphics lineTo, drawCircle, drawRect hardware acceleration

Thanks for answer Huge! I don't really need to use vector graphics, I just want to draw some primitives (mainly lines) on the screen. Are there other methods/classes for doing it on hardware?

Posted on January 10, 2012 at 2:16 AM

graphics lineTo, drawCircle, drawRect hardware acceleration

Hi! I am writing a debug draw function for my engine. I have a very fast rendering of Bitmaps thanks to drawTiles() method, but when I do graphics.lineTo()/drawCircle()/drawRect() on the same layer as drawTiles() the framerate drops rapidly. Is there a way to perform those drawings on GPU and maintain the stable 60 fps while doing it?

Posted on January 09, 2012 at 6:20 AM

Re: Empty NME app leaking memory on Windows

I've compiled the Actuate example, it quickly went from 46 mb to 52mb and then the memory consumption was drifting around 53-54, but steadily rising. Also even bigger problem exist when you resize the window (switch to fullscreen and back to normal). It increases memory consumption by around 10 mb each time and doesn't go down.
I suspect there is something wrong with garbage collection on cpp target. Is there a way to force garbage collection in code? How do you guys usually go around profiling your haxeNME applications targeting desktop?

Posted on December 29, 2011 at 7:31 PM

Re: Empty NME app leaking memory on Windows

I just create a new NME project in FlashDevelop, hit build & run and watch memory consumption in task manager. I can observe this behavior on both Win7 64-bit and WinXP 32-bit.

Posted on December 28, 2011 at 6:12 PM

Empty NME app leaking memory on Windows

I've just discovered a fatal bug. Empty cpp NME (3.1.1) projects in both Release and Debug mode leaks memory constantly. Tested on Windows 7. Any way of stopping it or is it internal bug?

Edit: This means that every NME application targeting Windows (I can't test it on other platforms) is constantly leaking memory and testing your own code for mem leaks is futile.

Edit: Resizing the window to full screen and back to normal adds around 10 mb that doesn't go away no matter what.

Posted on December 27, 2011 at 6:13 PM
« Previous12Next »