Giter Club home page Giter Club logo

Comments (2)

 avatar commented on August 20, 2024

I am very new to Multisample FBO .I drafted some codes and if anybody can help to make it working would be appreciated

//Create normal fbo
glGenFramebuffersEXT(1, &fbo);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, backbufTex, 0);

//Create multisample color buffer
glGenRenderbuffersEXT(1, &colorbuffer);
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, colorbuffer);
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, 8, GL_RGBA8, 480, 272);

//Create multisample depth buffer
glGenRenderbuffersEXT(1, &depthbuffer);
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, depthbuffer);
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, 8, GL_DEPTH_COMPONENT, 480, 272);

//Create multisample fbo and bind color+depth buffer altogther.
glGenFramebuffersEXT(1, &mfbo);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, mfbo);
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, colorbuffer);
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, depthbuffer);

glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, mfbo);

glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, mfbo);
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, fbo);
glBlitFramebufferEXT(0, 0, 480, 272, 0, 0, 480, 272, GL_COLOR_BUFFER_BIT, GL_NEAREST);

from ppsspp.

hrydgard avatar hrydgard commented on August 20, 2024

Hm, this issue seems to be about two things, the title says aniso filter, and the code is about multisampling :)

Aniso we already do, but multisampling is a legitimate feature request, it would be quite nice to have. It's a little complicated due to the way the PSP manages its buffers though, we need a "shadow" multisample FBO for every framebuffer and also need to "resolve" them to non-multisampled surfaces at the right times. It's not super complicated but it will be a bit of work to get right.

Could open a new issue for that.

from ppsspp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.