mirror of
https://github.com/NoelFB/blah.git
synced 2025-08-17 05:50:43 +08:00
removing "backend" from internal namespaces
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
#include <blah/graphics/mesh.h>
|
||||
#include "../internal/graphics_backend.h"
|
||||
#include "../internal/graphics.h"
|
||||
|
||||
using namespace Blah;
|
||||
|
||||
|
||||
MeshRef Mesh::create()
|
||||
{
|
||||
return GraphicsBackend::create_mesh();
|
||||
return Graphics::create_mesh();
|
||||
}
|
||||
|
||||
VertexFormat::VertexFormat(std::initializer_list<VertexAttribute> attributes, int stride)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <blah/graphics/renderpass.h>
|
||||
#include <blah/common.h>
|
||||
#include "../internal/graphics_backend.h"
|
||||
#include "../internal/graphics.h"
|
||||
|
||||
using namespace Blah;
|
||||
|
||||
@ -86,5 +86,5 @@ void RenderPass::perform()
|
||||
pass.scissor = pass.scissor.overlap_rect(Rect(0, 0, draw_size.x, draw_size.y));
|
||||
|
||||
// perform render
|
||||
GraphicsBackend::render(pass);
|
||||
Graphics::render(pass);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <blah/graphics/shader.h>
|
||||
#include <blah/app.h>
|
||||
#include "../internal/graphics_backend.h"
|
||||
#include "../internal/graphics.h"
|
||||
|
||||
using namespace Blah;
|
||||
|
||||
@ -10,7 +10,7 @@ ShaderRef Shader::create(const ShaderData& data)
|
||||
BLAH_ASSERT(data.fragment.length() > 0, "Must provide a Fragment Shader");
|
||||
BLAH_ASSERT(data.hlsl_attributes.size() > 0 || App::renderer() != Renderer::D3D11, "D3D11 Shaders must have hlsl_attributes assigned");
|
||||
|
||||
auto shader = GraphicsBackend::create_shader(&data);
|
||||
auto shader = Graphics::create_shader(&data);
|
||||
|
||||
// validate the shader
|
||||
if (shader)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <blah/graphics/target.h>
|
||||
#include "../internal/graphics_backend.h"
|
||||
#include "../internal/graphics.h"
|
||||
|
||||
using namespace Blah;
|
||||
|
||||
@ -29,7 +29,7 @@ TargetRef Target::create(int width, int height, const AttachmentFormats& texture
|
||||
BLAH_ASSERT(depth_count <= 1, "Target can only have 1 Depth/Stencil Texture");
|
||||
BLAH_ASSERT(color_count <= Attachments::capacity - 1, "Exceeded maximum Color texture count");
|
||||
|
||||
return GraphicsBackend::create_target(width, height, textures.data(), textures.size());
|
||||
return Graphics::create_target(width, height, textures.data(), textures.size());
|
||||
}
|
||||
|
||||
TextureRef& Target::texture(int index)
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <blah/images/image.h>
|
||||
#include <blah/streams/stream.h>
|
||||
#include <blah/common.h>
|
||||
#include "../internal/graphics_backend.h"
|
||||
#include "../internal/graphics.h"
|
||||
|
||||
using namespace Blah;
|
||||
|
||||
@ -16,7 +16,7 @@ TextureRef Texture::create(int width, int height, TextureFormat format, unsigned
|
||||
BLAH_ASSERT(width > 0 && height > 0, "Texture width and height must be larger than 0");
|
||||
BLAH_ASSERT((int)format > (int)TextureFormat::None && (int)format < (int)TextureFormat::Count, "Invalid texture format");
|
||||
|
||||
auto tex = GraphicsBackend::create_texture(width, height, format);
|
||||
auto tex = Graphics::create_texture(width, height, format);
|
||||
|
||||
if (tex && data != nullptr)
|
||||
tex->set_data(data);
|
||||
|
Reference in New Issue
Block a user