mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 06:33:31 +00:00
parent
128faadc31
commit
9b8fcb5fd0
@ -69,6 +69,8 @@ class Nano3d::Scene
|
||||
{
|
||||
enum { NUM_BUFFERS = 3 };
|
||||
|
||||
Genode::Region_map &rm;
|
||||
|
||||
static Framebuffer::Session &
|
||||
_init_framebuffer(Nitpicker::Connection &nitpicker,
|
||||
Nitpicker::Area const size)
|
||||
@ -104,7 +106,7 @@ class Nano3d::Scene
|
||||
return Nitpicker::Area(mode.width(), mode.height()/NUM_BUFFERS);
|
||||
}
|
||||
|
||||
Genode::Attached_dataspace ds { framebuffer.dataspace() };
|
||||
Genode::Attached_dataspace ds { rm, framebuffer.dataspace() };
|
||||
|
||||
PT *pixel_base(unsigned i)
|
||||
{
|
||||
@ -134,12 +136,13 @@ class Nano3d::Scene
|
||||
NUM_BUFFERS*size().count());
|
||||
}
|
||||
|
||||
Mapped_framebuffer(Nitpicker::Connection &nitpicker, Nitpicker::Area size)
|
||||
Mapped_framebuffer(Nitpicker::Connection &nitpicker, Nitpicker::Area size,
|
||||
Genode::Region_map &rm)
|
||||
:
|
||||
framebuffer(_init_framebuffer(nitpicker, size))
|
||||
rm(rm), framebuffer(_init_framebuffer(nitpicker, size))
|
||||
{ }
|
||||
|
||||
} _framebuffer { _nitpicker, _size };
|
||||
} _framebuffer { _nitpicker, _size, _env.rm() };
|
||||
|
||||
Nitpicker::Session::View_handle _view_handle = _nitpicker.create_view();
|
||||
|
||||
@ -189,7 +192,7 @@ class Nano3d::Scene
|
||||
|
||||
Timer::Connection _timer { _env };
|
||||
|
||||
Genode::Attached_dataspace _input_ds { _nitpicker.input()->dataspace() };
|
||||
Genode::Attached_dataspace _input_ds { _env.rm(), _nitpicker.input()->dataspace() };
|
||||
|
||||
Input_handler *_input_handler_callback = nullptr;
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/heap.h>
|
||||
#include <base/component.h>
|
||||
#include <base/attached_rom_dataspace.h>
|
||||
#include <polygon_gfx/shaded_polygon_painter.h>
|
||||
@ -33,7 +34,8 @@ class Scene : public Nano3d::Scene<PT>
|
||||
|
||||
private:
|
||||
|
||||
Genode::Env &_env;
|
||||
Genode::Env &_env;
|
||||
Genode::Heap _heap { _env.ram(), _env.rm() };
|
||||
|
||||
Nitpicker::Area const _size;
|
||||
|
||||
@ -114,10 +116,8 @@ class Scene : public Nano3d::Scene<PT>
|
||||
|
||||
private:
|
||||
|
||||
Polygon::Shaded_painter _shaded_painter {
|
||||
*Genode::env()->heap(), _size.h() };
|
||||
Polygon::Textured_painter _textured_painter {
|
||||
*Genode::env()->heap(), _size.h() };
|
||||
Polygon::Shaded_painter _shaded_painter { _heap, _size.h() };
|
||||
Polygon::Textured_painter _textured_painter { _heap, _size.h() };
|
||||
|
||||
Nano3d::Cube_shape const _cube { 7000 };
|
||||
Nano3d::Dodecahedron_shape const _dodecahedron { 10000 };
|
||||
|
Loading…
Reference in New Issue
Block a user