summaryrefslogtreecommitdiff
path: root/drivers/gles3/rasterizer_gles3.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-10-10 18:31:01 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-10-10 18:31:01 -0300
commit1527cf8c0d17891dd0ebf99d484f83daa46eba3c (patch)
treea9a0fc5a00f8f57a973f2861d051b76f99642114 /drivers/gles3/rasterizer_gles3.cpp
parent850eaf7ed796d2f2d9a35c6bc4ba9a4e69f5ca1d (diff)
2D Shaders are working again using the new syntax, though all is buggy in general
Diffstat (limited to 'drivers/gles3/rasterizer_gles3.cpp')
-rw-r--r--drivers/gles3/rasterizer_gles3.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp
index 27b0690645..eaa9825605 100644
--- a/drivers/gles3/rasterizer_gles3.cpp
+++ b/drivers/gles3/rasterizer_gles3.cpp
@@ -115,8 +115,17 @@ void RasterizerGLES3::initialize() {
void RasterizerGLES3::begin_frame(){
+ double time_total = double(OS::get_singleton()->get_ticks_usec())/1000000.0;
+ storage->frame.time[0]=time_total;
+ storage->frame.time[1]=Math::fmod(time_total,3600);
+ storage->frame.time[2]=Math::fmod(time_total,900);
+ storage->frame.time[3]=Math::fmod(time_total,60);
+
+ storage->update_dirty_shaders();
+ storage->update_dirty_materials();
}
+
void RasterizerGLES3::set_current_render_target(RID p_render_target){
if (!p_render_target.is_valid() && storage->frame.current_rt && storage->frame.clear_request) {
@@ -257,6 +266,7 @@ RasterizerGLES3::RasterizerGLES3()
storage = memnew( RasterizerStorageGLES3 );
canvas = memnew( RasterizerCanvasGLES3 );
canvas->storage=storage;
+ storage->canvas=canvas;
}