sharpgl icon indicating copy to clipboard operation
sharpgl copied to clipboard

TexSubImage2D for pointer/IntPtr?

Open tqk2811 opened this issue 4 years ago • 0 comments

gl.TexSubImage2D(GL_TEXTURE_2D, 0, 0, 0,
          i == 0 ? temp_frame->width : temp_frame->width / 2,
          i == 0 ? temp_frame->height : temp_frame->height / 2,
          GL_RED, GL_UNSIGNED_BYTE, 
          (IntPtr)(temp_frame->data[i]));// only allow int[]

Hi, i'm new on OpenGl. Is there way to use TexSubImage2D without using managed array? Thanks!
Note: temp_frame is AVFrame* from ffmpeg

tqk2811 avatar Aug 22 '21 09:08 tqk2811