使用OpenGL时fps太慢了 [英] fps too slow when using OpenGL

查看:346
本文介绍了使用OpenGL时fps太慢了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前正在使用WINEC 7和Visual Studio 2008使用Silverlight和OpenGL(类似于示波器)开发图形界面。正弦波在5-7之间,图形太慢,性能不好。我们
找到了这个链接:
https://msdn.microsoft.com/en -us / library / jj919254.aspx
关于如何针对图形性能优化硬件,BSP或驱动程序,但我们坚持如何将Shaders编译器添加到我们的项目中。我们是否需要包含 和"defaulteffect.fs.glsl"。
和"defaulteffect.vs.glsl"我们的OS?如果他们首先在操作系统中注册,我们该如何做?

We are currently developing a graphing interface using Silverlight and OpenGL (similar to an oscilloscope) using WINEC 7 and Visual Studio 2008. The fps during graphing of a sine wave is between 5-7 and graphing is too slow and performance is not good. We found this link: https://msdn.microsoft.com/en-us/library/jj919254.aspx on how to optimize the hardware, BSP or drivers for graphing performance but we stuck on how to add the Shaders compiler to our project. Do we need to include and "defaulteffect.fs.glsl" and "defaulteffect.vs.glsl" our OS? Should them first be registered in the OS and how can we do this?

谢谢,

DavidL

推荐答案

嗨大卫,

Compact 7的发行说明包含以下详细信息,我怀疑您遇到了我强调的文字所指出的问题:

此版本支持Silverlight for Windows Embedded的OpenGL渲染插件。要启用该插件,BSP必须将BSP_XRPLUGIN_OPENGL环境变量设置为1,并且OEM必须将SYSGEN_XAML_RUNTIME变量设置为1.

This release supports the OpenGL rendering plug-in for Silverlight for Windows Embedded. To enable the plug-in, the BSP must have the BSP_XRPLUGIN_OPENGL environment variable set to 1 and the OEM must set the SYSGEN_XAML_RUNTIME variable to 1.

支持Silverlight for Windows中的OpenGL ES硬件加速嵌入式,您的主板支持包(BSP)必须包含OpenGL ES 2.0驱动程序,简单的顶点着色器和简单的片段着色器。  Silverlight使用这些着色器在屏幕上绘制纹理化的
矩形。您可以在%_WINCEROOT%\public\COMMON \oak \ xamlrenderplugin \OpenGL \Shaders中找到这些着色器的示例代码。

To support OpenGL ES hardware acceleration in Silverlight for Windows Embedded, your board support package (BSP) must contain OpenGL ES 2.0 drivers, a simple vertex shader, and a simple fragment shader.  Silverlight uses these shaders to draw textured rectangles on the screen. You can find sample code for these shaders in %_WINCEROOT%\public\COMMON\oak\xamlrenderplugin\OpenGL\Shaders.

必须编译顶点和片段着色器用于平台的图形处理单元(GPU)并链接到名为Shaders.dll的文件中。 
此版本不包含命令行着色器编译器。如果操作系统找不到平台GPU的Shaders.dll库,它会尝试在运行时编译默认着色器。 但是,许多OpenGL驱动程序
不支持运行时编译,并且在运行时编译着色器可能会导致性能不佳。
 有关为目标GPU编译着色器的说明,请咨询硬件提供商

The vertex and fragment shaders must be compiled for the platform's graphics processing unit (GPU) and linked into a file named Shaders.dll.  This release does not include a command-line shader compiler. If the OS cannot find the Shaders.dll library for the platform’s GPU, it tries to compile the default shaders at run time.  However, many OpenGL drivers do not support run-time compilation, and compiling the shaders at run time can result in poor performance.  Consult your hardware provider for instructions on compiling shaders for the target GPU

您需要创建一个shader.dll以匹配您的硬件平台。 如上所述,请与您的硬件提供商合作以获得相应的工具。

此致,IoTGirl


这篇关于使用OpenGL时fps太慢了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆