i am porting Yeti3D in Emscripten .. but not render nothing in canvas????

my emscripten porting...
https://drive.google.com/file/d/0B9kSzw-XTJHNUURFUkNPTGV3MUE/edit?usp=sharing



the same code render OK on Windows with SDL


whats wrong with my SDL code .. is not compatible?  

thanks...


*there render code...*

====================================



int myticks=30;


void sdl3d_flip()
{
int currentTick;
int waitTicks;

currentTick=  myticks++;//SDL_GetTicks();

oldTick += YETI_VIEWPORT_INTERVAL;
waitTicks = (oldTick + (YETI_VIEWPORT_INTERVAL)) - currentTick;
oldTick = currentTick;

/* Only loop through the game loop and draw if enough
   time has passed since the last frame.
   The viewport_to_video function takes the frame we've drawm to
   our 15-bpp 'framebuffer' in memory, converts it to 16-bit,
   and throws it onto our actual video surface.  Look at yeti.c
   to see what is going on under the hood here. */
//if(waitTicks>0)
//{
// SDL_Delay(waitTicks);
//}

game_loop(&yeti);

    pixel_buffer_draw(yeti.viewport.back, (rgb555_t*)screen->pixels, 
screen->pitch, &pixel_converter);

//viewport_to_video( (rgb555_t*)screen->pixels, screen->pitch, 
&yeti.viewport, 0xf800, 0x07e0, 0x001f);
#ifdef GP2X
    //flush_uppermem_cache(&screen->pixels, &screen->pixels + 320*240, 0); 
    // Squidgehack
#endif

SDL_Flip(screen);

}






-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to