Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local textures = {}
- local colors = {}
- --[[-------------------------------------------------------------------------------------------------------------------------
- Window initialization
- ---------------------------------------------------------------------------------------------------------------------------]]
- function GAME:Config( window )
- window.Title = "Avalanche - Revision 002"
- window.Width = 1280
- window.Height = 720
- return window
- end
- --[[-------------------------------------------------------------------------------------------------------------------------
- Core initialization
- ---------------------------------------------------------------------------------------------------------------------------]]
- function GAME:Initialize()
- render.SetDepthEnabled( true )
- render.SetAlphaBlendingEnabled( true )
- render.SetTexturingEnabled( true )
- textures.gridsmall = Texture( "textures/gridsmall.png" )
- textures.gridbig = Texture( "textures/gridbig.png" )
- colors.whitetransparent = Color( 255, 255, 255, 20 )
- colors.whitetransparent2 = Color( 255, 255, 255, 80 )
- end
- --[[-------------------------------------------------------------------------------------------------------------------------
- Logic core
- ---------------------------------------------------------------------------------------------------------------------------]]
- function GAME:Update()
- end
- --[[-------------------------------------------------------------------------------------------------------------------------
- Render core
- ---------------------------------------------------------------------------------------------------------------------------]]
- function GAME:Draw()
- render.Clear( Color( 29, 30, 78 ) )
- render.ClearZ()
- render.Start3D( Vector( 3, 3, 3 ), Vector( 1, 1, 0 ), 45, 0.1, 50 )
- render.SetTexture( textures.gridsmall )
- render.DrawQuad(
- Vertex( Vector( -100, -100, 0 ), colors.whitetransparent, 0, 0 ),
- Vertex( Vector( 100, -100, 0 ), colors.whitetransparent, 1000, 0 ),
- Vertex( Vector( 100, 100, 0 ), colors.whitetransparent, 1000, 1000 ),
- Vertex( Vector( -100, 100, 0 ), colors.whitetransparent, 0, 1000 )
- )
- render.ClearZ()
- render.SetTexture( textures.gridbig )
- render.DrawQuad(
- Vertex( Vector( -100, -100, 0 ), colors.whitetransparent2, 0, 0 ),
- Vertex( Vector( 100, -100, 0 ), colors.whitetransparent2, 250, 0 ),
- Vertex( Vector( 100, 100, 0 ), colors.whitetransparent2, 250, 250 ),
- Vertex( Vector( -100, 100, 0 ), colors.whitetransparent2, 0, 250 )
- )
- render.End3D()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement