macgit status
This commit is contained in:
parent
572ba4feb0
commit
bdf80f37e6
7 changed files with 11 additions and 11 deletions
|
@ -188,11 +188,11 @@ namespace ADVect {
|
||||||
void Render() {
|
void Render() {
|
||||||
bgfx::touch(0);
|
bgfx::touch(0);
|
||||||
|
|
||||||
draw_image_transition_fade(current_time, bg);
|
draw_image_transition_crossfade(current_time, bg);
|
||||||
|
|
||||||
if (draw_ui) {
|
if (draw_ui) {
|
||||||
if (dialogue_bg.current != nullptr)
|
if (dialogue_bg.current != nullptr)
|
||||||
ADVect::Graphics::DrawTextureImage(*dialogue_bg.current, dialogue_bg.pos_x, dialogue_bg.pos_y);
|
ADVect::Graphics::DrawTextureImageAlpha(*dialogue_bg.current, dialogue_bg.pos_x, dialogue_bg.pos_y, 1.0f);
|
||||||
draw_image_transition_crossfade(current_time, avatar);
|
draw_image_transition_crossfade(current_time, avatar);
|
||||||
|
|
||||||
ADVect::Graphics::RenderString<true, false>(speaker.current, speaker.pos_x, speaker.pos_y, speaker.fill, ADVect::Graphics::TEXT_BOLD);
|
ADVect::Graphics::RenderString<true, false>(speaker.current, speaker.pos_x, speaker.pos_y, speaker.fill, ADVect::Graphics::TEXT_BOLD);
|
||||||
|
@ -249,8 +249,8 @@ namespace ADVect {
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
std::filesystem::current_path("E:\\Archive\\Projects\\NouVeL\\ADVect\\runtime");
|
// std::filesystem::current_path("E:\\Archive\\Projects\\NouVeL\\ADVect\\runtime");
|
||||||
// std::filesystem::current_path("/Users/lachrymal/Projects/NouVeL/ADVect/runtime/");
|
std::filesystem::current_path("/Users/lachrymal/Projects/NouVeL/ADVect/runtime/");
|
||||||
|
|
||||||
NVL::Environment::ENVIRONMENT.enter({
|
NVL::Environment::ENVIRONMENT.enter({
|
||||||
{
|
{
|
||||||
|
|
|
@ -233,7 +233,7 @@ namespace ADVect::Graphics {
|
||||||
ibh = bgfx::createIndexBuffer(bgfx::makeRef(quad_indices, sizeof(quad_indices)));
|
ibh = bgfx::createIndexBuffer(bgfx::makeRef(quad_indices, sizeof(quad_indices)));
|
||||||
vbh = bgfx::createVertexBuffer(bgfx::makeRef(quad_vert, sizeof(quad_vert)), pcvDecl);
|
vbh = bgfx::createVertexBuffer(bgfx::makeRef(quad_vert, sizeof(quad_vert)), pcvDecl);
|
||||||
|
|
||||||
img_program = load_shader_program("test"); // RGBA
|
// img_program = load_shader_program("test"); // RGBA
|
||||||
imga_program = load_shader_program("ImageAlpha"); // RGBA + Opacity
|
imga_program = load_shader_program("ImageAlpha"); // RGBA + Opacity
|
||||||
a_program = load_shader_program("AlphaStencil"); // A -> FFFA
|
a_program = load_shader_program("AlphaStencil"); // A -> FFFA
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@ namespace ADVect::Graphics {
|
||||||
}
|
}
|
||||||
|
|
||||||
template <bool DoRender, bool Walk>
|
template <bool DoRender, bool Walk>
|
||||||
void RenderGlyph(NVL::Char c, std::conditional_t<Walk, i32&, i32> pos_x, std::conditional_t<Walk, i32&, i32> pos_y, u32 col, u32 style_flags = TEXT_NONE) {
|
void RenderGlyph(NVL::Char c, std::conditional_t<Walk, i32&, i32> pos_x, std::conditional_t<Walk, i32&, i32> pos_y, u32 col, u32 style_flags) {
|
||||||
Font* f = ResolveStyleFlags(style_flags);
|
Font* f = ResolveStyleFlags(style_flags);
|
||||||
|
|
||||||
auto& [tx, w, h, l, t, x, y] = f->get_char(c);
|
auto& [tx, w, h, l, t, x, y] = f->get_char(c);
|
||||||
|
@ -329,14 +329,14 @@ namespace ADVect::Graphics {
|
||||||
}
|
}
|
||||||
|
|
||||||
template <bool DoRender, bool Walk>
|
template <bool DoRender, bool Walk>
|
||||||
void RenderString(const NVL::String& s, std::conditional_t<Walk, i32&, i32> pos_x, std::conditional_t<Walk, i32&, i32> pos_y, u32 col, u32 style_flags = TEXT_NONE) {
|
void RenderString(const NVL::String& s, std::conditional_t<Walk, i32&, i32> pos_x, std::conditional_t<Walk, i32&, i32> pos_y, u32 col, u32 style_flags) {
|
||||||
for (const auto& c : s) {
|
for (const auto& c : s) {
|
||||||
RenderGlyph<DoRender>(c, pos_x, pos_y, col, style_flags);
|
RenderGlyph<DoRender>(c, pos_x, pos_y, col, style_flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <bool DoRender, bool Walk>
|
template <bool DoRender, bool Walk>
|
||||||
void RenderString(NVL::String::const_iterator cbegin, NVL::String::const_iterator cend, std::conditional_t<Walk, i32&, i32> pos_x, std::conditional_t<Walk, i32&, i32> pos_y, u32 col, u32 style_flags = TEXT_NONE) {
|
void RenderString(NVL::String::const_iterator cbegin, NVL::String::const_iterator cend, std::conditional_t<Walk, i32&, i32> pos_x, std::conditional_t<Walk, i32&, i32> pos_y, u32 col, u32 style_flags) {
|
||||||
while (cbegin < cend) {
|
while (cbegin < cend) {
|
||||||
RenderGlyph<DoRender>(*cbegin++, pos_x, pos_y, col, style_flags);
|
RenderGlyph<DoRender>(*cbegin++, pos_x, pos_y, col, style_flags);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,11 +34,11 @@ namespace ADVect::Graphics {
|
||||||
void DrawTextureStencilAlpha(const bgfx::TextureHandle& tex, i32 pos_x, i32 pos_y, u32 w, u32 h);
|
void DrawTextureStencilAlpha(const bgfx::TextureHandle& tex, i32 pos_x, i32 pos_y, u32 w, u32 h);
|
||||||
|
|
||||||
template <bool DoRender = true, bool Walk = true>
|
template <bool DoRender = true, bool Walk = true>
|
||||||
void RenderGlyph(NVL::Char c, std::conditional_t<Walk, i32&, i32> pos_x, std::conditional_t<Walk, i32&, i32> pos_y, u32 col, u32 style_flags);
|
void RenderGlyph(NVL::Char c, std::conditional_t<Walk, i32&, i32> pos_x, std::conditional_t<Walk, i32&, i32> pos_y, u32 col, u32 style_flags = TEXT_NONE);
|
||||||
template <bool DoRender = true, bool Walk = true>
|
template <bool DoRender = true, bool Walk = true>
|
||||||
void RenderString(const NVL::String& s, std::conditional_t<Walk, i32&, i32> pos_x, std::conditional_t<Walk, i32&, i32> pos_y, u32 col, u32 style_flags);
|
void RenderString(const NVL::String& s, std::conditional_t<Walk, i32&, i32> pos_x, std::conditional_t<Walk, i32&, i32> pos_y, u32 col, u32 style_flags = TEXT_NONE);
|
||||||
template <bool DoRender = true, bool Walk = true>
|
template <bool DoRender = true, bool Walk = true>
|
||||||
void RenderString(NVL::String::const_iterator cbegin, NVL::String::const_iterator cend, std::conditional_t<Walk, i32&, i32> pos_x, std::conditional_t<Walk, i32&, i32> pos_y, u32 col, u32 style_flags);
|
void RenderString(NVL::String::const_iterator cbegin, NVL::String::const_iterator cend, std::conditional_t<Walk, i32&, i32> pos_x, std::conditional_t<Walk, i32&, i32> pos_y, u32 col, u32 style_flags = TEXT_NONE);
|
||||||
|
|
||||||
i32 RenderSubstringBox(const NVL::String& s, i32& pos_x, i32& pos_y, i32 reset_x, u32 w, u32 col, u32 style_flags = TEXT_NONE, size_t s_end = NVL::String::npos);
|
i32 RenderSubstringBox(const NVL::String& s, i32& pos_x, i32& pos_y, i32 reset_x, u32 w, u32 col, u32 style_flags = TEXT_NONE, size_t s_end = NVL::String::npos);
|
||||||
void RenderSubstringMarkupBox(const NVL::Environment::MarkupString& ms, i32 pos_x, i32 pos_y, u32 w, u32 col, size_t end = NVL::String::npos);
|
void RenderSubstringMarkupBox(const NVL::Environment::MarkupString& ms, i32 pos_x, i32 pos_y, u32 w, u32 col, size_t end = NVL::String::npos);
|
||||||
|
|
BIN
ADVect/runtime/shaders/metal/AlphaStencil.frag.bin
Normal file
BIN
ADVect/runtime/shaders/metal/AlphaStencil.frag.bin
Normal file
Binary file not shown.
BIN
ADVect/runtime/shaders/metal/AlphaStencil.vert.bin
Normal file
BIN
ADVect/runtime/shaders/metal/AlphaStencil.vert.bin
Normal file
Binary file not shown.
BIN
ADVect/runtime/shaders/metal/ImageAlpha.frag.bin
Normal file
BIN
ADVect/runtime/shaders/metal/ImageAlpha.frag.bin
Normal file
Binary file not shown.
BIN
ADVect/runtime/shaders/metal/ImageAlpha.vert.bin
Normal file
BIN
ADVect/runtime/shaders/metal/ImageAlpha.vert.bin
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue