Jump to content

Josh

Staff
  • Posts

    24,628
  • Joined

  • Last visited

Everything posted by Josh

  1. Something like this might help: const int guardbandSize = 8; FILE* fs = fopen("action.ani", "rb"); fseek(fs, 0,SEEK_END); int dwSize = ftell(fs); fseek(fs, 0,SEEK_SET); char* memory = new char[dwSize + guardbandSize]; fread(memory, 1, dwSize, fs); memset(memory + dwSize, 0, guardbandSize); fclose(fs); cursor = (HCURSOR)CreateIconFromResource((PBYTE)memory,dwSize,FALSE,0x00030000); delete memory;
  2. Please let us know if it happens again!
  3. I posted a similar video years ago when I was first implementing the vegetation system in Leadwerks:
  4. Version 0.9.5 uses OpenGL 4.6. It is available on the beta branch. If you switch to using it, you must update your project to get the new shaders.
  5. 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; }
  6. Okay, here it is. I will let you guys experiment with this and see what you think: modelimport.zip
  7. 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...
  8. Copy the /Shaders folder from a new project into the project you are trying to import.
  9. For this reason, I was considering making 3D viewports render twice in the editor each time, if SSR is enabled.
  10. 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).
  11. 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.
  12. This is from my current build, once the SSR was fixed.
  13. It appears the effect is not working in the editor and is causing errors to be printed...
  14. In the editor or in a C++ program?
  15. Okay, it was just a missing shader combo.
  16. The reason for this has something to do with the camera depth prepass, which indicates a problem with the depth shader...
  17. 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.
  18. I am going to leave this "unsolved" until we decide what to do with this.
×
×
  • Create New...