Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

108 Neutral

About CommanderLake

  • Rank

Personal Information

  • Interests
  1. CommanderLake

    Draw array of points with individual colors

    I'm very much not a graphics programmer so please try to be descriptive, my aim is to display data from a USB oscilloscope in my own way, I have the oscilloscope data stream in the form of shorts and I want to draw a squiggly line with it that fades away as new data comes in. Since I can already draw dots I figured that may be sufficient and not overcomplicate it as I can get sufficient data points to form a line with dots. I just need to be able to at least specify the alpha of the dots so I can make them fade away. This is what I use to draw points in another application: GL.Clear(ClearBufferMask.ColorBufferBit); GL.Color4(1.0F, 1.0F, 1.0F, 1.0F); GL.PointSize(1.0F); GL.Enable(EnableCap.PointSmooth); GL.Enable(EnableCap.Blend); GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); GL.EnableClientState(ArrayCap.VertexArray); GL.Disable(EnableCap.DepthTest); GL.Disable(EnableCap.CullFace); GL.BindBuffer(BufferTarget.ArrayBuffer, vbo); GL.BufferData(BufferTarget.ArrayBuffer, buffersize, points1, BufferUsageHint.StaticDraw); GL.VertexPointer(2, VertexPointerType.Float, 0, 0); GL.DrawArrays(PrimitiveType.Points, 0, pcount); GL.BindBuffer(BufferTarget.ArrayBuffer, 0); GL.DisableClientState(ArrayCap.VertexArray); SwapBuffers();
  2. How do draw thousands of points each with their own individual brightness for a 2D visualisation? I use OpenTK in C#.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!