mirror of
https://github.com/lubosz/overte.git
synced 2025-04-10 03:22:52 +02:00
more stuff fixed
This commit is contained in:
parent
bf85034f36
commit
02be965271
5 changed files with 27 additions and 23 deletions
|
@ -21,6 +21,7 @@
|
|||
ProceduralSkybox::ProceduralSkybox() : graphics::Skybox() {
|
||||
_procedural._vertexSource = skybox_vert::getSource();
|
||||
_procedural._opaquefragmentSource = skybox_frag::getSource();
|
||||
_procedural._transparentfragmentSource = skybox_frag::getSource();
|
||||
// Adjust the pipeline state for background using the stencil test
|
||||
_procedural.setDoesFade(false);
|
||||
// Must match PrepareStencil::STENCIL_BACKGROUND
|
||||
|
@ -60,9 +61,13 @@ void ProceduralSkybox::render(gpu::Batch& batch, const ViewFrustum& viewFrustum,
|
|||
batch.setModelTransform(Transform()); // only for Mac
|
||||
|
||||
auto& procedural = skybox._procedural;
|
||||
procedural.prepare(batch, glm::vec3(0), glm::vec3(1), glm::quat());
|
||||
|
||||
// procedural.prepare(batch, glm::vec3(0), glm::vec3(1), glm::quat());
|
||||
procedural.prepare(batch, glm::vec3(0), glm::vec3(1), glm::quat(), glm::vec4(glm::vec3(1.0f), 0.9));
|
||||
|
||||
auto textureSlot = procedural.getOpaqueShader()->getTextures().findLocation("cubeMap");
|
||||
auto bufferSlot = procedural.getOpaqueShader()->getUniformBuffers().findLocation("skyboxBuffer");
|
||||
|
||||
skybox.prepare(batch, textureSlot, bufferSlot);
|
||||
batch.draw(gpu::TRIANGLE_STRIP, 4);
|
||||
}
|
||||
|
|
|
@ -36,8 +36,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
Engine::Engine() : Task(EngineTask::JobModel::create("Engine")),
|
||||
_renderContext(std::make_shared<RenderContext>())
|
||||
Engine::Engine() : _Engine(EngineTask::JobModel::create("Engine"), std::make_shared<RenderContext>())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,9 @@ namespace render {
|
|||
// The render engine holds all render tasks, and is itself a render task.
|
||||
// State flows through tasks to jobs via the render and scene contexts -
|
||||
// the engine should not be known from its jobs.
|
||||
class Engine : public Task {
|
||||
class Engine : public _Engine {
|
||||
|
||||
//class Engine : public Task {
|
||||
public:
|
||||
|
||||
Engine();
|
||||
|
@ -93,19 +95,19 @@ namespace render {
|
|||
void load();
|
||||
|
||||
// Register the scene
|
||||
void registerScene(const ScenePointer& scene) { _renderContext->_scene = scene; }
|
||||
void registerScene(const ScenePointer& scene) { _context->_scene = scene; }
|
||||
|
||||
// acces the RenderContext
|
||||
RenderContextPointer getRenderContext() const { return _renderContext; }
|
||||
RenderContextPointer getRenderContext() const { return _context; }
|
||||
|
||||
// Render a frame
|
||||
// Must have a scene registered and a context set
|
||||
void run() { assert(_renderContext); Task::run(_renderContext); }
|
||||
// void run() { assert(_renderContext); Task::run(_renderContext); }
|
||||
|
||||
protected:
|
||||
RenderContextPointer _renderContext;
|
||||
// RenderContextPointer _renderContext;
|
||||
|
||||
void run(const RenderContextPointer& context) override { assert(_renderContext); Task::run(_renderContext); }
|
||||
// void run(const RenderContextPointer& context) override { assert(_renderContext); Task::run(_renderContext); }
|
||||
};
|
||||
using EnginePointer = std::shared_ptr<Engine>;
|
||||
|
||||
|
|
|
@ -379,7 +379,7 @@ public:
|
|||
using TaskType = Task<JC, TP>;
|
||||
using ConceptPointer = typename TaskType::ConceptPointer;
|
||||
|
||||
Engine(ConceptPointer concept) : TaskType(concept) {}
|
||||
Engine(const ConceptPointer& concept, const ContextPointer& context) : TaskType(concept), _context(context) {}
|
||||
~Engine() = default;
|
||||
|
||||
void reset(const ContextPointer& context) { _context = context; }
|
||||
|
|
|
@ -20,7 +20,7 @@ import "../jet.js" as Jet
|
|||
Rectangle {
|
||||
HifiConstants { id: hifi;}
|
||||
color: hifi.colors.baseGray;
|
||||
id: root
|
||||
id: root;
|
||||
|
||||
// width: parent ? parent.width : 200
|
||||
// height: parent ? parent.height : 400
|
||||
|
@ -29,11 +29,7 @@ Rectangle {
|
|||
|
||||
Component.onCompleted: {
|
||||
var message = ""
|
||||
// functor = Jet.job_print_functor(function (line) { message += line + "\n"; }, false);
|
||||
|
||||
// functor = Jet.job_list_functor(root.myArray);
|
||||
|
||||
var maxDepth = 4;
|
||||
var maxDepth = 3;
|
||||
|
||||
var jobTreePath = []
|
||||
var jobsRoot;
|
||||
|
@ -72,6 +68,7 @@ Rectangle {
|
|||
Jet.task_traverseTree(rootConfig, functor);
|
||||
}
|
||||
|
||||
|
||||
ListModel {
|
||||
id: jobsModel
|
||||
}
|
||||
|
@ -101,7 +98,7 @@ Rectangle {
|
|||
property var config: root.rootConfig.getConfig(model.path + "." + model.name);
|
||||
text: (objRecursiveColumn.children.length > 2 ?
|
||||
objRecursiveColumn.children[1].visible ?
|
||||
qsTr("- ") : qsTr("+ ") : qsTr(" ")) + model.name + " ms=" + config.cpuRunTime.toFixed(3)
|
||||
qsTr("- ") : qsTr("+ ") : qsTr(" ")) + model.name + " ms=" + config.cpuRunTime.toFixed(2)
|
||||
checked: config.enabled
|
||||
}
|
||||
}
|
||||
|
@ -113,11 +110,12 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: theView
|
||||
anchors.fill: parent
|
||||
model: jobsModel
|
||||
delegate: objRecursiveDelegate
|
||||
Original.ScrollView {
|
||||
anchors.fill: parent
|
||||
ListView {
|
||||
id: theView
|
||||
model: jobsModel
|
||||
delegate: objRecursiveDelegate
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue