klepto2 Posted April 19 Share Posted April 19 If you have posteffects assigned to a camera, the wireframe mode is not rendering correctly. The only thing which is visible when using wireframe seems to be the pfx quad which is rendered. #include "UltraEngine.h" #include "ComponentSystem.h" //#include "Steamworks/Steamworks.h" using namespace UltraEngine; const WString remotepath = "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets"; int main(int argc, const char* argv[]) { #ifdef STEAM_API_H if (not Steamworks::Initialize()) { RuntimeError("Steamworks failed to initialize."); return 1; } #endif RegisterComponents(); auto cl = ParseCommandLine(argc, argv); //Load FreeImage plugin (optional) auto fiplugin = LoadPlugin("Plugins/FITextureLoader"); //Get the primary display auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a rendering framebuffer auto framebuffer = CreateFramebuffer(window); //Create a world auto world = CreateWorld(); world->SetAmbientLight(0); //Create a camera auto camera = CreateCamera(world); camera->SetPosition(0, 0, -1); camera->SetFov(70); camera->SetClearColor(0.125); camera->SetTessellation(4); //Create a light auto light = CreateBoxLight(world); light->SetRange(-10, 10); light->SetRotation(35, 35, 0); light->SetColor(4); //Display material auto model = CreateCubeSphere(world, 0.5, 8, MESH_QUADS); auto mtl = LoadMaterial(remotepath + "/Materials/Ground/rocks_ground_02.json"); mtl->SetTessellation(true); mtl->SetDisplacement(0.075f); model->SetMaterial(mtl); bool isWireFrame = false; bool pfxEnabled = false; //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyDown(KEY_DOWN)) camera->Move(0, 0, -0.01); if (window->KeyDown(KEY_UP)) camera->Move(0, 0, 0.01); if (window->KeyHit(KEY_F1)) { isWireFrame = !isWireFrame; camera->SetWireframe(isWireFrame); } if (window->KeyHit(KEY_F2)) { pfxEnabled = !pfxEnabled; if (pfxEnabled) { camera->AddPostEffect(LoadPostEffect("Shaders/SSAO.fx")); } else { camera->ClearPostEffects(); } } world->Update(); world->Render(framebuffer); #ifdef STEAM_API_H Steamworks::Update(); #endif } #ifdef STEAM_API_H Steamworks::Shutdown(); #endif return 0; } Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Josh Posted May 1 Share Posted May 1 This helps show the problem: model->Turn(0, 0.2, 0); Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Solution Josh Posted May 1 Solution Share Posted May 1 I fixed the problem. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.