Alienhead Posted March 8 Share Posted March 8 Oddly, I cannot create an interface attached to the camera anymore, I think this was working fine yesterday or day before. This code, silent crashes, in fast debug or full debug. Cam exists and so does the framebuffer. ConsolePadfont = LoadFont("Fonts/arial.ttf") --Create user interface ConsolePadui = CreateInterface(cam, ConsolePadfont, framebuffer.size) Quote Alienhead Components and Software Link to comment Share on other sites More sharing options...
Josh Posted March 8 Share Posted March 8 Maybe the font is not being loaded? 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...
Alienhead Posted March 8 Author Share Posted March 8 Well the font is in the Fonts directory, default as it gets.. Quote Alienhead Components and Software Link to comment Share on other sites More sharing options...
Alienhead Posted March 8 Author Share Posted March 8 Notify(tostring(ConsolePadfont)) Reports some data, so Im sure its loaded. Quote Alienhead Components and Software Link to comment Share on other sites More sharing options...
Josh Posted March 8 Share Posted March 8 This one-liner pasted in the editor console works: cam = CreateCamera(program.mainworld) font = LoadFont("Fonts/arial.ttf") ui = CreateInterface(cam, font, iVec2(100,100)) 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...
Alienhead Posted March 8 Author Share Posted March 8 Upon running this in Full Debug - debug gets hung here - Loading shader family "Shaders/PBR.fam" Loading shader family "Shaders/2D.fam" Loading shader family "Shaders/Sky.fam" Loading shader family "Shaders/Unlit.fam" Loading posteffect "Effects/Refraction.fx" Loading shader module "Shaders/MeshLayer/Culling.comp" Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath Quote Alienhead Components and Software Link to comment Share on other sites More sharing options...
Alienhead Posted March 8 Author Share Posted March 8 I have to task manager stop the process. Quote Alienhead Components and Software Link to comment Share on other sites More sharing options...
Josh Posted March 8 Share Posted March 8 I split this into a new topic. Once an issue is marked as solved, if you reply to it there is a risk I might never see that thread again, but as long as there is a thread that is not marked as solved, it will always be easily visible to me. 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 March 8 Solution Share Posted March 8 I ran this Lua example in a new project and it worked as expected. What should I investigate? --Get the displays local displays = GetDisplays() --Create window local window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[1]) --Create framebuffer local framebuffer = CreateFramebuffer(window) --Create world local world = CreateWorld() --Create camera local camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC) camera:SetPosition(framebuffer.size.x * 0.5, framebuffer.size.y * 0.5, 0) --Load a font local font = LoadFont("Fonts/arial.ttf") --Create user interface local ui = CreateInterface(camera, font, framebuffer.size) --Create widget local sz = ui.background:ClientSize() local button = CreateButton("Button", sz.x / 2 - 75, sz.y / 2 - 15, 150, 30, ui.background) while not window:KeyDown(KEY_ESCAPE) do while (PeekEvent()) do local ev = WaitEvent() if (ev.id == EVENT_WINDOWCLOSE and ev.source == window) then return 0 else ui:ProcessEvent(ev) end end world:Update() world:Render(framebuffer) end 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.