From 098555453a11a4b1c03503a2c8a35c7ac572e28f Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Wed, 12 Oct 2022 23:27:14 -0400 Subject: [PATCH] Change enum values --- examples/dev_testing/src/main.cpp | 11 ++++++++--- include/simpleengine/gfx/model.h | 12 ++++++------ include/simpleengine/gfx/texture.h | 13 +++++-------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/examples/dev_testing/src/main.cpp b/examples/dev_testing/src/main.cpp index 5093a98..eb334c4 100644 --- a/examples/dev_testing/src/main.cpp +++ b/examples/dev_testing/src/main.cpp @@ -77,7 +77,9 @@ int main(int argc, char *argv[]) { game.add_event(scene); se::ecs::Entity other_e = scene->create_entity(); - other_e.add_component("examples/dev_testing/resources/transparent_window.fbx", simpleengine::gfx::ModelProcessingFlags::MdlProcFlag_CALCULATE_TANGENT_SPACE | simpleengine::gfx::ModelProcessingFlags::MdlProcFlag_TRANSPARENT); + other_e.add_component("examples/dev_testing/resources/transparent_window.fbx", + se::gfx::ModelProcessingFlags::MdlProcFlag_CALCULATE_TANGENT_SPACE | + se::gfx::ModelProcessingFlags::MdlProcFlag_TRANSPARENT); auto &other_transform = other_e.add_component(); other_transform.translate(5.f, 0.5f, 1.f); @@ -86,13 +88,16 @@ int main(int argc, char *argv[]) { // entity.add_component("examples/dev_testing/resources/planks/planks.fbx", simpleengine::gfx::ModelProcessingFlags::MdlProcFlag_CALCULATE_TANGENT_SPACE); //entity.add_component("examples/dev_testing/resources/bricks/bricks.fbx", simpleengine::gfx::ModelProcessingFlags::MdlProcFlag_CALCULATE_TANGENT_SPACE); - entity.add_component("examples/dev_testing/resources/transparent_window.fbx", simpleengine::gfx::ModelProcessingFlags::MdlProcFlag_CALCULATE_TANGENT_SPACE | simpleengine::gfx::ModelProcessingFlags::MdlProcFlag_TRANSPARENT); + entity.add_component("examples/dev_testing/resources/transparent_window.fbx", + se::gfx::ModelProcessingFlags::MdlProcFlag_CALCULATE_TANGENT_SPACE | + se::gfx::ModelProcessingFlags::MdlProcFlag_TRANSPARENT); auto &transform_comp = entity.add_component(); transform_comp.translate(4.f, 0.f, 0.f); se::ecs::Entity brick_e = scene->create_entity(); - brick_e.add_component("examples/dev_testing/resources/bricks/bricks.fbx", simpleengine::gfx::ModelProcessingFlags::MdlProcFlag_CALCULATE_TANGENT_SPACE); + brick_e.add_component("examples/dev_testing/resources/bricks/bricks.fbx", + se::gfx::ModelProcessingFlags::MdlProcFlag_CALCULATE_TANGENT_SPACE); auto &brick_transf = brick_e.add_component(); brick_transf.translate(6.f, -0.5f, 1.f); diff --git a/include/simpleengine/gfx/model.h b/include/simpleengine/gfx/model.h index 4b3c899..db8cbd4 100644 --- a/include/simpleengine/gfx/model.h +++ b/include/simpleengine/gfx/model.h @@ -11,12 +11,12 @@ //#include namespace simpleengine::gfx { - enum ModelProcessingFlags : uint8_t { - MdlProcFlag_NONE = 0b00000000, - MdlProcFlag_FLIP_TEX_COORDS_VERTICALLY = 0b00000001, - MdlProcFlag_FLIP_TEX_COORDS_HORIZONTALLY = 0b00000010, - MdlProcFlag_CALCULATE_TANGENT_SPACE = 0b00000100, - MdlProcFlag_TRANSPARENT = 0b00001000, + enum ModelProcessingFlags { + MdlProcFlag_NONE = 0x0, + MdlProcFlag_FLIP_TEX_COORDS_VERTICALLY = 0x1, + MdlProcFlag_FLIP_TEX_COORDS_HORIZONTALLY = 0x2, + MdlProcFlag_CALCULATE_TANGENT_SPACE = 0x4, + MdlProcFlag_TRANSPARENT = 0x8, }; /** diff --git a/include/simpleengine/gfx/texture.h b/include/simpleengine/gfx/texture.h index 69c492e..1e12a70 100644 --- a/include/simpleengine/gfx/texture.h +++ b/include/simpleengine/gfx/texture.h @@ -18,14 +18,11 @@ #include namespace simpleengine::gfx { - enum TextureFlags : uint8_t { - TexFlags_IMG_2D = 0b00000001, - TexFlags_FLIP_VERTICALLY = 0b00000010, - TexFlags_FLIP_HORIZONTALLY = 0b00000100, - TexFlags_MIPMAP = 0b00001000, - /* TexFlags_NO_COLOR = 0b00010000, - TexFlags_RGB = 0b00100000, - TexFlags_RGBA = 0b01000000, */ + enum TextureFlags { + TexFlags_IMG_2D = 0x1, + TexFlags_FLIP_VERTICALLY = 0x2, + TexFlags_FLIP_HORIZONTALLY = 0x4, + TexFlags_MIPMAP = 0x8 }; class Texture {