-
-
Notifications
You must be signed in to change notification settings - Fork 170
Closed
Labels
bugSomething isn't workingSomething isn't workingglOpenGL/WebGL render backendOpenGL/WebGL render backendwebgpuWebGPU render backendWebGPU render backend
Milestone
Description
The WGPU engine has fundamental issues with handling moving effects in the scene graph. It seems like the screen coordinating problem.
wgpu doesn't show anything.
struct UserExample : tvgexam::Example
{
Scene* model;
Point pos;
bool content(Canvas* canvas, uint32_t w, uint32_t h) override
{
auto shape = Shape::gen();
shape->appendCircle(0, 0, 100, 100);
shape->fill(255, 255, 255, 127);
shape->strokeWidth(8.0f);
shape->strokeFill(200, 200, 255);
model = Scene::gen();
model->push(shape);
model->translate(pos.x, pos.y);
model->scale(0.5f);
canvas->push(model);
pos = {float(w) * 0.5f, float(h) * 0.5f};
return true;
}
bool update(Canvas* canvas, uint32_t elapsed) override
{
model->push(SceneEffect::ClearAll);
model->push(SceneEffect::DropShadow, 200, 200, 255, 255, 0.0f, 10.0f, 15.0f, 30);
pos.y -= 0.1f;
model->translate(pos.x, pos.y);
canvas->update();
return true;
}
};
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingglOpenGL/WebGL render backendOpenGL/WebGL render backendwebgpuWebGPU render backendWebGPU render backend
Type
Projects
Status
Done 1.0