1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:17:44 +00:00

3DFileViewer: Move Demos/GLTeapot to Applications/3DFileViewer

Also changes the category to `Graphics`
This commit is contained in:
Erik Biederstadt 2021-05-19 11:57:59 -06:00 committed by Linus Groh
parent 132ecfc47b
commit 585e7890cd
15 changed files with 18 additions and 18 deletions

View file

@ -0,0 +1,4 @@
[App]
Name=3D File Viewer
Executable=/bin/3DFileViewer
Category=Graphics

View file

@ -1,4 +0,0 @@
[App]
Name=GLTeapot
Executable=/bin/GLTeapot
Category=Demos

View file

Before

Width:  |  Height:  |  Size: 472 B

After

Width:  |  Height:  |  Size: 472 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1,010 B

After

Width:  |  Height:  |  Size: 1,010 B

Before After
Before After

View file

@ -0,0 +1,8 @@
set(SOURCES
Mesh.cpp
WavefrontOBJLoader.cpp
main.cpp
)
serenity_app(3DFileViewer ICON app-3d-file-viewer)
target_link_libraries(3DFileViewer LibGUI LibGL)

View file

@ -63,7 +63,7 @@ private:
// Load the teapot
m_mesh = m_mesh_loader->load("/res/gl/teapot.obj");
dbgln("GLTeapot: teapot mesh has {} triangles.", m_mesh->triangle_count());
dbgln("3DFileViewer: teapot mesh has {} triangles.", m_mesh->triangle_count());
}
virtual void paint_event(GUI::PaintEvent&) override;
@ -113,7 +113,7 @@ bool GLContextWidget::load(const String& fname)
{
m_mesh = m_mesh_loader->load(fname);
if (!m_mesh.is_null()) {
dbgln("GLTeapot: mesh has {} triangles.", m_mesh->triangle_count());
dbgln("3DFileViewer: mesh has {} triangles.", m_mesh->triangle_count());
return true;
}
@ -146,10 +146,10 @@ int main(int argc, char** argv)
// Construct the main window
auto window = GUI::Window::construct();
auto app_icon = GUI::Icon::default_icon("app-teapot");
auto app_icon = GUI::Icon::default_icon("app-3d-file-viewer");
window->set_icon(app_icon.bitmap_for_size(16));
window->set_title("GLTeapot");
window->set_title("3D File Viewer");
window->resize(640, 480);
window->set_resizable(false);
window->set_double_buffering_enabled(true);
@ -195,7 +195,7 @@ int main(int argc, char** argv)
}));
auto& help_menu = menubar->add_menu("&Help");
help_menu.add_action(GUI::CommonActions::make_about_action("GLTeapot", app_icon, window));
help_menu.add_action(GUI::CommonActions::make_about_action("3D File Viewer", app_icon, window));
window->set_menubar(move(menubar));
window->show();

View file

@ -1,3 +1,4 @@
add_subdirectory(3DFileViewer)
add_subdirectory(About)
add_subdirectory(AnalogClock)
add_subdirectory(Browser)

View file

@ -2,7 +2,6 @@ add_subdirectory(CatDog)
add_subdirectory(Cube)
add_subdirectory(Eyes)
add_subdirectory(Fire)
add_subdirectory(GLTeapot)
add_subdirectory(LibGfxDemo)
add_subdirectory(LibGfxScaleDemo)
add_subdirectory(Mandelbrot)

View file

@ -1,8 +0,0 @@
set(SOURCES
Mesh.cpp
WavefrontOBJLoader.cpp
main.cpp
)
serenity_app(GLTeapot ICON app-teapot)
target_link_libraries(GLTeapot LibGUI LibGL)