mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-06 19:22:20 +00:00
remove unwanted defines + upade encapsulation for window drawing function
This commit is contained in:
@@ -107,10 +107,14 @@ void RAY::Window::clear(const RAY::Color &color)
|
||||
ClearBackground(color);
|
||||
}
|
||||
|
||||
void RAY::Window::draw()
|
||||
void RAY::Window::beginDrawing()
|
||||
{
|
||||
BeginDrawing();
|
||||
}
|
||||
|
||||
void RAY::Window::endDrawing()
|
||||
{
|
||||
EndDrawing();
|
||||
BeginDrawing();
|
||||
}
|
||||
|
||||
void RAY::Window::useCamera(RAY::Camera::Camera2D &camera)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#ifndef WINDOW_HPP_
|
||||
#define WINDOW_HPP_
|
||||
#define INTERNAL public
|
||||
|
||||
#include <raylib.h>
|
||||
#include <string>
|
||||
#include <optional>
|
||||
@@ -102,8 +102,10 @@ namespace RAY {
|
||||
NONE,
|
||||
};
|
||||
|
||||
//! @brief Draw the content of the buffer on the screen.
|
||||
void draw();
|
||||
//! @brief Setup canvas (framebuffer) to start drawing
|
||||
void beginDrawing();
|
||||
//! @brief End canvas drawing and swap buffers (double buffering)
|
||||
void endDrawing();
|
||||
|
||||
//! @brief Initialize 2D mode with custom camera (2D)
|
||||
void useCamera(Camera::Camera2D &camera);
|
||||
@@ -131,6 +133,7 @@ namespace RAY {
|
||||
//! @brief Draw a 3d mesh with material and transform
|
||||
void draw(const Mesh &mesh, const Material &material, const Matrix &transform);
|
||||
|
||||
//! @return true if the window's context has been correctly initialized
|
||||
bool isReady() const;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user