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.

  SInt32 wh[];

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

  Float32 rgb[];
  Integer nbPix = outWidth * outHeight;
  rgb.resize(nbPix * 3);
  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,;

Let's say NO to Autodesk®Fabric®


Sign In or Register to comment.