fps too slow when using OpenGL RRS feed

  • Question

  • Hi,

    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: 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?



    Tuesday, May 12, 2015 1:38 PM

All replies

  • Hi David,

    The release notes for Compact 7 contain the following details and I suspect you are hitting the issue identified by the text I have underlined:

    OpenGL Rendering Plug-in

    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.

    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.

    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

    You will need to create a shader.dll to match your hardware platform.  As indicated above, please work with your hardware provider to get the appropriate tooling.

    Sincerely, IoTGirl

    Tuesday, May 12, 2015 8:51 PM
  • Hi IoTGirl,<o:p></o:p>

    Thank you for your answer. I contacted the supplier for my BSP regarding the Shaders compiler and how I can create a Shaders.dll that matches my hardware but still waiting for an answer.

    The BSP_XRPLUGIN_OPENGL environment variable set to 1 and SYSGEN_XAML_RUNTIME set to 1. I selected the OpenGL ES 2.0 drivers from the Catalog Items of the BSP.

    How can I link vertex and fragment shaders to Shaders.dll?

    Our major problem is that the graphing is not smooth, a little shaky, and the overall respond of the system is
    too slow. We installed the Microsoft patches for WINCE 7 from April 2013 to January 2015. By changing the UI and rendering thread priorities on OpenGLDevice.cpp to
    m_UIThreadPriority(3),m_RenderThreadPriority(0), m_RenderThreadQuantum(0) we experience big improvement in the overall performance but more needs to be done.



    • Edited by DavidL83 Thursday, May 14, 2015 1:25 PM
    Thursday, May 14, 2015 1:23 PM
  • Hi David,

    As noted above, Consult your hardware provider for instructions on compiling shaders for the target GPU. I hope your BSP provider has gotten back to you.  Once you have these available, you should replace the sample code in %_WINCEROOT%\public\COMMON\oak\xamlrenderplugin\OpenGL\Shaders.



    Monday, June 1, 2015 6:20 PM