mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-09 22:00:06 +00:00
Cosmetic update to glEvalLimit
- add image shader to fill background gradient
This commit is contained in:
parent
770ebfeb9c
commit
935b691f45
@ -678,6 +678,9 @@ drawSamples() {
|
||||
//------------------------------------------------------------------------------
|
||||
static void
|
||||
display() {
|
||||
|
||||
g_hud.GetFrameBuffer()->Bind();
|
||||
|
||||
Stopwatch s;
|
||||
s.Start();
|
||||
|
||||
@ -714,6 +717,8 @@ display() {
|
||||
if (g_drawCageVertices)
|
||||
drawCageVertices();
|
||||
|
||||
g_hud.GetFrameBuffer()->ApplyImageShader();
|
||||
|
||||
if (g_hud.IsVisible()) {
|
||||
g_fpsTimer.Stop();
|
||||
double fps = 1.0/g_fpsTimer.GetElapsed();
|
||||
@ -909,13 +914,17 @@ callbackDisplayVaryingColors(int mode)
|
||||
static void
|
||||
initHUD()
|
||||
{
|
||||
int windowWidth = g_width, windowHeight = g_height;
|
||||
int windowWidth = g_width, windowHeight = g_height,
|
||||
frameBufferWidth = g_width, frameBufferHeight = g_height;
|
||||
|
||||
// window size might not match framebuffer size on a high DPI display
|
||||
glfwGetWindowSize(g_window, &windowWidth, &windowHeight);
|
||||
glfwGetFramebufferSize(g_window, &frameBufferWidth, &frameBufferHeight);
|
||||
|
||||
g_hud.Init(windowWidth, windowHeight);
|
||||
|
||||
g_hud.SetFrameBuffer(new GLFrameBuffer);
|
||||
|
||||
g_hud.AddCheckBox("Cage Edges (H)", true, 10, 10, callbackDisplayCageEdges, 0, 'h');
|
||||
g_hud.AddCheckBox("Cage Verts (J)", true, 10, 30, callbackDisplayCageVertices, 0, 'j');
|
||||
g_hud.AddCheckBox("Animate vertices (M)", g_moveScale != 0, 10, 50, callbackAnimate, 0, 'm');
|
||||
@ -942,7 +951,7 @@ initHUD()
|
||||
static void
|
||||
initGL()
|
||||
{
|
||||
glClearColor(0.1f, 0.1f, 0.1f, 1.0f);
|
||||
glClearColor(0.1f, 0.1f, 0.1f, 0.0f);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
glCullFace(GL_BACK);
|
||||
|
Loading…
Reference in New Issue
Block a user