OS X 10.8.x IPv6 Kernel panic?

by gbuzogany on 26/09/2013

Probably they will solve it on Mavericks. Meanwhile:

networksetup -setv6off “Thunderbolt Ethernet”

:)

No Comments

pugixml can’t handle large XML files

by gbuzogany on 25/08/2013

Yep… I spent hours trying to load a 20GB xml file using pugixml, but it doesn’t work.
Just posting it here so maybe I will save a few hours of someone’s life :)

No Comments

I <3 WebGL

by gbuzogany on 12/04/2013

All applications are like open-source OpenGL scenes. You can learn so much of computer graphics so easily now…

No Comments

Satellite tracking!

by gbuzogany on 7/01/2013

Hi again! Well, I (almost) finished another project, you can see it here: http://satelitoj.appspot.com/
It is a satellite tracking application! It displays many satellites at its current positions, in a beautiful 3D globe :)

No Comments

Resetting Macbook SMC

by gbuzogany on 26/10/2012

You can reset your SMC by turning your mac off, then holding Ctrl+Alt+Shift+Power for 1~2 seconds, and then turning it on again.

No Comments

More Interface Design

by gbuzogany on 5/05/2012

Iron Man 2 visual effects development:

http://motionographer.com/features/prologue-iron-man-2/

No Comments

Awesome design work

by gbuzogany on 5/05/2012

Just what the title says.

http://www.johnkoltai.com/

No Comments

Oracle Instant Client (OCI8) for Mac OS X Lion Bugged

by gbuzogany on 3/11/2011

The x86_64 Oracle Instant Client for Lion is bugged and not working properly. There is a workaround for ruby, and maybe python, but not php.

Edit: It was originally posted in 2011-11-03. I don’t know how it is now.

1 Comment

App Store statistics

by gbuzogany on 27/10/2011

Another awesome study about chances of your app getting in the top 100/500 by category. All app developers should read this.

http://www.somegeekintn.com/blog/2011/10/lies-damned-lies-and-statistics/

No Comments

Android update problems

by gbuzogany on 27/10/2011

An awesome study about Android/iOS updates over time, by smartphone, made by Michael DeGusta:

http://theunderstatement.com/post/11982112928/android-orphans-visualizing-a-sad-history-of-support

No Comments

Hacking the iPhone

by gbuzogany on 27/10/2011

I just found the most complete and well explained (IMHO) iPhone hacking article.

“Hacking_the_iPhone” presentation

No Comments

Smartphone screen sizes

by gbuzogany on 10/10/2011

You should see that:

http://dcurt.is/2011/10/03/3-point-5-inches/

No Comments

The best iPhone 4S and Apple keynote analysis I saw

by gbuzogany on 10/10/2011

This guy knows what he is talking about:

http://daringfireball.net/2011/10/thoughts_and_observations_iphone_4s

No Comments

[Objective C] Aren’t your UIButton events working?

by gbuzogany on 4/10/2011

I was handling “taps” with a gesture recognizer, and it was killing my buttons in that view (they weren’t responding to UIControlEventTouchUpInside). So, the solution:

gestureRecognizer.cancelsTouchesInView = NO;

Saved my life :)

Just sharing.

No Comments

And I am at the career’s guide!

by gbuzogany on 1/10/2011

@”Folha de São Paulo”:

332271_2458927715765_541527972_o

No Comments

Indie Game Development

by gbuzogany on 30/09/2011

I’m working in a game for iOS (iPhone/iPad/iPod), and having a hard time to find someone to illustrate it for me.

It will be a 2D isometric, tycoon-based game. I’m using OpenGL ES 2.0, and it’s much more difficult to use than 1.1 ;/

As soon I have more details, I will post it here :)

No Comments

[Video] Atmospheric Scattering Effects

by gbuzogany on 3/08/2011

It’s a video of my computer graphics project. I did it with a lot of help of some friends: Fabio de Albuquerque Dela Antonio and Leticia Rostirola Santos Silva.
We used an iPod to control the camera using it’s gyroscope.
With sure, the most beautiful thing I did in my life :)

Soon I will post the project with sources :)

Bye!

No Comments

OpenGL Post-Processing Effects Tutorial

by gbuzogany on 3/06/2011

It was hard to find out how it works, so I thought it would be great to share that!

I assume that you already know what shaders (vertex and fragment) are and that you are a little experienced with OpenGL.

Basically, what you do is:

-> Render the scene to a texture
-> Create a quad, map that texture in that quad, and place the quad fullscreen (just filling the window, not literally).
-> Enable your desired shader
-> Render it! But now, your shaders can get any information of that texture!
-> If you want to use more than one post-processing effect, just repeat the process!

I will assume that you know how to use google’s amazing search engine, and will have no doubts about what function does what.

Now, some snippets:

 

// Used variables and types
GLuint fbo; // frame buffer object
GLuint depthbuffer; // depth buffer object
GLuint img; // FBO "texture"
GLuint rbo; // render buffer object

-> How to create a framebuffer to render the scene?

    glGenFramebuffersEXT(1, &fbo);
    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);
    glGenRenderbuffersEXT(1, &rbo);
    glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, rbo);
    glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, WIDTH, HEIGHT); // one nice place to put multisampling!
    glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0);

    glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, img, 0);

    glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, rbo);

    GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
    if(status == GL_FRAMEBUFFER_COMPLETE_EXT)
    {
        printf("FBO Setup complete!\n");
    }
    else
    {
        printf("FBO Error!\n");
    }

    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);

-> How to setup the framebuffer to be used as a texture?

    glGenTextures(1, &img);
    glBindTexture(GL_TEXTURE_2D, img);
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
    glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, WIDTH, HEIGHT, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); // place multisampling here too!
    glBindTexture(GL_TEXTURE_2D, 0);

-> How to render to the framebuffer created previously?

    glViewport(0, 0, WIDTH*msaa, HEIGHT*msaa);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluPerspective(60.0f, (float)(WIDTH)/(HEIGHT), 0.01f, 10000.0f);
    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();

    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);

// render here!!!!

-> Ok, I rendered it, now I want to do some post-processing magic!

-> Switch to 2D rendering mode. It will setup the screen to the post-processing magic.

    glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	glOrtho(0, WIDTH , HEIGHT , 0, -1, 1);
	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();

It’s now that the magic happens, the steps are:

-> Enable the post-processing shader that you want:

// you should now how to do that, if not, i will publish one tutorial soon, but there is a lot of it on the internet (as everything else)
glUseProgram(program);

-> Render one fullscreen-quad using the framebuffer’s texture:

    glBindTexture(GL_TEXTURE_2D, img);
    glBegin(GL_QUADS);
        glTexCoord2f(0,1);   glVertex2f(0,0);
        glTexCoord2f(0,0);   glVertex2f(0,HEIGHT);
        glTexCoord2f(1,0);   glVertex2f(WIDTH,HEIGHT);
        glTexCoord2f(1,1);   glVertex2f(WIDTH,0);
    glEnd();

-> To use more than one post-processing effect, just render the output of the two last steps to the framebuffer again, and again, and again. On the last time, unbind the framebuffer, and render to the screen.

To unbind the framebuffer to render to the screen:

    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); // unbind
    glBindTexture(GL_TEXTURE_2D, img);
    glGenerateMipmapEXT(GL_TEXTURE_2D);
    glBindTexture(GL_TEXTURE_2D, 0);
    glViewport(0, 0, WIDTH, HEIGHT);

Done!

This snippets should help someone :)

9 Comments

Hello World!

by gbuzogany on 9/05/2011

Soon: code snippets, software/hardware discussion and random ideas!

No Comments