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]

[ul] [*]item [/ul]
[ol] [*]item [/ol]



Embed (videos, code, 3D):

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

Your current vote:

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

Rendering Offscreen
Vote this thread:


Posts: 27


Tue, Nov 26 2013

I need some help understanding a few of the methods in the NGLView of this library.

What I'm trying to do:
Get the color of a pixel touched, using pixelColorAtPoint, which works perfectly. Render a copy of what is currently onscreen offscreen. Change the material of the meshes offscreen without releasing the main thread. Use pixelColorAtPoint on the same spot but now in the offscreen material changed mesh.

I think the solution is to use NinevehGL methods for the offscreen rendering. I can't find any documentation on how to use initWithOffscreenFrame or drawOffscreen within the NGLView header file. The offscreenRender and offscreenRenderFree methods looked like they would suite my purposes in the NGLCoreEngine file, but I can't seem to find a way to access them.

Am I on the right track with these methods? If so can you show me example code for how to use these? If not, would moving to raw openGL offscreen rendering be a better path? Is there example code for how to use that in conjunction with the NGL library?

Thanks in advance!
0% like this - 0/0


Posts: 571


Tue, Nov 26 2013

In response to: @sashah_t

Hello buddy,

Well, you're almost on the right track. Just missing the words.
The words you choose will probably define all the path you go down. That means, for you that know the concept of on-screen and off-screen, searching for "offscreen" word maybe seems the obvious path.

But, for many other users, specially the users that don't know OpenGL, the right sentence sounds more like:"OK, I have draw, drawView, drawCamera... how can I draw to an image? or to a texture?", so... the searching path for this user will end in something like this:


As you can see, in the description are mentions to the technically right term "off-screen", but the most human readable name is drawTo...

Hope this helps.
0% like this - 0/0


Posts: 27


Wed, Nov 27 2013

In response to: @dineybomfim

Thank you for the advice. In looking into drawToData our experimentation shows that this draws the data of the last render. Is there any way to get data from what will be in the next render instead?

0% like this - 0/0

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.