summaryrefslogtreecommitdiff
path: root/drivers/gles3/rasterizer_gles3.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-10-19 11:14:41 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-10-19 11:14:41 -0300
commit4428115916144b45c4697cd65d9c8c093631bec6 (patch)
treeafff5350ae57ba65b190f16b27db892173d9f43f /drivers/gles3/rasterizer_gles3.cpp
parent1527cf8c0d17891dd0ebf99d484f83daa46eba3c (diff)
Everything returning to normal in 3D, still a long way to go
-implemented the scene part of visual server and rasterizer, objects without lighting and material are rendererd only
Diffstat (limited to 'drivers/gles3/rasterizer_gles3.cpp')
-rw-r--r--drivers/gles3/rasterizer_gles3.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp
index eaa9825605..83c40edc1d 100644
--- a/drivers/gles3/rasterizer_gles3.cpp
+++ b/drivers/gles3/rasterizer_gles3.cpp
@@ -15,7 +15,7 @@ RasterizerCanvas *RasterizerGLES3::get_canvas() {
RasterizerScene *RasterizerGLES3::get_scene() {
- return NULL;
+ return scene;
}
@@ -111,6 +111,7 @@ void RasterizerGLES3::initialize() {
*/
storage->initialize();
canvas->initialize();
+ scene->initialize();
}
void RasterizerGLES3::begin_frame(){
@@ -124,6 +125,7 @@ void RasterizerGLES3::begin_frame(){
storage->update_dirty_shaders();
storage->update_dirty_materials();
+
}
void RasterizerGLES3::set_current_render_target(RID p_render_target){
@@ -131,6 +133,7 @@ void RasterizerGLES3::set_current_render_target(RID p_render_target){
if (!p_render_target.is_valid() && storage->frame.current_rt && storage->frame.clear_request) {
//handle pending clear request, if the framebuffer was not cleared
glBindFramebuffer(GL_FRAMEBUFFER,storage->frame.current_rt->front.fbo);
+ print_line("unbind clear of: "+storage->frame.clear_request_color);
glClearColor(
storage->frame.clear_request_color.r,
storage->frame.clear_request_color.g,
@@ -265,8 +268,12 @@ RasterizerGLES3::RasterizerGLES3()
storage = memnew( RasterizerStorageGLES3 );
canvas = memnew( RasterizerCanvasGLES3 );
+ scene = memnew( RasterizerSceneGLES3 );
canvas->storage=storage;
storage->canvas=canvas;
+ scene->storage=storage;
+ storage->scene=scene;
+
}