public Update ( Image image ) : void | ||
image | Image | Image to copy to the texture |
Résultat | void |
public void Update(Image image)
{
Update(image, 0, 0);
}
Texture::Update ( Image image, uint x, uint y ) : void | |
Texture::Update ( |
|
Texture::Update ( |
|
Texture::Update ( SFML window ) : void | |
Texture::Update ( SFML window, uint x, uint y ) : void | |
Texture::Update ( byte pixels ) : void | |
Texture::Update ( byte pixels, uint width, uint height, uint x, uint y ) : void |
public void Render(DoomApplication app) { if (app.State == ApplicationState.Opening) { openingSequence.Render(app.Opening); } else if (app.State == ApplicationState.Game) { RenderGame(app.Game); } if (app.Menu.Active) { menu.Render(app.Menu); } var screenData = screen.Data; var p = MemoryMarshal.Cast <byte, uint>(sfmlTextureData); for (var i = 0; i < p.Length; i++) { p[i] = colors[screenData[i]]; } sfmlTexture.Update(sfmlTextureData, (uint)screen.Height, (uint)screen.Width, 0, 0); sfmlWindow.Draw(sfmlSprite, sfmlStates); sfmlWindow.Display(); }