From 90ec8a18367e6a937dc2ea3de1dd2f2f9e4d0a2d Mon Sep 17 00:00:00 2001 From: ikpil Date: Sun, 19 Mar 2023 22:47:34 +0900 Subject: [PATCH] camera test --- .../Draw/ModernOpenGLDraw.cs | 4 ++-- src/DotRecast.Recast.Demo/RecastDemo.cs | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/DotRecast.Recast.Demo/Draw/ModernOpenGLDraw.cs b/src/DotRecast.Recast.Demo/Draw/ModernOpenGLDraw.cs index ace83ed..f37411d 100644 --- a/src/DotRecast.Recast.Demo/Draw/ModernOpenGLDraw.cs +++ b/src/DotRecast.Recast.Demo/Draw/ModernOpenGLDraw.cs @@ -179,8 +179,8 @@ public class ModernOpenGLDraw : OpenGLDraw _gl.UseProgram(program); _gl.Uniform1(uniformTexture, 0); - _gl.UniformMatrix4(uniformViewMatrix, false, _viewMatrix); - _gl.UniformMatrix4(uniformProjectionMatrix, false, _projectionMatrix); + _gl.UniformMatrix4(uniformViewMatrix, 1, false, _viewMatrix); + _gl.UniformMatrix4(uniformProjectionMatrix, 1, false, _projectionMatrix); _gl.Uniform1(uniformFogStart, fogStart); _gl.Uniform1(uniformFogEnd, fogEnd); _gl.Uniform1(uniformFog, fogEnabled ? 1.0f : 0.0f); diff --git a/src/DotRecast.Recast.Demo/RecastDemo.cs b/src/DotRecast.Recast.Demo/RecastDemo.cs index 7d7e253..f94f563 100644 --- a/src/DotRecast.Recast.Demo/RecastDemo.cs +++ b/src/DotRecast.Recast.Demo/RecastDemo.cs @@ -701,17 +701,16 @@ public class RecastDemo : MouseListener dd.fog(camr * 0.1f, camr * 1.25f); renderer.render(sample); - // Tool tool = toolsUI.getTool(); - // if (tool != null) - // { - // tool.handleRender(renderer); - // } + Tool tool = toolsUI.getTool(); + if (tool != null) + { + tool.handleRender(renderer); + } dd.fog(false); - //mouseOverMenu = _viewSys.render(window, 0, 0, width, height, (int)mousePos[0], (int)mousePos[1]); - - //_imgui.Render(); + mouseOverMenu = _viewSys.render(window, 0, 0, width, height, (int)mousePos[0], (int)mousePos[1]); + _imgui.Render(); window.SwapBuffers(); }