Created
          January 21, 2020 18:53 
        
      - 
      
- 
        Save rdeioris/e3f3807f351c42d37bb3fe2198f61302 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using Aiv.Fast2D; | |
| using OpenTK; | |
| namespace Fast2DApp | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| Window window = new Window(1024, 576, "First Game"); | |
| //window.SetVSync(true); | |
| Texture logoAiv = new Texture("Assets/LogoAIV.png"); | |
| Mesh triangle = new Mesh(); | |
| triangle.v = new float[] | |
| { | |
| 0, 0, | |
| 0, 100, | |
| 100, 0, | |
| 100, 0, | |
| 0, 100, | |
| 100, 100, | |
| }; | |
| triangle.uv = new float[] | |
| { | |
| 0, 0, | |
| 0, 1, | |
| 1, 0, | |
| 1, 0, | |
| 0, 1, | |
| 1, 1 | |
| }; | |
| /*triangle.vc = new float[] | |
| { | |
| 1, 0, 0, 1, | |
| 0, 1, 0, 1, | |
| 0, 0, 1, 1, | |
| 1, 0, 0, 1, | |
| 0, 1, 0, 1, | |
| 0, 0, 1, 1 | |
| };*/ | |
| triangle.Update(); | |
| triangle.scale = new Vector2(4, 3.5f); | |
| while (window.IsOpened) | |
| { | |
| //triangle.position += new Vector2(10, 0) * window.deltaTime; | |
| triangle.position = window.mousePosition; | |
| //triangle.EulerRotation += 30 * window.deltaTime; | |
| //triangle.DrawColor(0, 255, 0, 255); | |
| //triangle.DrawWireframe(0, 255, 0, 255); | |
| //triangle.DrawColor(255, 0, 255, 255); | |
| triangle.DrawTexture(logoAiv); | |
| window.Update(); | |
| } | |
| } | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment