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.


@BruelPierre

Posts: 9

NGLNewbie

Mon, Jun 25 2012


Hi there !

I would like to render the scene into a texture, but the method drawToImage or drawToTexture are far to slow. So I thought, I could use offscreen methods.

Is there a way to acces to the _engine attribute into the NGLView class ?

Thank a lot !
0% like this - 0/0

@BruelPierre

Posts: 9

NGLNewbie

Mon, Jun 25 2012


In response to: @BruelPierre

Outch ! I made a mistake with the title of the post ! It's not CoreImage, but CoreEngine of course !
Could you fix it ?
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Mon, Jun 25 2012


In response to: @BruelPierre

Hello buddy,

Well, in fact "drawToImage" and "drawToTexture" are extremely fast. You can check their performance on the Off-Screen Lesson (NinevehGL Lessons/Effects/Off-Screen.xcodeproj).

Depends on what you're trying to do with the resulting image. If you want to use it as a texture into another mesh, in this case you'll have to recompile the mesh and the recompilation is slow.

The next version will include the animated texture, with this feature you can update single texture very fast, without recompiling the mesh.


BTW, if you want to make a workaround to use OpenGL and get the internal NinevehGL context, it's OK. However work with the internal variables is not allowed. In fact we're thinking about hide any internal variable to avoid this kind of "wish".
0% like this - 0/0

@BruelPierre

Posts: 9

NGLNewbie

Tue, Jun 26 2012


In response to: @dineybomfim

Hi !

I've tried the Lesson about Off-screen rendering. It seems that the process takes 85 ms ... too slow for me. I try to use the GPU of the Ipad to make some custom process, and i've only 20 ms to render and get back the data.

There is a way to accelerate the drawToImage ?

Thanks !
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Tue, Jun 26 2012


In response to: @BruelPierre

Hard to imagine how you get this comparison....

Understanding that a single "drawToImage" call include reading the pixels, transforming it to UIImage and freeing the memory...

I really doubt you can make the same process with 20 ms...

Didn't you mean drawToImage (85ms) VS only reading pixels (20ms)?

But if you trust that you can do it faster by your own, go ahead, NinevehGL allow you to use OpenGL outside NGL API. Get the context, bind the buffers, read the pixels, transform to UIImage... feel free.
0% like this - 0/0

@BruelPierre

Posts: 9

NGLNewbie

Wed, Jun 27 2012


In response to: @dineybomfim

Hi !

Nonono, there is a misunderstanding ! I didn't say that I can read the pixels, transform it to UIImage and free the memory, in 20 ms. I don't think that I can do it faster than you ! :).

I'm trying to build a real time process, so I've got only 40-60 ms to do all the stuff, including : reading pixels, etc ... That's why I need a process to read the pixels as fast as possible.

I've tried glReadPixels, it's work fine and fast. But I don't really like to use OpenGL outside NGL API, because without the source code I can't predict if something wrong can happen. That's why I'm looking for a way to do the same thing using your API.

Just a last question. How can you acces to the context since it is into the CoreEngine ?

Thank !
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Thu, Jun 28 2012


In response to: @BruelPierre

This is one of the good things about NinevehGL

The EAGLContext used by the NinevehGL, even in multithreading mode, is in fact a shared context that has a shared instance on the main thread.

So, after the NGLView being initialized, you can get the main context by calling "nglContextEAGL()". With this context you can proceed with many other calls to OpenGL API outside the NinevehGL.


About the performance... hmmm... what device you're testing?
Our tests with the iPad 1 and iPhone 4 generate UIImage without loose performance, that means, running at 60 fps. What fps did you get in your tests?
0% like this - 0/0

@BruelPierre

Posts: 9

NGLNewbie

Fri, Jun 29 2012


In response to: @dineybomfim

Ok !!!

I've made some tests. If you work with a small size of viewport : 281x352 px, you've got 60fps ! you're right ! It's really fast !

So, I have to downscale the size of my viewport !

Thank you !!
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Fri, Jun 29 2012


In response to: @BruelPierre

BTW, you can also use contentScale property to achieve the same resolution with less cost to the processor. Using scales < 1.0
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.