Jump to content

  • Log In with Google      Sign In   
  • Create Account


gram

Member Since 07 Jan 2012
Offline Last Active May 25 2012 12:33 AM

Posts I've Made

In Topic: Low Rez Effects

24 May 2012 - 09:23 PM

Updated the drivers. Didn't crash, but didn't quite work, either:

Posted Image

Since the read and write buffer are the same, there must be some implementation-specific issues.


To get it to work, I changed

glViewport( 0, 0, 512, 512);

which was only called once, during initialization,

to

glViewport( 0, 0, rez, rez);


and

glBlitFramebuffer(0, 0, 512, 512, 256-rez/2, 256-rez/2, 256+rez/2, 256+rez/2, GL_COLOR_BUFFER_BIT, GL_LINEAR);
glBlitFramebuffer(256-rez/2, 256-rez/2, 256+rez/2, 256+rez/2, 0, 0, 512, 512, GL_COLOR_BUFFER_BIT, GL_LINEAR);

which was called every frame, after drawing, to

glBlitFramebufferEXT(0, 0, 256, 256, 0, 0, 512, 512, GL_COLOR_BUFFER_BIT, GL_LINEAR);

resulting in the desired effect:

Posted Image


But of course we can't stop there. Turning GL_LINEAR to GL_NEAREST, and lowering rez, brings us from the mid-nineties to the mid-eighties:

Posted Image

Thanks guys!

In Topic: need to find corner points of view area

24 May 2012 - 06:58 PM

You are indeed on the right track.

What you need to do is use the heading, and roll to determine the plane's axes. I'm confused about the pitch variable, though. If you know your line of sight, only roll (rotation about the line of sight) is needed to determine your orientation. What is pitch for?

In Topic: Low Rez Effects

24 May 2012 - 06:42 PM

Try replacing

GL_LINEAR with GL_NEAREST.



That changes how nice it looks but shouldn't affect things since it is only a color buffer blit. From the OGL 3.3 docs:

"If the sizes of the source and destination rectangles are not equal, filter specifies the interpolation method that
will be applied to resize the source image , and must be GL_NEAREST or GL_LINEAR.
GL_LINEAR is only a valid interpolation method for the color buffer. If filter is not
GL_NEAREST and mask includes GL_DEPTH_BUFFER_BIT or
GL_STENCIL_BUFFER_BIT, no data is transferred and a GL_INVALID_OPERATION error is generated."

First of all, the OS is completely irrelevant here. The deciding factor is your graphics hardware and what it does or doesn't support.

So, my guess here is that your Linux machine has a 3D card that supports GL_ARB_frame_buffer_object or a reasonably recent version of OpenGL (with framebuffer objects in core). Your Windows box does not - the cause of the crash is that the function pointer for glBlitFramebuffer is NULL. Upgrading the graphics card on your Windows box to one that does support this functionality will resolve it.


It's the same machine...must be the drivers?

PARTNERS