Ignore:
Timestamp:
Aug 16, 2012, 10:42:47 AM (8 years ago)
Author:
sam
Message:

gpu: on the PS3, use the OES version of the framebuffer GL calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gpu/framebuffer.cpp

    r1733 r1761  
    7474    GLenum filtering = GL_NEAREST;
    7575
     76#   if GL_VERSION_1_1 || GL_ES_VERSION_2_0
    7677    glGenFramebuffers(1, &m_data->m_fbo);
    7778    glBindFramebuffer(GL_FRAMEBUFFER, m_data->m_fbo);
     79#   else
     80    glGenFramebuffersOES(1, &m_data->m_fbo);
     81    glBindFramebufferOES(GL_FRAMEBUFFER_OES, m_data->m_fbo);
     82#   endif
    7883
    7984    glGenTextures(1, &m_data->m_texture);
     
    8792                 format, GL_UNSIGNED_BYTE, NULL);
    8893
     94#   if GL_VERSION_1_1 || GL_ES_VERSION_2_0
    8995    glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
    9096                           GL_TEXTURE_2D, m_data->m_texture, 0);
     97#   else
     98    glFramebufferTexture2DOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_EXT,
     99                              GL_TEXTURE_2D, m_data->m_texture, 0);
     100#   endif
     101
    91102    m_data->m_depth = GL_INVALID_ENUM;
    92103#   if GL_VERSION_1_1
     
    102113    }
    103114#   endif
     115
     116#   if GL_VERSION_1_1 || GL_ES_VERSION_2_0
    104117    glCheckFramebufferStatus(GL_FRAMEBUFFER);
     118#   endif
    105119
    106120    Unbind();
     
    112126#if defined USE_D3D9 || defined _XBOX
    113127#else
     128#   if GL_VERSION_1_1 || GL_ES_VERSION_2_0
    114129    glDeleteFramebuffers(1, &m_data->m_fbo);
     130#   else
     131    glDeleteFramebuffersOES(1, &m_data->m_fbo);
     132#   endif
    115133    glDeleteTextures(1, &m_data->m_texture);
    116134#   if GL_VERSION_1_1
     
    135153#if defined USE_D3D9 || defined _XBOX
    136154#else
     155#   if GL_VERSION_1_1 || GL_ES_VERSION_2_0
    137156    glBindFramebuffer(GL_FRAMEBUFFER, m_data->m_fbo);
     157#   else
     158    glBindFramebufferOES(GL_FRAMEBUFFER_OES, m_data->m_fbo);
     159#   endif
    138160#endif
    139161}
     
    143165#if defined USE_D3D9 || defined _XBOX
    144166#else
     167#   if GL_VERSION_1_1 || GL_ES_VERSION_2_0
    145168    glBindFramebuffer(GL_FRAMEBUFFER, NULL);
     169#   else
     170    glBindFramebufferOES(GL_FRAMEBUFFER_OES, NULL);
     171#   endif
    146172#endif
    147173}
Note: See TracChangeset for help on using the changeset viewer.