Compare commits
2 Commits
6f32d3f2fe
...
1252ed7879
Author | SHA1 | Date | |
---|---|---|---|
1252ed7879 | |||
c9650aada7 |
10
Rsconscript
10
Rsconscript
@ -6,17 +6,15 @@ configure do
|
|||||||
check_program "convert"
|
check_program "convert"
|
||||||
end
|
end
|
||||||
|
|
||||||
build do
|
main_env = env do |env|
|
||||||
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
|
||||||
|
@ -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]) ~ ");" ~
|
||||||
"}");
|
"}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ class Gui
|
|||||||
{
|
{
|
||||||
this()
|
this()
|
||||||
{
|
{
|
||||||
if (!jtk.init())
|
if (!jtk.initialize())
|
||||||
{
|
{
|
||||||
throw new Exception("JTK initialization failed.");
|
throw new Exception("JTK initialization failed.");
|
||||||
}
|
}
|
||||||
|
@ -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 init()
|
bool initialize()
|
||||||
{
|
{
|
||||||
DerelictGL3.load();
|
DerelictGL3.load();
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ 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;
|
||||||
|
|
||||||
@ -71,7 +72,7 @@ class Window
|
|||||||
{
|
{
|
||||||
return windows_by_id[window_id];
|
return windows_by_id[window_id];
|
||||||
}
|
}
|
||||||
catch (core.exception.RangeError re)
|
catch (RangeError re)
|
||||||
{
|
{
|
||||||
throw new Exception("Could not find requested JTK window ID");
|
throw new Exception("Could not find requested JTK window ID");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user