Yes, quite a lot of the engine can be used stand-alone with minimum dependencies, here's some various snippets so you can see the coding style :
Window Initialization
WindowMan := TJWindowMan.Create(JDefaultWindowMan);
WindowStartupProperties := JDefaultWindow;
WindowStartupProperties.FullScreen := false;
WindowStartupProperties.GLMajorVersion := 4;
WindowStartupProperties.GLMinorVersion := 1;
WindowStartupProperties.GLCoreProfile := true;
WindowStartupProperties.GLForwardCompatible := false;
WindowStartupProperties.OnCreate := @OnWindowCreate;
WindowStartupProperties.OnDestroy := @OnWindowDestroy;
WindowStartupProperties.OnExecute := @OnWindowExecute;
WindowStartupProperties.Threaded := false;
JWindow := Windowman.Createwindow(WindowStartupProperties);
Scene & JUI Initialization
Scene := TJScene.create(JWindow.ImageMan,JWindow.ShaderMan, JWindow.ModelMan);
SceneView := TJSceneView.create(JWindow, Scene);
JUIWindowMan := TJUIWindowMan.Create(JWindow);
JUIWindowMan.Theme := TJUITheme.create;
JUIGlobal.WindowMan := JUIWindowMan;
JUIWindowMan.AttachJViewPort(SceneView);
JAPTaskbar := TJAPTaskbar.Create(JUIWindowMan);
JAPSceneTree := TJAPSceneTree.Create(JUIWindowMan, Scene);
Example Render Loop
FCamera.Look;
{Set Shader Uniform buffers}
FJWindow.ShaderMan.ModelViewMatrix := FCamera.ModelViewMatrix;
FJWindow.ShaderMan.ProjectionMatrix := FCamera.ProjectionMatrix;
FJWindow.PrimativeRenderer.Grid(vec3(-128,0,-12);
FScene.DoRender;
-----
You may of noticed that JWindow contains the image, model and shader managers.
While this might seem like an odd design decision it's simple enough : JWindowMan supports multiple windows across multiple monitors that the user might want to have their own resources/contexts. So everything that is specific to the context lives in JWindow. Shared contexts across multiple windows are handled by JWindowMan and you simply tell it which window you want to share with.
Bookmarks