diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-11-12 11:23:23 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-11-12 11:23:23 -0300 |
commit | 6dd8768811cfca5bb831619d93cf870e5d20667f (patch) | |
tree | 9e8837b7c8334855a1bce1bd79ab441edde28129 /drivers/gles2 | |
parent | c8cd5222a7fa931f072e02b23c5b9d826d0ef548 (diff) |
3D Import Import & UDP
-=-=-=-=-=-=-=-=-=-=-
-Animation Import filter support
-Animation Clip import support
-Animation Optimizer Fixes, Improvements and Visibile Options
-Extremely Experimental UDP support.
Diffstat (limited to 'drivers/gles2')
-rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index 4044496953..bc1b17eade 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -4173,6 +4173,9 @@ void RasterizerGLES2::capture_viewport(Image* r_capture) { pixels.resize(viewport.width*viewport.height*4); DVector<uint8_t>::Write w = pixels.write(); glPixelStorei(GL_PACK_ALIGNMENT, 4); + + uint64_t time = OS::get_singleton()->get_ticks_usec(); + if (current_rt) { #ifdef GLEW_ENABLED glReadBuffer(GL_COLOR_ATTACHMENT0); @@ -4182,11 +4185,13 @@ void RasterizerGLES2::capture_viewport(Image* r_capture) { // back? glReadPixels( viewport.x, window_size.height-(viewport.height+viewport.y), viewport.width,viewport.height,GL_RGBA,GL_UNSIGNED_BYTE,w.ptr()); } + printf("readpixels time %i\n", (int)(OS::get_singleton()->get_ticks_usec() - time)); w=DVector<uint8_t>::Write(); r_capture->create(viewport.width,viewport.height,0,Image::FORMAT_RGBA,pixels); r_capture->flip_y(); + printf("total time %i\n", (int)(OS::get_singleton()->get_ticks_usec() - time)); #endif |