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.

Transparent Background issue
Vote this thread:


@burakkilic

Posts: 36

NGLNewbie

Wed, Sep 4 2013


Hi;

I want an image background under my NGLView. I wrote this code to do that:


- (void) viewDidLoad
{
[super viewDidLoad];

// Setting up the multiple touch for this view.
self.view.multipleTouchEnabled = YES;

nglGlobalColorFormat(NGLColorFormatRGBA);
nglGlobalFlush();

// Setting the loading process parameters. To take advantage of the NGL Binary feature,
// remove the line "kNGLMeshOriginalYes, kNGLMeshKeyOriginal,". Your mesh will be loaded 950% faster.
NSDictionary *settings = [NSDictionary dictionaryWithObjectsAndKeys:
kNGLMeshOriginalYes, kNGLMeshKeyOriginal,
kNGLMeshCentralizeYes, kNGLMeshKeyCentralize,
@"0.3", kNGLMeshKeyNormalize,
nil];

_mesh = [[NGLMesh alloc] initWithFile:@"dav2.obj" settings:settings delegate:nil];
_mesh.x = 0.0;
_mesh.y = 0.0;
_mesh.rotationSpace = NGLRotationOrderXYZ;

_camera = [[NGLCamera alloc] initWithMeshes:_mesh, nil];
[_camera autoAdjustAspectRatio:YES animated:YES];


// Starts the debug monitor.
[[NGLDebug debugMonitor] startWithView:(NGLView *)self.view];

_nglView.backgroundColor = nil;



}


There is a problem with
nglGlobalColorFormat(NGLColorFormatRGBA);
nglGlobalFlush();

Before adding this code:



After adding this code:


Where am I wrong?
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Wed, Sep 4 2013


In response to: @burakkilic

Set the background to [UIColor clearColor];. Also, depending on your version, you should call nglGlobalColor(kNGLivec4Zero);
0% like this - 0/0

@burakkilic

Posts: 36

NGLNewbie

Wed, Sep 4 2013


In response to: @dineybomfim

Where the kNGLivec4Zero comes from?
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Wed, Sep 4 2013


In response to: @burakkilic

From NGLDataType.h
0% like this - 0/0

@burakkilic

Posts: 36

NGLNewbie

Wed, Sep 4 2013


In response to: @dineybomfim

I changed to:

nglGlobalColorFormat(NGLColorFormatRGBA);
nglGlobalColor(kNGLvec4Zero);
nglGlobalFlush();


But no changes. I am using storyboard. Can it be a problem? And where should I define these 3 lines of global functions?
0% like this - 0/0

@burakkilic

Posts: 36

NGLNewbie

Wed, Sep 4 2013


In response to: @burakkilic

I did it. I put

nglGlobalColorFormat(NGLColorFormatRGBA);
nglGlobalColor(kNGLvec4Zero);
nglGlobalFlush();

to the app delegate's

- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)options
function.

Thank you @dineybomfim
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.