Compare commits

...

2 Commits

Author SHA1 Message Date
1252ed7879 Fix a few new D compilation errors 2022-04-12 09:20:03 -04:00
c9650aada7 Update rscons 2022-04-12 09:19:18 -04:00
6 changed files with 46 additions and 22 deletions

View File

@ -6,11 +6,10 @@ configure do
check_program "convert"
end
build do
main_env = Rscons::Environment.new do |env|
main_env = env do |env|
env["sources"] = glob("src/**/*.{c,d}", "libs/Derelict*/**/*.d")
env["CCFLAGS"] += %w[-Wall]
env["D_IMPORT_PATH"] += glob("src/**", "libs/Derelict*/source")
env["D_IMPORT_PATH"] += glob("src", "libs/Derelict*/source")
env["DFLAGS"] += %w[-Wall]
env["LIBS"] += %w[X11 GLX]
env.Program("jes", "${sources}")
@ -19,4 +18,3 @@ build do
env["DFLAGS"] += %w[-g -funittest]
env.Program("jestest", "${sources}")
end
end

31
rscons

File diff suppressed because one or more lines are too long

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");
}