Changeset 1761
- Timestamp:
- Aug 16, 2012, 10:42:47 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gpu/framebuffer.cpp
r1733 r1761 74 74 GLenum filtering = GL_NEAREST; 75 75 76 # if GL_VERSION_1_1 || GL_ES_VERSION_2_0 76 77 glGenFramebuffers(1, &m_data->m_fbo); 77 78 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 78 83 79 84 glGenTextures(1, &m_data->m_texture); … … 87 92 format, GL_UNSIGNED_BYTE, NULL); 88 93 94 # if GL_VERSION_1_1 || GL_ES_VERSION_2_0 89 95 glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, 90 96 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 91 102 m_data->m_depth = GL_INVALID_ENUM; 92 103 # if GL_VERSION_1_1 … … 102 113 } 103 114 # endif 115 116 # if GL_VERSION_1_1 || GL_ES_VERSION_2_0 104 117 glCheckFramebufferStatus(GL_FRAMEBUFFER); 118 # endif 105 119 106 120 Unbind(); … … 112 126 #if defined USE_D3D9 || defined _XBOX 113 127 #else 128 # if GL_VERSION_1_1 || GL_ES_VERSION_2_0 114 129 glDeleteFramebuffers(1, &m_data->m_fbo); 130 # else 131 glDeleteFramebuffersOES(1, &m_data->m_fbo); 132 # endif 115 133 glDeleteTextures(1, &m_data->m_texture); 116 134 # if GL_VERSION_1_1 … … 135 153 #if defined USE_D3D9 || defined _XBOX 136 154 #else 155 # if GL_VERSION_1_1 || GL_ES_VERSION_2_0 137 156 glBindFramebuffer(GL_FRAMEBUFFER, m_data->m_fbo); 157 # else 158 glBindFramebufferOES(GL_FRAMEBUFFER_OES, m_data->m_fbo); 159 # endif 138 160 #endif 139 161 } … … 143 165 #if defined USE_D3D9 || defined _XBOX 144 166 #else 167 # if GL_VERSION_1_1 || GL_ES_VERSION_2_0 145 168 glBindFramebuffer(GL_FRAMEBUFFER, NULL); 169 # else 170 glBindFramebufferOES(GL_FRAMEBUFFER_OES, NULL); 171 # endif 146 172 #endif 147 173 }
Note: See TracChangeset
for help on using the changeset viewer.