From 5dc02729905e0d6dcedf64c1867d6b87abe73006 Mon Sep 17 00:00:00 2001 From: rachytski Date: Tue, 14 Dec 2010 21:10:57 +0200 Subject: [PATCH] "trash-texture" fix. --- data/results.unicode | Bin 12694 -> 0 bytes map/render_queue_routine.cpp | 8 ++--- yg/base_texture.hpp | 2 ++ yg/glyph_cache.cpp | 2 +- yg/renderer.cpp | 17 +++++++++-- yg/renderer.hpp | 4 +++ yg/texture.hpp | 56 ++++++++++++++++++++++++++++++----- 7 files changed, 73 insertions(+), 16 deletions(-) delete mode 100644 data/results.unicode diff --git a/data/results.unicode b/data/results.unicode deleted file mode 100644 index 561700728c12c932d3a9b29f9d3055957c11a08c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12694 zcmWNXhhI_)1BTC$1IjuQSTsqSR$8ZR+jcfUh5~`0C_@FsJ#pY(iKaNST~_XqBQ&)T zEw^d)wQu{j=dF7yKmUsN_dd@v@y8ml0pz*b-z;0SC7b^tqpUBGT&53m>52RH%yfdjxn z;1ECu7=Sat1XutY-~cXwE5HSK03SFE2mm4A28aML;0|~I62KGi0;GTpkOK<98}I>q z0VSXU`~ZJI4FmvzKoAfNgaDyH7!VFb0Fgix5DjR67$6?d0tr9{paXINJ#Y*t15N-Z zfm6U~;0$mUI0u{u%7F{OMc@)p2~+{qKn+j})B*KC1JDRu2AY5tpcS|R7=U)*D$oIR z0$sp0;5uLgx&af=1M~tnfSW)c&<_j%gTN3l42%Gyz%5`57zb_xcYwRV|A70z1K=U> z2zU%U0saD>0?&Zwzzg6d@CtYh{0+PT-U9D{_rM3>Bk&3M4158;0^fk|zz^Uj@GtNm z@C*12`~fBa00coZ5CuXY8pMF+paqBpaUdQffJ6`mEkP1E1tfzMa4I+rq=M7I8Q@HC z7C0N61Jb~`pfzX%&I9Lz3&BO;VsHt#6kG<{gUi7cAOfxgSA%Q7wct8%J?H>#05^i0 zz|G(ma4YBtZU=XOJHcJxZg3B{7u*LP01twPKnCaxGC>x|23v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k2N*|f#vXxe2u zXgXwKns}yQQ-~?t6m3d0C7Du8sirhjy6K2XXUZ|rNOeamJO=nFNCWGm!sngVB z>N7o?46eZ*sK=rQ*F)-=(nIN)+B3UnPLFlZf*!jbhn~$n>Yjj};GU$OjGoM%$34$_ ze)atB0eYccLhqDbWv{w7xHq*otv9n**IU?othb}Lv-f&$Pw!CgaPMgESnvOO@Ap3F zecSt~*Knil#_)}OH=S2v7Y)VHN?Yu~QE-F=)s_dc(_!oH%u z(!LXY<$V|WF7;LRHS{(28Ty9$ZuMF8WBUpHr2bj`bNcQ2h5h0EdHwnQh5e=dXZkPn z*Yx-Gzv_nutOslc<_)YJ;0*`|+y^`c6a&5ks)68v@PX)o!~xwv-az5NiGkAtX9u1Q zyc&2r@O9wZz&``PAT($(NEze|@&<*2UW49)>cQZ_%)y$$>w}L6pAEhm{5be)GDn|2 zw06j0X!DTs5N}91q#g<$Ix|#0)G*XE)H2jD)H!s0sAs5mXlQ77Xl&^I(1W2*lflKx z;Wfh!!;Zt-hj$L|9zHmHXxMp}Gb|i-8$L07a`?<}`Ebo}?Qs2Y^257)ClqdPY8ud>Z*W@?$cDM~@OliKC=ZtI^q`b4G1OZAX`k+KnQkn?|>c zMvumgCXQx~7LFE;mX4knEg!u!S~=P<+B|xFw0Cr9^zG=o(T}5FM}Liiw}iLCZ$;mV zyOnw?<5t$KzFV(uL1PwUgt5(ITgDv6c8xK|cw_uA;h6iFV$6HYcT6=FJQgw*K9)F^ zGL|-`8#_DJGuAuSH#RhOXYAhCgRy60&&OVky&VI`p>d1xDdSVeXOBCKZy4V^?l``0 z+-dyKIA`2toHs5UmyUanCyZx~XN~K|kB^@mFCV`?-ZS1e{&@V^_^WK{#dncSG R4ouJ|SQDZN>BR4e{{ysm_backBuffer = make_shared_ptr(new yg::gl::RawRGBA8Texture(texW, texH)); m_renderState->m_depthBuffer.reset(); - m_renderState->m_depthBuffer = make_shared_ptr(new yg::gl::RenderBuffer(texW, texH, true)); if (!m_isMultiSampled) - m_threadDrawer->screen()->setRenderTarget(m_renderState->m_backBuffer); - - m_threadDrawer->screen()->frameBuffer()->setDepthBuffer(m_renderState->m_depthBuffer); + { + m_renderState->m_depthBuffer = make_shared_ptr(new yg::gl::RenderBuffer(texW, texH, true)); + m_threadDrawer->screen()->frameBuffer()->setDepthBuffer(m_renderState->m_depthBuffer); + } m_threadDrawer->onSize(texW, texH); diff --git a/yg/base_texture.hpp b/yg/base_texture.hpp index a028060a90..8b3ffb7ab3 100644 --- a/yg/base_texture.hpp +++ b/yg/base_texture.hpp @@ -6,6 +6,7 @@ namespace yg { + class Color; namespace gl { class BaseTexture : public RenderTarget @@ -39,6 +40,7 @@ namespace yg m2::RectF const mapRect(m2::RectF const & r) const; void mapPixel(float & x, float & y) const; + virtual void fill(yg::Color const & c) = 0; virtual void dump(char const * fileName) = 0; static unsigned current(); diff --git a/yg/glyph_cache.cpp b/yg/glyph_cache.cpp index 4ff657b1f3..ee4f39dbf4 100644 --- a/yg/glyph_cache.cpp +++ b/yg/glyph_cache.cpp @@ -80,7 +80,7 @@ namespace yg { FTCHECK(FT_Init_FreeType(&m_impl->m_lib)); FTCHECK(FT_Stroker_New(m_impl->m_lib, &m_impl->m_stroker)); - FT_Stroker_Set(m_impl->m_stroker, 3 * 64, FT_STROKER_LINECAP_ROUND, FT_STROKER_LINEJOIN_ROUND, 0); + FT_Stroker_Set(m_impl->m_stroker, 2 * 64, FT_STROKER_LINECAP_ROUND, FT_STROKER_LINEJOIN_ROUND, 0); } GlyphCache::~GlyphCache() diff --git a/yg/renderer.cpp b/yg/renderer.cpp index 2047b99687..2cac044986 100644 --- a/yg/renderer.cpp +++ b/yg/renderer.cpp @@ -10,13 +10,14 @@ namespace yg { namespace gl { - Renderer::Renderer() : m_isMultiSampled(false) + Renderer::Renderer() : m_isMultiSampled(false), m_isRendering(false) { m_multiSampledFrameBuffer = make_shared_ptr(new FrameBuffer()); } void Renderer::beginFrame() { + m_isRendering = true; if (m_isMultiSampled) m_multiSampledFrameBuffer->makeCurrent(); else @@ -24,10 +25,16 @@ namespace yg m_frameBuffer->makeCurrent(); } + bool Renderer::isRendering() const + { + return m_isRendering; + } + void Renderer::endFrame() { // if (m_isMultiSampled) updateFrameBuffer(); + m_isRendering = false; } shared_ptr const & Renderer::frameBuffer() const @@ -52,10 +59,11 @@ namespace yg void Renderer::setRenderTarget(shared_ptr const & rt) { - updateFrameBuffer(); + if (isRendering()) + updateFrameBuffer(); m_frameBuffer->setRenderTarget(rt); - m_frameBuffer->makeCurrent(); + m_frameBuffer->makeCurrent(); //< to attach renderTarget if (m_isMultiSampled) m_multiSampledFrameBuffer->makeCurrent(); @@ -74,6 +82,9 @@ namespace yg OGLCHECK(glBindFramebufferOES(GL_DRAW_FRAMEBUFFER_APPLE, m_multiSampledFrameBuffer->id())); #else + /// Somehow this does the trick with the "trash-texture" upon first application redraw. + m_multiSampledFrameBuffer->makeCurrent(); + OGLCHECK(glBindFramebuffer(GL_READ_FRAMEBUFFER, m_multiSampledFrameBuffer->id())); OGLCHECK(glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_frameBuffer->id())); OGLCHECK(glBlitFramebuffer(0, 0, width(), height(), diff --git a/yg/renderer.hpp b/yg/renderer.hpp index 02d02b450a..daefbd386c 100644 --- a/yg/renderer.hpp +++ b/yg/renderer.hpp @@ -25,6 +25,8 @@ namespace yg bool m_isMultiSampled; + bool m_isRendering; + unsigned int m_width; unsigned int m_height; @@ -35,6 +37,8 @@ namespace yg void beginFrame(); void endFrame(); + bool isRendering() const; + void setIsMultiSampled(bool isMultiSampled); bool isMultiSampled() const; diff --git a/yg/texture.hpp b/yg/texture.hpp index 12684ff546..3faa0c7ebb 100644 --- a/yg/texture.hpp +++ b/yg/texture.hpp @@ -65,7 +65,45 @@ namespace yg upload(0); } - void dump(char const *){} + void fill(yg::Color const & c) + { + makeCurrent(); + + typename Traits::image_t image(width(), height()); + + typename Traits::pixel_t val((c.r / 255.0f) * Traits::maxChannelVal, + (c.g / 255.0f) * Traits::maxChannelVal, + (c.b / 255.0f) * Traits::maxChannelVal, + (c.a / 255.0f) * Traits::maxChannelVal); + + typename Traits::view_t v = gil::view(image); + + for (size_t y = 0; y < height(); ++y) + for (size_t x = 0; x < width(); ++x) + v(x, y) = val; + + upload(&v(0, 0)); + } + + void dump(char const * fileName) + { + makeCurrent(); + std::string const fullPath = GetPlatform().WritablePathForFile(fileName); + + typename Traits::image_t image(width(), height()); + +#ifndef OMIM_GL_ES + OGLCHECK(glGetTexImage( + GL_TEXTURE_2D, + 0, + GL_RGBA, + Traits::gl_pixel_data_type, + &gil::view(image)(0, 0))); + boost::gil::lodepng_write_view(fullPath.c_str(), gil::view(image)); +#endif + + + } }; template @@ -215,27 +253,29 @@ namespace yg template void Texture::readback() { -/* makeCurrent(); + makeCurrent(); #ifndef OMIM_GL_ES OGLCHECK(glGetTexImage( GL_TEXTURE_2D, 0, GL_RGBA, Traits::gl_pixel_data_type, - &gil::view(m_image)(0, 0))); + &view(width(), height())(0, 0))); #else ASSERT(false, ("no glGetTexImage function in OpenGL ES")); -#endif*/ +#endif } template - void Texture::dump(char const * /*fileName*/) + void Texture::dump(char const * fileName) { -/* readback(); + lock(); + readback(); std::string const fullPath = GetPlatform().WritablePathForFile(fileName); #ifndef OMIM_GL_ES - boost::gil::lodepng_write_view(fullPath.c_str(), gil::const_view(m_image)); -#endif*/ + boost::gil::lodepng_write_view(fullPath.c_str(), view(width(), height())); +#endif + unlock(); } template