Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


soconne

Member Since 23 Jun 2003
Offline Last Active Sep 12 2011 01:07 PM

Posts I've Made

In Topic: Which is faster: binding another shader program or another FBO (diff res)

12 April 2010 - 02:34 PM

You can always easily benchmark this yourself by creating an extreme test example, where you have 100+ FBOs and 100+ shaders.

In Topic: what tablet PC is this?

10 November 2009 - 07:09 AM

Well I want one!

In Topic: Help! Playing video in OpenGL

26 October 2009 - 04:14 PM

I tend to use OpenCV. Here's the basic code for loading and reading frames of video.



CvCapture* video = cvCaptureFromFile("video.avi");
...
IplImage* frame = cvQueryFrame(video);
...
cvReleaseCapture(&video);



In Topic: How to perform Multi-Pass / Ping Pong filtering?

04 October 2009 - 02:10 AM



// Set up FBO
glBindFramebuffer(GL_FRAMEBUFFER, fboID);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXSTURE_2D, texID[0], 0);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT1, GL_TEXSTURE_2D, texID[1], 0);

// Rendering loop
int ping_pong = 0;
GLenum attachments[] = {GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1};

for (...) {
int read = ping_pong % 2;
int write = (ping_pong + 1) % 2;
ping_pong++;

glDrawBuffer(attachments[write]);
glBindTexture(GL_TEXTURE_2D, texID[read]);
// do rendering
}


In Topic: How to perform Multi-Pass / Ping Pong filtering?

03 October 2009 - 09:48 AM

http://www.m3xbox.com/GPU_blog/?tag=ping-pong

PARTNERS