zetsin / node-sdl2

Bindings for SDL2 in Node
54 stars 14 forks source link

How do you modify surface pixel values? #4

Open skerit opened 8 years ago

skerit commented 8 years ago

How would you modify surface pixel values, without having to use the drawPoint?

zetsin commented 8 years ago

@skerit

  1. SDL_CreateTexture
    let texture = win.render.createTexture(...)
  2. SDL_UpdateTexture
    texture.update(...)

I'm not sure if it works.