Jump to content

Josh

Staff
  • Posts

    22,897
  • Joined

  • Last visited

Everything posted by Josh

  1. No need to: #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a world auto world = CreateWorld(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create light auto light = CreateBoxLight(world); light->SetRange(-10, 10); light->SetRotation(15, 15, 0); light->SetColor(2); //Create camera auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetPosition(0, 0, -3); camera->SetFov(70); //Create scenery auto box = CreateBox(world); auto cone = CreateCone(world); cone->SetPosition(1.25, 0, 0); cone->SetColor(0, 0, 1); auto sphere = CreateSphere(world); sphere->SetPosition(-1.25, 0, 0); sphere->SetColor(1, 0, 0); //Create camera and texture buffer auto texbuffer = CreateTextureBuffer(256, 256, 1, true, 0); auto cam2 = CreateCamera(world); cam2->SetClearColor(1, 1, 1); cam2->SetRenderTarget(texbuffer); cam2->SetMSAA(2); //Create material auto mtl = CreateMaterial(); auto tex = texbuffer->GetColorAttachment(); mtl->SetTexture(tex); box->SetMaterial(mtl); cone->SetMaterial(mtl); sphere->SetMaterial(mtl); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { //Orient the texturebuffer camera cam2->SetPosition(0, 0, 0); cam2->Turn(0, 1, 0); cam2->Move(0, 0, -3); world->Update(); world->Render(framebuffer); } return 0; }
  2. Okay, here it is. I will let you guys experiment with this and see what you think: modelimport.zip
  3. I am guessing there is somehow two active components being updated, which causes the mouse to be moved back to the center twice each frame...
  4. Copy the /Shaders folder from a new project into the project you are trying to import.
  5. For this reason, I was considering making 3D viewports render twice in the editor each time, if SSR is enabled.
  6. 0.9.5 Today's bug fixes included. Added Texture::GetIndex(). (Returns the OpenGL texture name / id, only use this in a rendering hook). Added Texture::GetHandle() (Returns the OpenGL bindless sampler handle).
  7. There are some questions that need to be decided. How much info should a brush instance share with the original? Should texture mapping be updated on a brush that came from a prefab? The behavior we are seeing right now is a result of not having decided these questions.
  8. This is from my current build, once the SSR was fixed.
  9. It appears the effect is not working in the editor and is causing errors to be printed...
  10. Okay, it was just a missing shader combo.
  11. The reason for this has something to do with the camera depth prepass, which indicates a problem with the depth shader...
  12. It just needed a matrix update to be forced for some reason, to update the sprite entity showing the icon. This is fixed for the next build.
  13. I am going to leave this "unsolved" until we decide what to do with this.
  14. As for the font rendering, I need to modify the way the font texture works...
  15. It's normal that a plugin cannot be loaded from a zip archive, because under the hood this is using the Win32 function LoadLibrary. There may be a win32 function to load a library from memory, but I have not confirmed whether there the equivalent functions for Mac and Linux exist.
  16. Okay, I just had to make a small change to the way the zip file names are evaluated.
  17. I think the next step is to work this library into a standard Ultra C++ project so we can all test different files and see how well it works.
  18. Yes, I believe this is what I was asking for.
  19. 0.9.5 Everything updated, on Steam and standalone, this sorts out the terrain problem. Nothing had to be programmed, I just had to make sure all the executables, libraries, and shaders were really up to date.
  20. It doesn't appear the library supports loading files from memory, if the model consists of more than one file, like external textures, or in the case of glTF, an external binary file. I asked about it here but have not received a response yet: https://github.com/assimp/assimp/issues/5511
×
×
  • Create New...