Skip to content

1. Initializing the renderer

theproadam edited this page Apr 2, 2020 · 1 revision

To initialize renderXF, you simple need three things:

  1. Your render width
  2. Your render height
  3. The handle to a form that will display the rendered image
//Initialize renderXF
renderX GL = new renderX(width, height, this.Handle);

It is also possible to create a renderXF instance without a handle to a form. This can be useful if you are trying to render an object, and then paste the render onto the drawing buffer of an existing renderXF instance.

//Initialize two instances of renderXF
renderX MiniGL = new renderX(width, height);
renderX GL = new renderX(width, height, this.Handle);

//Blit the drawing buffer onto another drawing buffer
MiniGL.BlitInto(GL, positionX, positionY, TransparencyKey);
Please note that renderXF considers (0, 0) to be at the bottom left corner of the viewport.