Login Action Required

The NinevehGL Forum uses a new concept of "socialized forum" or as we like to say "Tweet Forum".


Here is the deal:
  1. No new registration is required. Just sign in with your Twitter account and authorize the NinevehGL Forum.
  2. Once you’re in, you'll be able to "Follow a Thread", that means every time that thread receive a new post or update you'll receive a mention on your twitter.
  3. Besides, you can enable "Auto Share", then every new post and/or thread you make will be tweeted on your timeline. (By default, auto-share is enabled only for your threads)

Forum Rules:

1. We understand human comunication can become "hot" sometimes. So some insults and bad words ARE allowed. Just don't push too much being an asshole all the time.

2. SPAMMERS are not allowed. There are penalties for this kind of user and they can be banned forever.

3. You can report other users, if you judge necessary. An user reported many times by many people can also be banned forever. However you can also receive penalties for report deliberately for no apparent reason.

If there is a similar thread title, make sure the other one doesn't already have the answer you're looking for.

This forum uses the BBCode (Bulletin Board Code), here are some instructions:

Bold: [b]text[/b]
Italic: [i]text[/i]
Underline: [u]text[/u]

Code: [code]text[/code]
Quote:
[quote=@username]text[/quote]
[quote]text[/quote]

List:
[ul] [*]item [/ul]
[ol] [*]item [/ol]

URL:
[url]http://url.com[/url]
[url=http://url.com]text[/url]

Image:
[img]http://imageurl.com[/img]

Embed (videos, code, 3D):
[embed]http://url.com[/embed]

Welcome to the NinevehGL's world!
NinevehGL is a 3D engine forged with pure Obj-C.
Welcome to the
Forum!
Hello, Guest.

Your current vote:

You can change your vote many times. But it's still one single vote.

Can not save NGLView drawToImage to PhotoAlbum on device
Vote this thread:


@Geometros

Posts: 11

NGLNewbie

Mon, Nov 26 2012


I save current view in PhotoAlbum using next code:


-(void) SaveToAlbum
{
UIImage* img = [self drawToImage];
UIImageWriteToSavedPhotosAlbum(img, self,@selector(image:didFinishSavingWithError:contextInfo:), nil);

}

- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
// Was there an error?
if (error != NULL)
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Image could not be saved.Please try again" delegate:nil cancelButtonTitle:nil otherButtonTitles:@"Close", nil];
[alert show];
}
}


This code works fine on Simulator, but not save on Device - white blank page only

How I can fix it?
100% like this - 1/1

@dineybomfim

Posts: 571

NGLAdmin

Tue, Nov 27 2012


In response to: @Geometros

Hello,

Hard to say just looking at this code without debugging the entire application.
Anyway, if you're planning to save an image, prefer the method:


NSData *data = [self drawToData:NGLImageFileTypeJPG];
[data writeToFile:@"desired/path" atomically:YES];
0% like this - 0/0

@Geometros

Posts: 11

NGLNewbie

Mon, Dec 3 2012


In response to: @dineybomfim

No, :(

drawToData and drawToImage return blank white image on device (success on Simulator)

Any ideas?

0% like this - 0/0

@bhartiya_varun

Posts: 27

NGLNewbie

Mon, Dec 3 2012


In response to: @dineybomfim

Facing the same problem, i created a new NinevehGL app from template to do just this.. But I too get a blank image.. in my case it is black..

Please help!!!

0% like this - 0/0

@bhartiya_varun

Posts: 27

NGLNewbie

Wed, Dec 5 2012


In response to: @dineybomfim

The same code is working for old iPad... So could it be that it is something related to pixel density?


0% like this - 0/0

@bhartiya_varun

Posts: 27

NGLNewbie

Thu, Dec 6 2012


In response to: @dineybomfim

It works on iOS 5.1.1 but not on iOS6.0 or later..

Tried methods mentioned here.. But no luck..
http://stackoverflow.com/questions/1352864/how-to-get-uiimage-from-eaglview


Please help!!!

0% like this - 0/0

@Geometros

Posts: 11

NGLNewbie

Thu, Dec 6 2012


I hope - it will be fix in 0.9.4
0% like this - 0/0

@bhartiya_varun

Posts: 27

NGLNewbie

Thu, Dec 6 2012


In response to: @dineybomfim

If I call the drawtoImage inside drawView it works, but if I call it anywhere else it doesnt..

I was trying to call the drawView method from the action method of my snapshot button.. but that results in application crash/ or again results in black image...

Seems like I cant call drawToImage manually!!! :-(
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Fri, Dec 7 2012


In response to: @bhartiya_varun

OK guys,

Thanks for the feedback, we'll investigate the case.
One more question, are you guys using the SDK for iOS6? (armv7s)

If not, here is the link NinevehGL armv7s
0% like this - 0/0

@Geometros

Posts: 11

NGLNewbie

Fri, Dec 7 2012


In response to: @dineybomfim

Thank you very much! I try it in nearest time
Yes, I am using iOS6 SDK

Is this framework don't working on old devices (iPad1 iPad2)?
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Sun, Dec 9 2012


In response to: @Geometros

Yeah, armv7s is no longer compatible with the old devices.
0% like this - 0/0

@bhartiya_varun

Posts: 27

NGLNewbie

Wed, Dec 26 2012


In response to: @dineybomfim

Sorry for my late responses.. I am not getting email notifications, even though I am following this thread..

I am using iOS 6 SDK, valid architectures: armv7

will try out the latest version soon..

Another thing that I noticed is that the drawToImage, which was working after moving this call within the function drawView, stops working if I enable
nglGlobalAntialias(NGLAntialias4X);

If I comment this line, everything works nicely, but I get black image otherwise..

0% like this - 0/0

@bhartiya_varun

Posts: 27

NGLNewbie

Thu, Dec 27 2012


In response to: @dineybomfim

Is this a stable version? Did not see a news regarding this on http://nineveh.gl/docs/changelog/

0% like this - 0/0

@Geometros

Posts: 11

NGLNewbie

Fri, Dec 28 2012


In response to: @bhartiya_varun

I must change rendering engine. NinevehGL updates very slow :(
Thank you NinevehGL ... and good bye
0% like this - 0/0

@burakkilic

Posts: 36

NGLNewbie

Thu, Sep 5 2013


In response to: @dineybomfim

I have exactly the same issue. It works on simulator, but not on device. How can we solve it?
0% like this - 0/0

@yang5664

Posts: 16

NGLNewbie

Tue, Dec 24 2013


In response to: @Geometros

please reference to

http://nineveh.gl/community/forum/issue_with_getsave_img_with_drawtodata

it's may useful...
0% like this - 0/0
Technology

NinevehGL is a 3D engine built right on top of OpenGL ES and it uses all the programmable pipeline power, making it easy for you to create great application with shaders.

Share on


Follow NinevehGL
Fastest way to contact us:

Copyright © 2011 db-in. All rights reserved.