gram

Members
  • Content count

    5
  • Joined

  • Last visited

Community Reputation

104 Neutral

About gram

  • Rank
    Newbie
  1. OpenGL Low Rez Effects

    Updated the drivers. Didn't crash, but didn't quite work, either: [img]http://i.imgur.com/yZbZm.png[/img] 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: [img]http://i.imgur.com/vi1dN.png[/img] 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: [img]http://i.imgur.com/suac6.png[/img] Thanks guys!
  2. need to find corner points of view area

    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?
  3. OpenGL Low Rez Effects

    [quote name='Suds_' timestamp='1337833746' post='4942787'] Try replacing [left][background=rgb(250, 251, 252)]GL_LINEAR with GL_NEAREST.[/background][/left] [/quote] 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." [quote name='mhagain' timestamp='1337850836' post='4942845'] 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. [/quote] It's the same machine...must be the drivers?
  4. I'm trying to achieve a low-resolution effect similar to this: [img]http://0rel.com/download/okkuplektor/img/okkuplektor_doc_stage_01a.jpg[/img] Observe the jagged edges I've done it in OpenGL, but only in Linux, and I want to do it in windows. In Linux, these two calls do the job 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); in a 512x512 window where "rez" is the edge length of a square (such as 256) that the scene is reduced to (first call) and then scaled back from (second call). This works just fine in Linux, but crashes my program in Windows. Any ideas?
  5. When I light an untextured polygon, the polygon takes on the color of the light without regard to its own color. Is there a way to prevent this from happening, e.g., lighting a green quad with a red light results in an orange quad?