Changeset 675
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scene.cpp
r674 r675 209 209 } 210 210 211 #if defined HAVE_GL_2X 211 #if defined HAVE_GL_2X || defined HAVE_GLES_2X 212 # if !defined HAVE_GLES_2X 212 213 glBindVertexArray(data->vao); 214 # endif 213 215 glEnableVertexAttribArray(attr_pos); 214 216 glEnableVertexAttribArray(attr_tex); 215 #elif defined HAVE_GLES_2X216 glEnableVertexAttribArray(attr_pos);217 glEnableVertexAttribArray(attr_tex);218 217 #else 219 218 glEnableClientState(GL_VERTEX_ARRAY); … … 221 220 #endif 222 221 223 #if defined HAVE_GL_2X 222 #if defined HAVE_GL_2X || defined HAVE_GLES_2X 224 223 glBindBuffer(GL_ARRAY_BUFFER, data->bufs[buf]); 225 224 glBufferData(GL_ARRAY_BUFFER, 18 * (n - i) * sizeof(GLfloat), 226 225 vertex, GL_STATIC_DRAW); 227 226 glVertexAttribPointer(attr_pos, 3, GL_FLOAT, GL_FALSE, 0, 0); 228 #elif defined HAVE_GLES_2X229 glBindBuffer(GL_ARRAY_BUFFER, data->bufs[buf]);230 glVertexAttribPointer(attr_pos, 3, GL_FLOAT, GL_FALSE, 0, vertex);231 227 #elif defined HAVE_GL_1X 232 228 glBindBuffer(GL_ARRAY_BUFFER, data->bufs[buf]); … … 238 234 #endif 239 235 240 #if defined HAVE_GL_2X 236 #if defined HAVE_GL_2X || defined HAVE_GLES_2X 241 237 glBindBuffer(GL_ARRAY_BUFFER, data->bufs[buf + 1]); 242 238 glBufferData(GL_ARRAY_BUFFER, 12 * (n - i) * sizeof(GLfloat), 243 239 texture, GL_STATIC_DRAW); 244 240 glVertexAttribPointer(attr_tex, 2, GL_FLOAT, GL_FALSE, 0, 0); 245 #elif defined HAVE_GLES_2X246 glBindBuffer(GL_ARRAY_BUFFER, data->bufs[buf + 1]);247 glVertexAttribPointer(attr_tex, 2, GL_FLOAT, GL_FALSE, 0, texture);248 241 #elif defined HAVE_GL_1X 249 242 glBindBuffer(GL_ARRAY_BUFFER, data->bufs[buf + 1]); … … 262 255 glDrawArrays(GL_TRIANGLES, 0, (n - i) * 6); 263 256 264 #if defined HAVE_GL_2X 257 #if defined HAVE_GL_2X || defined HAVE_GLES_2X 258 # if !defined HAVE_GLES_2X 265 259 glBindVertexArray(0); 266 glDisableVertexAttribArray(attr_pos); 267 glDisableVertexAttribArray(attr_tex); 268 #elif defined HAVE_GLES_2X 260 # endif 269 261 glDisableVertexAttribArray(attr_pos); 270 262 glDisableVertexAttribArray(attr_tex); -
trunk/src/video.cpp
r674 r675 54 54 "uniform sampler2D in_Texture;\n" 55 55 //"in vec3 pass_Color;\n" 56 "out vec4 out_Color;\n"56 //"out vec4 out_Color;\n" 57 57 "\n" 58 58 "void main()\n"
Note: See TracChangeset
for help on using the changeset viewer.