Exemplo n.º 1
0
 private void glControl1_Load(object sender, EventArgs e)
 {
     OpenTKSharedResources.InitializeSharedResources();
     if (OpenTKSharedResources.SetupStatus == OpenTKSharedResources.SharedResourceStatus.Initialized)
     {
         if (sourceNud != null)
         {
             NudUvRendering.InitializeUVBufferData(sourceNud);
         }
     }
 }
Exemplo n.º 2
0
        private void glControl1_Paint(object sender, PaintEventArgs e)
        {
            if (OpenTKSharedResources.SetupStatus != OpenTKSharedResources.SharedResourceStatus.Initialized)
            {
                return;
            }

            glControl1.MakeCurrent();
            GL.Viewport(glControl1.ClientRectangle);
            // Draw darker to make the UVs visible.
            ScreenDrawing.DrawTexturedQuad(RenderTools.uvTestPattern.Id, 0.5f);
            NudUvRendering.DrawUv(polygonToRender, glControl1.Width, glControl1.Height);
            glControl1.SwapBuffers();
        }