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.

Rendering textures with alpha values while also using Vuforia AR library
Vote this thread:


@jessearmand

Posts: 9

NGLNewbie

Tue, Jul 31 2012


This is what I did inside drawView,



- (void)drawView
{
if (ARData.appStatus == APPSTATUS_CAMERA_RUNNING)
{
// Hide all visible meshes
[self hideAllMeshes];

// Render video background and retrieve tracking state
QCAR::State state = QCAR::Renderer::getInstance().begin();
QCAR::Renderer::getInstance().drawVideoBackground();

// Process the trackables
...

QCAR::Renderer::getInstance().end();

// Enable alpha blending before drawing the camera
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

glEnable(GL_DEPTH_TEST);

[_camera drawCamera];

// Disable alpha blending before next render
glDisable(GL_BLEND);
}
}



That should be good enough to render textures with alpha values right?
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Wed, Aug 1 2012


In response to: @jessearmand

Hello buddy,

Actually this will not work.

Remember that you don't need to make any explicit call to OpenGL using NinevehGL.

So, what enables or disables the alpha channel in NinevehGL is the global color format. You can try any OpenGL command, but without the NinevehGL global RGBA color format it'll not get work.

The problem is that with Vuforia the RGBA doesn't work, because their internal color format is RGB it enters in conflict whith the NinevehGL color format.
0% like this - 0/0

@dehydr8

Posts: 2

NGLNewbie

Tue, Jan 29 2013


In response to: @dineybomfim

Are there any workarounds to display textures with alpha channel enabled with Vuforia?

I've tried glEnable(GL_BLEND) technique but it doesn't seem to work as you pointed out.

When using nglGlobalColorFormat(NGLColorFormatRGBA), the drawVideoBackground() doesn't seem to render the camera image.

I have updated to Vuforia 2.0, they now seem to support the RGBA8888 by QCAR::setFrameFormat(QCAR::RGBA8888, true). But I couldn't get the video background to render.
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Tue, Jan 29 2013


In response to: @dehydr8

We'll release a new sample AR project using Vuforia 2.0 within the next release.
0% like this - 0/0

@dehydr8

Posts: 2

NGLNewbie

Tue, Jan 29 2013


In response to: @dineybomfim

It would be great if it supports nglGlobalColorFormat(NGLColorFormatRGBA). Looking forward to it.
0% like this - 0/0

@MAD_OmkAR

Posts: 1

NGLNewbie

Tue, Sep 3 2013


In response to: @dehydr8

Hi I also encountered same problem after setting calling nglGlobalColorFormat(NGLColorFormatRGBA).
And the work around is following

Call glEnable() after Qualcomms drawVideoBackground

And then Disable blending just before NGL's drawCamera and Qualcomms QCAR::Renderer::getInstance().end();
call

For me it works
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.