Skip to content

Understanding the render function #7

@sDos280

Description

@sDos280

So lately have been trying to understand how the render function works. It seem that the render function used as a game loop, but I still seem to not understand one thing.

The it seems that the render returns uint32_t * which is basically a place in memory for the surface screen. Nevertheless it seems a bit weird to return the same place in memory again and again. It may make more sense to just add a function that will be called once and will send the position ones(in the initialization step in JavaScript)...
If we will be able to do that we may be able to "compress" the render and init to one function that will basically just be a main function and just use a while loop (like using emscripten_set_main_loop) to achieve the same result.

Do you think that is possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions