Parameters
- x
- The image's x corrdinate
- y
- The image's y coordinate (from the bottom of the viewport)
- image
- The image to draw
private TextureBase texture1; private bool firstTime = false; protected override void DrawOverlay(DrawSceneParams data) { base.DrawOverlay(data); if (!firstTime) { firstTime = true; texture1 = renderContext.CreateTexture2D(Properties.Resources.Smiley, textureFilteringFunctionType.Nearest, textureFilteringFunctionType.Nearest, true, true); font.Dispose(); } DrawTexture(texture1, 100, 100, ContentAlignment.BottomLeft); // Remember to Dispose the texture when it is no more needed, or before quitting the application }
Private texture1 As TextureBase Private firstTime As Boolean = False Protected Overrides Sub DrawOverlay(data As DrawSceneParams) MyBase.DrawOverlay(data) If Not firstTime Then firstTime = True texture1 = renderContext.CreateTexture2D(Properties.Resources.Smiley, textureFilteringFunctionType.Nearest, textureFilteringFunctionType.Nearest, True, True) font.Dispose() End If DrawTexture(texture1, 100, 100, ContentAlignment.BottomLeft) ' Remember to Dispose the texture when it is no more needed, or before quitting the application End Sub