Compare commits

..

No commits in common. "1252ed7879e008719eb55b03a8634f588c90027c" and "6f32d3f2fe6d2a8f37b2c70f1c44f32566abccca" have entirely different histories.

6 changed files with 22 additions and 46 deletions

View File

@ -6,15 +6,17 @@ configure do
check_program "convert" check_program "convert"
end end
main_env = env do |env| build do
main_env = Rscons::Environment.new do |env|
env["sources"] = glob("src/**/*.{c,d}", "libs/Derelict*/**/*.d") env["sources"] = glob("src/**/*.{c,d}", "libs/Derelict*/**/*.d")
env["CCFLAGS"] += %w[-Wall] 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["DFLAGS"] += %w[-Wall]
env["LIBS"] += %w[X11 GLX] env["LIBS"] += %w[X11 GLX]
env.Program("jes", "${sources}") env.Program("jes", "${sources}")
end end
main_env.clone do |env| main_env.clone do |env|
env["DFLAGS"] += %w[-g -funittest] env["DFLAGS"] += %w[-g -funittest]
env.Program("jestest", "${sources}") env.Program("jestest", "${sources}")
end
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) static if ((i % 2) == 0)
{ {
mixin("void set_" ~ v ~ "(" ~ uniform_param_decl_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]) ~ ");" ~ " glUniform" ~ uniforms[i + 1] ~ "(m_uniform_" ~ v ~ ", " ~ uniform_param_list(uniforms[i + 1]) ~ ");"
"}"); "}");
} }
} }

View File

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

View File

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

View File

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