antialiasing, etc.) GL.Clear (ClearBufferMask.ColorBufferBit) Įffect.ConstantColor = new Vector4 (1f, 1f, 1f, 1f) Įffect.ConstantColor = new Vector4 (1f, 0f, 1f, 1f) ĭoes all the memory associated with the line disappear when I call GL.Clear()? i.e. Is this approach for drawing lines optimal? Are there any suggested improvements (i.e. GL.DrawArrays (BeginMode.LineStrip, 0, pts.Length/2) GL.VertexAttribPointer ((int) GLKVertexAttrib.Position, 2, VertexAttribPointerType.Float, false, sizeof(float) * 2, 0) GL.EnableVertexAttribArray ((int) GLKVertexAttrib.Position) GL.BufferData (BufferTarget.ArrayBuffer, (IntPtr) (pts.Length * sizeof (float)), pts, BufferUsage.DynamicDraw) GL.BindBuffer (BufferTarget.ArrayBuffer, vertexBuffer) I finally got some functioning code to draw lines (in Xamarin/monotouch) //init callsĬontext = new EAGLContext (EAGLRenderingAPI.OpenGLES2) ĭrawableDepthFormat = GLKViewDrawableDepthFormat.Format24 Įffect.ConstantColor = new Vector4 (1f, 1f, 1f, 1f) //white
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |