Add GL_UNSIGNED_INT
This commit is contained in:
		
							parent
							
								
									46c18d97d2
								
							
						
					
					
						commit
						fe71028573
					
				| @ -18,6 +18,7 @@ namespace Quik.OpenGL | ||||
| 
 | ||||
|         GL_UNSIGNED_BYTE = 0x1401, | ||||
|         GL_UNSIGNED_SHORT = 0x1403, | ||||
|         GL_UNSIGNED_INT = 0x1405, | ||||
|         GL_FLOAT = 0x1406, | ||||
| 
 | ||||
|         GL_RED = 0x1903, | ||||
|  | ||||
| @ -1,16 +1,16 @@ | ||||
| using System; | ||||
| using System.Collections; | ||||
| using System.Collections.Generic; | ||||
| using System.Runtime.CompilerServices; | ||||
| 
 | ||||
| namespace Quik.VertexGenerator | ||||
| { | ||||
|     public class DrawQueue | ||||
|     public class DrawQueue : IEnumerable<DrawCall> | ||||
|     { | ||||
|         private readonly RefList<QuikVertex> _vertices = new RefList<QuikVertex>(); | ||||
|         private readonly RefList<int> _elements = new RefList<int>(); | ||||
|         private readonly List<DrawCall> _drawCalls = new List<DrawCall>(); | ||||
|         private int _start; | ||||
|         private int _count; | ||||
|         private int _baseOffset; | ||||
|         private QuikRectangle _bounds; | ||||
|         private QuikTexture _texture; | ||||
| @ -35,7 +35,6 @@ namespace Quik.VertexGenerator | ||||
|         public void StartDrawCall(in QuikRectangle bounds, QuikTexture texture, int baseOffset) | ||||
|         { | ||||
|             _start = ElementCount; | ||||
|             _count = 0; | ||||
|             _texture = texture; | ||||
|             _bounds = bounds; | ||||
|             _baseOffset = baseOffset; | ||||
| @ -87,8 +86,12 @@ namespace Quik.VertexGenerator | ||||
|         [MethodImpl(MethodImplOptions.AggressiveInlining)] | ||||
|         public void EndDrawCall() | ||||
|         { | ||||
|             _drawCalls.Add(new DrawCall(_start, _count, _bounds, _texture)); | ||||
|             int count = ElementCount - _start; | ||||
|             _drawCalls.Add(new DrawCall(_start, count, _bounds, _texture)); | ||||
|         } | ||||
| 
 | ||||
|         public IEnumerator<DrawCall> GetEnumerator() => _drawCalls.GetEnumerator(); | ||||
|         IEnumerator IEnumerable.GetEnumerator() => _drawCalls.GetEnumerator(); | ||||
|     } | ||||
| 
 | ||||
|     public struct DrawCall | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user