Changeset 1517


Ignore:
Timestamp:
Jun 24, 2012, 11:25:55 AM (8 years ago)
Author:
sam
Message:

gpu: disable framebuffer objects on GL ES for now, and disable integer
attributes if GL version isn't 3.0 at least.

Location:
trunk/src/gpu
Files:
2 edited

Legend:

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

    r1488 r1517  
    6161    m_data->m_size = size;
    6262#if defined USE_D3D9 || defined _XBOX
    63 #elif !defined __CELLOS_LV2__ && !defined __ANDROID__
     63    /* FIXME: not implemented on Direct3D */
     64#elif GL_VERSION_1_1
    6465    GLenum format = GL_RGBA8;
    6566    GLenum depth = GL_DEPTH_COMPONENT;
     
    9495
    9596    Unbind();
     97#else
     98    /* FIXME: not implemented on GL ES, see
     99     * http://stackoverflow.com/q/4041682/111461 */
    96100#endif
    97101}
     
    100104{
    101105#if defined USE_D3D9 || defined _XBOX
    102 #elif !defined __CELLOS_LV2__ && !defined __ANDROID__
     106#elif GL_VERSION_1_1
    103107    glDeleteFramebuffers(1, &m_data->m_fbo);
    104108    glDeleteTextures(1, &m_data->m_texture);
    105109    if (m_data->m_depth != GL_INVALID_INDEX)
    106110        glDeleteRenderbuffers(1, &m_data->m_depth);
     111#else
    107112#endif
    108113    delete m_data;
     
    112117{
    113118#if defined USE_D3D9 || defined _XBOX
    114 #elif !defined __CELLOS_LV2__ && !defined __ANDROID__
     119    return 0;
     120#elif GL_VERSION_1_1
    115121    return m_data->m_texture;
     122#else
     123    return 0;
    116124#endif
    117125}
     
    120128{
    121129#if defined USE_D3D9 || defined _XBOX
    122 #elif !defined __CELLOS_LV2__ && !defined __ANDROID__
     130#elif GL_VERSION_1_1
    123131    glBindFramebuffer(GL_FRAMEBUFFER, m_data->m_fbo);
     132#else
    124133#endif
    125134}
     
    128137{
    129138#if defined USE_D3D9 || defined _XBOX
    130 #elif !defined __CELLOS_LV2__ && !defined __ANDROID__
     139#elif GL_VERSION_1_1
    131140    glBindFramebuffer(GL_FRAMEBUFFER, NULL);
     141#else
    132142#endif
    133143}
  • trunk/src/gpu/vertexbuffer.cpp

    r1512 r1517  
    386386                                  stride, (GLvoid const *)(uintptr_t)offset);
    387387        }
     388#       if defined GL_VERSION_3_0
    388389        else
    389390        {
     
    392393                                   stride, (GLvoid const *)(uintptr_t)offset);
    393394        }
     395#       endif
    394396#   else
    395397        switch (usage)
Note: See TracChangeset for help on using the changeset viewer.