mirror of
https://github.com/Relintai/sfw.git
synced 2024-11-08 07:52:09 +01:00
Added the immediate renderer to the build.
This commit is contained in:
parent
49d055a9e0
commit
15b1514cd0
@ -69,6 +69,8 @@ ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/render_core/input.cpp -o sfw/rende
|
||||
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/render_core/shortcut.cpp -o sfw/render_core/shortcut.o
|
||||
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/render_core/font.cpp -o sfw/render_core/font.o
|
||||
|
||||
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/render_immediate/renderer.cpp -o sfw/render_immediate/renderer.o
|
||||
|
||||
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/render_objects/camera_3d.cpp -o sfw/render_objects/camera_3d.o
|
||||
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/render_objects/object_3d.cpp -o sfw/render_objects/object_3d.o
|
||||
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/render_objects/mesh_instance_3d.cpp -o sfw/render_objects/mesh_instance_3d.o
|
||||
@ -103,6 +105,7 @@ ccache g++ -Wall -lm -ldl -lpthread -lX11 -D_REENTRANT -g sfw/core/aabb.o sfw/c
|
||||
sfw/render_core/input_event.o sfw/render_core/input_map.o \
|
||||
sfw/render_core/input.o sfw/render_core/shortcut.o \
|
||||
sfw/render_core/keyboard.o sfw/render_core/font.o \
|
||||
sfw/render_immediate/renderer.o \
|
||||
sfw/render_objects/camera_3d.o sfw/render_objects/object_3d.o sfw/render_objects/mesh_instance_3d.o \
|
||||
sfw/render_objects/object_2d.o \
|
||||
sfw/render_objects/sprite.o sfw/render_objects/tile_map.o \
|
||||
|
@ -1,30 +1,29 @@
|
||||
#include "renderer.h"
|
||||
|
||||
#include "render_core/font.h"
|
||||
#include "render_core/font_material.h"
|
||||
#include "render_core/material.h"
|
||||
#include "render_core/mesh.h"
|
||||
#include "render_core/text_material.h"
|
||||
#include "render_core/texture.h"
|
||||
#include "render_core/texture_material_2d.h"
|
||||
#include "render_core/window.h"
|
||||
#include "render_core/font_material.h"
|
||||
#include "render_core/font.h"
|
||||
|
||||
#include "render_core/render_state.h"
|
||||
|
||||
void Renderer::draw_point(const Vector2 &p_position, const Color &p_color = Color(1, 1, 1)) {
|
||||
void Renderer::draw_point(const Vector2 &p_position, const Color &p_color) {
|
||||
//Ugly but oh well
|
||||
draw_rect(Rect2(p_position, Vector2(1, 1)), p_color);
|
||||
}
|
||||
void Renderer::draw_line(const Vector2 &p_from, const Vector2 &p_to, const Color &p_color = Color(1, 1, 1), const real_t p_width = 1) {
|
||||
void Renderer::draw_line(const Vector2 &p_from, const Vector2 &p_to, const Color &p_color, const real_t p_width) {
|
||||
}
|
||||
void Renderer::draw_line_rect(const Rect2 &p_rect, const Color &p_color = Color(1, 1, 1)) {
|
||||
void Renderer::draw_line_rect(const Rect2 &p_rect, const Color &p_color) {
|
||||
}
|
||||
void Renderer::draw_rect(const Rect2 &p_rect, const Color &p_color = Color(1, 1, 1)) {
|
||||
void Renderer::draw_rect(const Rect2 &p_rect, const Color &p_color) {
|
||||
}
|
||||
|
||||
void Renderer::draw_texture(const Ref<Texture> &p_texture, const Rect2 &dst_rect, const Color &p_modulate = Color(1, 1, 1)) {
|
||||
void Renderer::draw_texture(const Ref<Texture> &p_texture, const Rect2 &dst_rect, const Color &p_modulate) {
|
||||
}
|
||||
void Renderer::draw_texture_clipped(const Ref<Texture> &p_texture, const Rect2 &p_src_rect, const Rect2 &p_dst_rect, const Color &p_modulate = Color(1, 1, 1)) {
|
||||
void Renderer::draw_texture_clipped(const Ref<Texture> &p_texture, const Rect2 &p_src_rect, const Rect2 &p_dst_rect, const Color &p_modulate) {
|
||||
}
|
||||
|
||||
void Renderer::draw_mesh_2d(const Ref<Mesh> &p_mesh, const Ref<Material> &p_material, const Transform2D &p_transform_2d) {
|
||||
@ -32,15 +31,15 @@ void Renderer::draw_mesh_2d(const Ref<Mesh> &p_mesh, const Ref<Material> &p_mate
|
||||
void Renderer::draw_mesh_3d(const Ref<Mesh> &p_mesh, const Ref<Material> &p_material, const Transform &p_transform) {
|
||||
}
|
||||
|
||||
void Renderer::draw_text_2d(const Ref<Font> &p_mesh, const Vector2 &p_position, const Color &p_color = Color(1, 1, 1)) {
|
||||
void Renderer::draw_text_2d(const Ref<Font> &p_mesh, const Vector2 &p_position, const Color &p_color) {
|
||||
}
|
||||
void Renderer::draw_text_2d_tf(const Ref<Font> &p_mesh, const Transform2D &p_transform_2d, const Color &p_color = Color(1, 1, 1)) {
|
||||
void Renderer::draw_text_2d_tf(const Ref<Font> &p_mesh, const Transform2D &p_transform_2d, const Color &p_color) {
|
||||
}
|
||||
void Renderer::draw_text_2d_tf_material(const Ref<Font> &p_mesh, const Ref<Material> &p_material, const Transform2D &p_transform_2d) {
|
||||
}
|
||||
|
||||
Vector2i Renderer::get_window_size() const {
|
||||
return Vector2i(AppWindow::get_singleton()->get_width(), AppWindow::get_singleton()->get_height())
|
||||
return Vector2i(AppWindow::get_singleton()->get_width(), AppWindow::get_singleton()->get_height());
|
||||
}
|
||||
|
||||
float Renderer::get_window_aspect() const {
|
||||
|
Loading…
Reference in New Issue
Block a user