From 8c2ef4e65b80aa6da080e68b64776d7c1a088d2d Mon Sep 17 00:00:00 2001 From: realtradam Date: Tue, 4 Jul 2023 21:16:41 -0400 Subject: initial non-working rmlui attempt --- src/rmlui/irodeo_rmlui.hpp | 66 +++------------------------------------------- 1 file changed, 4 insertions(+), 62 deletions(-) (limited to 'src/rmlui/irodeo_rmlui.hpp') diff --git a/src/rmlui/irodeo_rmlui.hpp b/src/rmlui/irodeo_rmlui.hpp index 66573b0..dee6786 100644 --- a/src/rmlui/irodeo_rmlui.hpp +++ b/src/rmlui/irodeo_rmlui.hpp @@ -1,66 +1,8 @@ #pragma once -#define RMLUI_STATIC_LIB +#include "rmlui/irodeo_rmlui_t.hpp" -// -- external -- -#include -#include +//// -- external -- +//#include +//#include -class RenderInterface_Rodeo : public Rml::RenderInterface { - public: - - bool is_projecting = false; - - RenderInterface_Rodeo(); - ~RenderInterface_Rodeo(); - - // The viewport should be updated whenever the window size changes. - void SetViewport(int viewport_width, int viewport_height); - - // Sets up OpenGL states for taking rendering commands from RmlUi. - void BeginFrame(); - void EndFrame(); - - // -- Inherited from Rml::RenderInterface -- - - void RenderGeometry( - Rml::Vertex* vertices, - int num_vertices, - int* indices, - int num_indices, - Rml::TextureHandle texture, - const Rml::Vector2f& translation - ) override; - - void EnableScissorRegion(bool enable) override; - void SetScissorRegion(int x, int y, int width, int height) override; - - bool LoadTexture( - Rml::TextureHandle& texture_handle, - Rml::Vector2i& texture_dimensions, - const Rml::String& source - ) override; - bool GenerateTexture( - Rml::TextureHandle& texture_handle, - const Rml::byte* source, - const Rml::Vector2i& source_dimensions - ) override; - void ReleaseTexture(Rml::TextureHandle texture_handle) override; - - void SetTransform(const Rml::Matrix4f* transform) override; - - // Can be passed to RenderGeometry() to enable texture rendering without changing the bound texture. - static const Rml::TextureHandle TextureEnableWithoutBinding = Rml::TextureHandle(-1); - - private: - //Rml::Matrix4f transform, projection; - //ProgramId transform_dirty_state = ProgramId::All; - //bool transform_active = false; - - //enum class ScissoringState { Disable, Scissor, Stencil }; - //ScissoringState scissoring_state = ScissoringState::Disable; - - int viewport_width = 0; - int viewport_height = 0; - -}; -- cgit v1.2.3