comparison render_sdl.c @ 622:b76d2a628ab9

Partially working switch to having a vcounter and hslot counter in the context rather than trying to derive them from the cycle count. This should allow for more accurate handling of mid screen mode switches. Interrupt timing is broken currently though
author Michael Pavone <pavone@retrodev.com>
date Tue, 17 Jun 2014 19:01:01 -0700
parents b7b7a1cab44a
children 38006d43f5a3
comparison
equal deleted inserted replaced
621:5196333b37a6 622:b76d2a628ab9
362 362
363 glActiveTexture(GL_TEXTURE1); 363 glActiveTexture(GL_TEXTURE1);
364 glBindTexture(GL_TEXTURE_2D, (context->regs[REG_MODE_4] & BIT_INTERLACE) ? textures[1] : textures[2]); 364 glBindTexture(GL_TEXTURE_2D, (context->regs[REG_MODE_4] & BIT_INTERLACE) ? textures[1] : textures[2]);
365 glUniform1i(un_textures[1], 1); 365 glUniform1i(un_textures[1], 1);
366 366
367 glUniform1f(un_width, context->latched_mode & BIT_H40 ? 320.0f : 256.0f); 367 glUniform1f(un_width, context->regs[REG_MODE_4] & BIT_H40 ? 320.0f : 256.0f);
368 368
369 glBindBuffer(GL_ARRAY_BUFFER, buffers[0]); 369 glBindBuffer(GL_ARRAY_BUFFER, buffers[0]);
370 glVertexAttribPointer(at_pos, 2, GL_FLOAT, GL_FALSE, sizeof(GLfloat[2]), (void *)0); 370 glVertexAttribPointer(at_pos, 2, GL_FLOAT, GL_FALSE, sizeof(GLfloat[2]), (void *)0);
371 glEnableVertexAttribArray(at_pos); 371 glEnableVertexAttribArray(at_pos);
372 372