SDI Technologies iH30 Especificações Página 70

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 147
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 69
Advanced Topics
Quadro SDI Output PG-03776-001_v06 | 65
10.4.2 Multi-Sampling with Buffer Objects
An application that wishes to use multisampling with buffer objects will utilize the
capabilities enabled by the
GL_EXT_framebuffer_multisample OpenGL extension.
Unlike in the case of pbuffers, the application must perform the down sample bit and
filter operation prior to sending the buffer objects to the SDI device.
The first step is to create an additional multi-sampled buffer object during OpenGL
initialization. Frame buffer object creation is identical to that shown in Code Listing 8,
except for the specification of render buffer storage as demonstrated in Code Listing 46.
Code Listing 46: Requesting Multi-Sample Render Buffer Storage
if (num_samples > 1) {
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT,
num_samples, texFormat,
width, height);
} else {
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, texFormat,
width, height);
}
Then, in the draw loop, the Code Listing 47 performs the down sample and filter from
the multi-sample buffer object to the normal non-multi-sample buffer object prior to
presenting the final buffer object to the SDI video device.
Code Listing 47: Buffer Object Blit and Down Sample
// Bind buffer object
if (options.fsaa == 1)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, gFBO);
else
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, gFBOMultiSampled)
glEnable(GL_MULTISAMPLE);
// Draw frame content here
.
.
.
if (options.fsaa == 1){
// Unbind FBO
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
} else {
// If using multisample render buffer,
// then blit to downsample and filter
glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT,
gFBOMultiSampled);
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT,
Vista de página 69
1 2 ... 65 66 67 68 69 70 71 72 73 74 75 ... 146 147

Comentários a estes Manuais

Sem comentários