private void RenderFrame(object sender, EventArgs e) { GL.Clear(ClearBufferMask.ColorBufferBit); // Draw a test pattern image to the screen. if (textureToRender != null) { graphicsResources.screenTriangle.DrawScreenTexture(textureToRender, graphicsResources.screenTextureShader, graphicsResources.samplerObject); } if (modelToRender != null) { ModelRendering.DrawModel(modelToRender, glViewport.Width, glViewport.Height, graphicsResources, renderModeIndex); } SFGraphics.GLObjects.GLObjectManagement.GLObjectManager.DeleteUnusedGLObjects(); }
/// <summary> /// Controls how the model is shown when the API is first rendered. /// (The user can always switch the rendering for a given model by clicking the 'Model' and 'Example Value' links.) /// </summary> /// <param name="options"></param> /// <param name="modelRendering"></param> public static void DefaultModelRendering(this SwaggerUIOptions options, ModelRendering modelRendering) { options.ConfigObject.DefaultModelRendering = modelRendering; }
/// <summary> /// Controls how the model is shown when the API is first rendered. /// (The user can always switch the rendering for a given model by clicking the 'Model' and 'Example Value' links.) /// </summary> /// <param name="options"></param> /// <param name="modelRendering"></param> public static void DefaultModelRendering(this SwaggerUIOptions options, ModelRendering modelRendering) { options.ConfigObject["defaultModelRendering"] = modelRendering.ToString().ToLower(); }
/// <summary> /// Controls how the model is shown when the API is first rendered. /// (The user can always switch the rendering for a given model by clicking the 'Model' and 'Example Value' links.) /// </summary> /// <param name="options"></param> /// <param name="modelRendering"></param> public static void DefaultModelRendering(this RapiDocOptions options, ModelRendering modelRendering) { options.ConfigObject.DefaultModelRendering = modelRendering; }