Question. How to set pixel colors directly to OpenGL Viewport (glDrawPixels)

AlexanderMAlexanderM Posts: 132 ✭✭
edited March 7 in KL Programming

I'm trying to work with OpenGL directly, but any set functions not produced any results, I think InlineDrawing overrides all. Is there any way to use for example glDrawPixels without changing InlineDrawing library? For the first time I'm trying to set constant color to the viewport, the next task is mixing viewport with image data.

if(inEnable)
{
  SInt32 wh[];
  wh.resize(4);

  glGetIntegerv (0x0BA2, wh);
  outWidth = wh[2];
  outHeight = wh[3];

  Float32 rgb[];
  Integer nbPix = outWidth * outHeight;
  rgb.resize(nbPix * 3);
  outColor.resize(nbPix);
  for(Integer i = 0; i < nbPix; i++)
  {
    outColor[i].r = 0.0;
    outColor[i].g = 1.0;
    outColor[i].b = 0.0;
  }
  glDrawPixels (outWidth, outHeight, GL_RGB, 0x1406, rgb.data());
}

Let's say NO to Autodesk®Fabric®

Comments

Sign In or Register to comment.