Files
palladium/source/drivers/gfx.cpp
tobid7 d4c59e5b61 Add backends
- Renamed GfxOpenGL to GfxOPenGL2
- Added GfxOpenGL3 backend for OpenGL 3.3+
- Added WIP DirectX9 backend
- Added structure for Citro3D
- Added linear Allocator
2026-03-17 16:47:19 +01:00

25 lines
636 B
C++
Executable File

#include <pd/drivers/gfx.hpp>
namespace PD {
PD_API std::unique_ptr<GfxDriver> Gfx::driver;
PD_API GfxDriver::GfxDriver(std::string_view name) : DriverInterface(name) {}
PD_API void GfxDriver::SetViewPort(const ivec2& size) {
ViewPort = size;
Projection = Mat4::Ortho(0.f, ViewPort.x, ViewPort.y, 0.f, 1.f, -1.f);
}
PD_API void GfxDriver::SetViewPort(int x, int y) {
ViewPort.x = x;
ViewPort.y = y;
Projection = Mat4::Ortho(0.f, ViewPort.x, ViewPort.y, 0.f, 1.f, -1.f);
}
PD_API void GfxDriver::Reset() {
CurrentVertex = 0;
CurrentIndex = 0;
ResetPools();
SysReset();
}
} // namespace PD