Further refactor | Update ModelInstance.cpp, ModelInstance.h, and 7 more files...
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#include <noggit/ModelInstance.h>
|
||||
#include <noggit/WMOInstance.h>
|
||||
#include <noggit/ContextObject.hpp>
|
||||
#include <opengl/primitives.hpp>
|
||||
#include <noggit/rendering/Primitives.hpp>
|
||||
#include <opengl/scoped.hpp>
|
||||
#include <opengl/shader.hpp>
|
||||
|
||||
@@ -44,7 +44,7 @@ void ModelInstance::draw_box (glm::mat4x4 const& model_view
|
||||
|
||||
if (is_current_selection)
|
||||
{
|
||||
OpenGL::primitives::wire_box::getInstance(_context).draw ( model_view
|
||||
Noggit::Rendering::Primitives::WireBox::getInstance(_context).draw ( model_view
|
||||
, projection
|
||||
, transformMatrix()
|
||||
, { 1.0f, 1.0f, 0.0f, 1.0f }
|
||||
@@ -52,7 +52,7 @@ void ModelInstance::draw_box (glm::mat4x4 const& model_view
|
||||
, misc::transform_model_box_coords(model->header.collision_box_max)
|
||||
);
|
||||
|
||||
OpenGL::primitives::wire_box::getInstance(_context).draw ( model_view
|
||||
Noggit::Rendering::Primitives::WireBox::getInstance(_context).draw ( model_view
|
||||
, projection
|
||||
, transformMatrix()
|
||||
, {1.0f, 1.0f, 1.0f, 1.0f}
|
||||
@@ -60,7 +60,7 @@ void ModelInstance::draw_box (glm::mat4x4 const& model_view
|
||||
, misc::transform_model_box_coords(model->header.bounding_box_max)
|
||||
);
|
||||
|
||||
OpenGL::primitives::wire_box::getInstance(_context).draw ( model_view
|
||||
Noggit::Rendering::Primitives::WireBox::getInstance(_context).draw ( model_view
|
||||
, projection
|
||||
, glm::mat4x4(1)
|
||||
, {0.0f, 1.0f, 0.0f, 1.0f}
|
||||
@@ -70,7 +70,7 @@ void ModelInstance::draw_box (glm::mat4x4 const& model_view
|
||||
}
|
||||
else
|
||||
{
|
||||
OpenGL::primitives::wire_box::getInstance(_context).draw ( model_view
|
||||
Noggit::Rendering::Primitives::WireBox::getInstance(_context).draw ( model_view
|
||||
, projection
|
||||
, transformMatrix()
|
||||
, {0.5f, 0.5f, 0.5f, 1.0f}
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
#include <noggit/ModelManager.h>
|
||||
#include <noggit/Selection.h>
|
||||
#include <noggit/SceneObject.hpp>
|
||||
#include <noggit/rendering/Primitives.hpp>
|
||||
#include <noggit/TileIndex.hpp>
|
||||
#include <noggit/tool_enums.hpp>
|
||||
#include <opengl/shader.fwd.hpp>
|
||||
#include <opengl/primitives.hpp>
|
||||
#include <optional>
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
#include <noggit/DBCFile.h>
|
||||
#include <noggit/ModelInstance.h>
|
||||
#include <noggit/ContextObject.hpp>
|
||||
#include <noggit/rendering/Primitives.hpp>
|
||||
#include <opengl/scoped.hpp>
|
||||
#include <opengl/shader.fwd.hpp>
|
||||
#include <opengl/primitives.hpp>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@@ -223,5 +223,5 @@ private:
|
||||
|
||||
Noggit::NoggitRenderContext _context;
|
||||
|
||||
OpenGL::primitives::sphere _sphere_render;
|
||||
Noggit::Rendering::Primitives::Sphere _sphere_render;
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <noggit/TextureManager.h> // TextureManager, Texture
|
||||
#include <noggit/WMO.h>
|
||||
#include <noggit/World.h>
|
||||
#include <opengl/primitives.hpp>
|
||||
#include <noggit/rendering/Primitives.hpp>
|
||||
#include <noggit/application/NoggitApplication.hpp>
|
||||
#include <opengl/scoped.hpp>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <noggit/ContextObject.hpp>
|
||||
#include <noggit/rendering/WMOGroupRender.hpp>
|
||||
#include <noggit/rendering/WMORender.hpp>
|
||||
#include <opengl/primitives.hpp>
|
||||
#include <noggit/rendering/Primitives.hpp>
|
||||
#include <ClientFile.hpp>
|
||||
#include <optional>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <noggit/WMO.h> // WMO
|
||||
#include <noggit/MapTile.h>
|
||||
#include <noggit/WMOInstance.h>
|
||||
#include <opengl/primitives.hpp>
|
||||
#include <noggit/rendering/Primitives.hpp>
|
||||
#include <opengl/scoped.hpp>
|
||||
|
||||
WMOInstance::WMOInstance(BlizzardArchive::Listfile::FileKey const& file_key, ENTRY_MODF const* d, Noggit::NoggitRenderContext context)
|
||||
@@ -127,7 +127,7 @@ void WMOInstance::draw ( OpenGL::Scoped::use_program& wmo_shader
|
||||
glm::vec4 color = force_box ? glm::vec4(0.0f, 0.0f, 1.0f, 1.0f)
|
||||
: glm::vec4(0.0f, 1.0f, 0.0f, 1.0f);
|
||||
|
||||
OpenGL::primitives::wire_box::getInstance(_context).draw(model_view
|
||||
Noggit::Rendering::Primitives::WireBox::getInstance(_context).draw(model_view
|
||||
, projection
|
||||
, glm::mat4x4(glm::mat4x4(1))
|
||||
, color
|
||||
|
||||
@@ -84,7 +84,7 @@ void WMORender::draw(OpenGL::Scoped::use_program& wmo_shader
|
||||
|
||||
for (auto& group : _wmo->groups)
|
||||
{
|
||||
OpenGL::primitives::wire_box::getInstance(_wmo->_context).draw( model_view
|
||||
Noggit::Rendering::Primitives::WireBox::getInstance(_wmo->_context).draw( model_view
|
||||
, projection
|
||||
, transform_matrix
|
||||
, {1.0f, 1.0f, 1.0f, 1.0f}
|
||||
@@ -93,7 +93,7 @@ void WMORender::draw(OpenGL::Scoped::use_program& wmo_shader
|
||||
);
|
||||
}
|
||||
|
||||
OpenGL::primitives::wire_box::getInstance(_wmo->_context).draw ( model_view
|
||||
Noggit::Rendering::Primitives::WireBox::getInstance(_wmo->_context).draw ( model_view
|
||||
, projection
|
||||
, transform_matrix
|
||||
, {1.0f, 0.0f, 0.0f, 1.0f}
|
||||
|
||||
@@ -572,7 +572,7 @@ void WorldRender::draw (glm::mat4x4 const& model_view
|
||||
|
||||
glm::mat4x4 identity_mtx = glm::mat4x4{1};
|
||||
auto& extents = tile->getCombinedExtents();
|
||||
OpenGL::primitives::wire_box::getInstance(_world->_context).draw ( model_view
|
||||
Noggit::Rendering::Primitives::WireBox::getInstance(_world->_context).draw ( model_view
|
||||
, projection
|
||||
, identity_mtx
|
||||
, { 1.0f, 1.0f, 0.0f, 1.0f }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "PreviewRenderer.hpp"
|
||||
|
||||
#include <opengl/scoped.hpp>
|
||||
#include <opengl/primitives.hpp>
|
||||
#include <noggit/rendering/Primitives.hpp>
|
||||
#include <noggit/Selection.h>
|
||||
#include <noggit/tool_enums.hpp>
|
||||
#include <noggit/AsyncLoader.h>
|
||||
|
||||
Reference in New Issue
Block a user