Fix a few new D compilation errors

This commit is contained in:
Josh Holtrop 2022-04-12 09:20:03 -04:00
parent c9650aada7
commit 1252ed7879
4 changed files with 7 additions and 6 deletions

View File

@ -155,9 +155,9 @@ class Program(uniforms...)
{
static if ((i % 2) == 0)
{
mixin("void set_" ~ v ~ "(" ~ uniform_param_decl_list(uniforms[i + 1]) ~ ")"
"{"
" glUniform" ~ uniforms[i + 1] ~ "(m_uniform_" ~ v ~ ", " ~ uniform_param_list(uniforms[i + 1]) ~ ");"
mixin("void set_" ~ v ~ "(" ~ uniform_param_decl_list(uniforms[i + 1]) ~ ")" ~
"{" ~
" glUniform" ~ uniforms[i + 1] ~ "(m_uniform_" ~ v ~ ", " ~ uniform_param_list(uniforms[i + 1]) ~ ");" ~
"}");
}
}

View File

@ -8,7 +8,7 @@ class Gui
{
this()
{
if (!jtk.init())
if (!jtk.initialize())
{
throw new Exception("JTK initialization failed.");
}

View File

@ -9,7 +9,7 @@ import derelict.opengl;
private extern(C) bool jtk_init();
private extern(C) void jtk_quit();
bool init()
bool initialize()
{
DerelictGL3.load();

View File

@ -2,6 +2,7 @@ module jtk.window;
import std.string;
import core.sync.mutex;
import core.exception;
import derelict.opengl;
@ -71,7 +72,7 @@ class Window
{
return windows_by_id[window_id];
}
catch (core.exception.RangeError re)
catch (RangeError re)
{
throw new Exception("Could not find requested JTK window ID");
}