<i id='2cn3D'><tr id='2cn3D'><dt id='2cn3D'><q id='2cn3D'><span id='2cn3D'><b id='2cn3D'><form id='2cn3D'><ins id='2cn3D'></ins><ul id='2cn3D'></ul><sub id='2cn3D'></sub></form><legend id='2cn3D'></legend><bdo id='2cn3D'><pre id='2cn3D'><center id='2cn3D'></center></pre></bdo></b><th id='2cn3D'></th></span></q></dt></tr></i><div id='2cn3D'><tfoot id='2cn3D'></tfoot><dl id='2cn3D'><fieldset id='2cn3D'></fieldset></dl></div>

        <bdo id='2cn3D'></bdo><ul id='2cn3D'></ul>
      <tfoot id='2cn3D'></tfoot>
      <legend id='2cn3D'><style id='2cn3D'><dir id='2cn3D'><q id='2cn3D'></q></dir></style></legend>

        <small id='2cn3D'></small><noframes id='2cn3D'>

      1. 双缓冲和 libgdx

        时间:2023-05-19

        <legend id='nnwpi'><style id='nnwpi'><dir id='nnwpi'><q id='nnwpi'></q></dir></style></legend>
          <tbody id='nnwpi'></tbody>

          <bdo id='nnwpi'></bdo><ul id='nnwpi'></ul>
        • <i id='nnwpi'><tr id='nnwpi'><dt id='nnwpi'><q id='nnwpi'><span id='nnwpi'><b id='nnwpi'><form id='nnwpi'><ins id='nnwpi'></ins><ul id='nnwpi'></ul><sub id='nnwpi'></sub></form><legend id='nnwpi'></legend><bdo id='nnwpi'><pre id='nnwpi'><center id='nnwpi'></center></pre></bdo></b><th id='nnwpi'></th></span></q></dt></tr></i><div id='nnwpi'><tfoot id='nnwpi'></tfoot><dl id='nnwpi'><fieldset id='nnwpi'></fieldset></dl></div>

                <small id='nnwpi'></small><noframes id='nnwpi'>

              • <tfoot id='nnwpi'></tfoot>
                  本文介绍了双缓冲和 libgdx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我在 libgdx 中有一个非常简单的应用程序.它目前应该用粉红色的纹理覆盖一半的屏幕.它确实做到了,但是纹理在闪烁.基于我自己对主题的理解,以及这个线程:LibGDX 闪烁我需要启用双缓冲.或者,写入我的缓冲区.问题是,要么我对 google 无能,要么很难找到任何关于如何在 libgdx 中操作缓冲区的信息.如果有人可以为我提供资源,解释如何操作缓冲区,以及如何创建缓冲区,如何将它们与当前显示交换等.我将非常感激.

                  I have a very simple application in libgdx. It currently is supposed to cover half of the screen with pink texture. And it does that, the texture however is blinking. Basing on my own understanding of subject, as well as this thread: LibGDX blinking I need to enable double buffering. Or alternatively, write to my buffer. The thing is, either I am inept with google or it's very difficult to find any information how to manipulate buffers in libgdx. If someone could provide me with resources, explaining how to manipulate buffers, and how to create one, how to swap them with current display etc. I would be very grateful.

                  在网上搜索了一些之后,我在 badlogic 论坛上找到了帖子,声称 libgdx 默认设置了双缓冲.问题是,它是如何工作的?缓冲区何时交换?

                  After searching the web some more, I found post on badlogic forum, claiming that libgdx has double buffering set by default. The question is, how does it work? When are the buffers swapped?

                  推荐答案

                  Libgdx 默认启用双缓冲(它实际上是底层 OpenGL 基础架构的一部分,而不是 Libgdx).我不认为 Libgdx 公开了对双缓冲的任何控制.有一些控件可以禁用垂直同步,这可能会造成一些撕裂,但不太可能相关.

                  Libgdx has double buffering enabled by default (its really part of the underlying OpenGL infrastructure, not Libgdx). I don't think Libgdx exposes any controls over double buffering. There are some controls to disable vsync which might create some tearing, but are unlikely to be related.

                  获得这种行为的更可能的方法是,如果您的 render 方法仅被调用一次.这将绘制到一个缓冲区中.然后,假设 render 已成为无操作,没有任何内容被绘制到另一个缓冲区中,它们被切换,没有任何内容被绘制到原始缓冲区中,它们被切换等等.这可能导致您看到的闪烁行为.

                  The more likely way to get this behavior is if, somehow, your render method is only invoked once. This will draw into one buffer. Then, assuming render has become a no-op, nothing is drawn into the other buffer, they're switched, nothing is drawn into the original buffer, they're switched, etc. This can lead to the blinking behavior you're seeing.

                  如果该猜测没有涵盖它,您将不得不提供更多详细信息.你在哪个平台上运行?您是在运行稳定版本的 Libgdx 还是每晚构建的版本之一?您如何设置 libgdx 应用程序配置?您的 render 方法实际上是什么样的?

                  If that guess doesn't cover it you'll have to provide more details. Which platform are you running on? Are you running a stable version of Libgdx or one of the nightly builds? How are you setting up the libgdx app configuration? What does your render method actually look like?

                  这篇关于双缓冲和 libgdx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:在 libgdx 中将纹理拆分为拼图 下一篇:Android Studio 3.1 构建失败,gradle 4.4 类签名者信息

                  相关文章

                  最新文章

                    <bdo id='QJn8u'></bdo><ul id='QJn8u'></ul>
                  1. <tfoot id='QJn8u'></tfoot>
                  2. <small id='QJn8u'></small><noframes id='QJn8u'>

                    <legend id='QJn8u'><style id='QJn8u'><dir id='QJn8u'><q id='QJn8u'></q></dir></style></legend>
                  3. <i id='QJn8u'><tr id='QJn8u'><dt id='QJn8u'><q id='QJn8u'><span id='QJn8u'><b id='QJn8u'><form id='QJn8u'><ins id='QJn8u'></ins><ul id='QJn8u'></ul><sub id='QJn8u'></sub></form><legend id='QJn8u'></legend><bdo id='QJn8u'><pre id='QJn8u'><center id='QJn8u'></center></pre></bdo></b><th id='QJn8u'></th></span></q></dt></tr></i><div id='QJn8u'><tfoot id='QJn8u'></tfoot><dl id='QJn8u'><fieldset id='QJn8u'></fieldset></dl></div>