基于OpenGL ES的桌面上硬件加速的OpenVG实现 [英] Hardware-accelerated OpenVG implementation on Desktop based on OpenGL ES

查看:324
本文介绍了基于OpenGL ES的桌面上硬件加速的OpenVG实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试启动OpenVG并在我的桌面上运行.问题来了:我正在/将要为Windows CE设备(带有.NET Compact Framework)开发应用程序,该设备具有硬件加速的OpenGL ES 2.0和OpenVG 1.0.1(如果您有兴趣,则基于TI OMAP35x) ).该应用程序肯定会使用OpenVG进行绘制,如果OpenVG不提供这些功能(即模糊),则可能会使用OpenGL进行某些效果.

I'm currently trying to get OpenVG up and running on my desktop. The problem comes here: I am / will be developing an application for a Windows CE device (with .NET compact framework), which has hardware-accelerated OpenGL ES 2.0 and OpenVG 1.0.1 (based on TI OMAP35x, if you're interested). The application will definitely use OpenVG for drawing, and likely OpenGL for some effects if OpenVG doesn't offer them (i.e. blur).

现在,我想在没有模拟器的情况下在桌面上进行开发(请参见不同命名的DLL和入口点.哦,我导入了EGL 1.3,它也很容易转换为面向对象的API.

Now I'd like to develop on my desktop without the emulator (see this question). So I thought I just import OpenVG with P/Invoke, which was quite easy, since the OpenVG people made their constants into real enums, and though a procedural C API, it translated very well into an object-oriented form (with a Graphics class for drawing and Path, Paint, Stroke and Image objects). I also managed to get going with differently named DLLs and entry points. Oh, and I imported EGL 1.3, also quite easy to translate to an object-oriented API.

到目前为止,听起来还不错.我以为我只会使用Khronos的OpenVG参考实现,但是它很慢.真的很慢您知道,就像清理表面只花了一个 second 一样!所以我想,好吧,OpenVG是一个标准,我将采用其他实现之一.他们大多数是基于OpenGL的,这就是我想要的.是不是?

Until this point, it sounded quite good. I thought I'd just use the OpenVG reference implementation from Khronos, but it is slow. Really slow. You know, like clearing the surface taking literally a second! So I thought, fine, OpenVG is a standard, I'll just take one of the other implementations. Most of them are based on OpenGL, which is what I want. Or isn't it?

不,不是.使用EGL 1.3(随OpenGL ES 2.0的PowerVR Windows Emulation SDK提供)创建OpenGL ES 2.0表面与我尝试过的任何OpenVG实施都不兼容.其中一些需要传统的OpenGL(AmanithVG GLE),PowerVR提供的EGL版本不支持OpenVG.大多数实现甚至没有EGL,并且使用一些奇怪的函数来初始化上下文-所有这些都假定已经创建了OpenGL上下文. OpenGL,而不是OpenGL ES.叹气.

No, it's not. Creating an OpenGL ES 2.0 surface with EGL 1.3 (supplied with the PowerVR Windows Emulation SDK for OpenGL ES 2.0) is not compatible with any OpenVG implementation I tried. Some of them require traditional OpenGL (AmanithVG GLE), the EGL version supplied by PowerVR doesn't support OpenVG. Most implementations don't even have EGL and use some bizarre functions to initialize the context - all of them assuming that an OpenGL context has already been created. OpenGL, not OpenGL ES. Sigh.

我唯一可以工作的是AmanithVG SRE,它对于软件实现非常快,并且不依赖OpenGL或EGL.它可以工作,但是对于实时动画来说仍然太慢了.

The only one I could get to work was AmanithVG SRE, which is very fast for a software implementation and does not rely on OpenGL or EGL. It works, but it is still far too slow for real time animations.

我不敢相信这些事情感觉如此不对劲.我真的很想只使用WindowsMo​​bile.DirectX.Direct3D,PowerVR为此提供了用于桌面Windows的仿真层,希望最终的Board Support Package可以将Direct3D作为OpenGL ES包装提供,就像在许多产品上一样设备.

I can't believe that these things feel so wrong. I'm really tempted to just use WindowsMobile.DirectX.Direct3D, for which PowerVR supplies an emulation layer for Desktop Windows, in the hope that the final Board Support Package will supply Direct3D as an OpenGL ES wrapper, like it seems to be on many devices.

最后一个问题是

是否有适用于OpenGL ES 2.0的Windows桌面系统的OpenVG实施?如果可以在PowerVR的OpenGL ES 2.0仿真和随附的EGL 1.3中正常运行,则可以获得额外的奖励.

Is there any OpenVG implementation for Windows Desktop systems that works with OpenGL ES 2.0? Bonus points if it works smoothly with PowerVR's OpenGL ES 2.0 emulation and the supplied EGL 1.3.

还是我应该尝试在桌面上使用传统的OpenGL 2.0实现?但是他们通常也不提供EGL.我不想有两个初始化层(EGL和WGL).还是我应该?

Or should I just try to use a traditional OpenGL 2.0 implementation on the Desktop? But they're typically not supplying EGL as well. I don't want to have two initialization layers (EGL and WGL). Or should I?

注意:这不是.NET问题,因为没有.NET时,问题是完全相同的.

Note: this is not a .NET question, because the problem is the very same without .NET.

推荐答案

在寻找针对我遇到的另一个问题的解决方案时,我从该站点找到了适用于OpenGLES 2.0和其他版本的封闭式OpenGL ES仿真器.

I found a closed source OpenGL ES emulator for OpenGLES 2.0 and other versions from this site while searching for a solution to another problem I had:

http://www.malideveloper.com/developer-resources/tools/opengl-es-20-emulator.php

它是封闭源代码,但是您似乎可以将其用于开发目的.

Its closed source but it appears you can use it for your development purposes.

除此之外,您可以编写自己的抽象层,该抽象层可以在OpenGL和OpenGL ES之间切换-我在搜索中找不到可用的抽象层.如果找到一个,请告诉我,因为这就是我要做的事情.

Other then that, you could write your own abstraction layer that can switch between OpenGL and OpenGL ES -- I couldn't find one available from my searches. If you find one, let me know because that is what I am trying to do.

这篇关于基于OpenGL ES的桌面上硬件加速的OpenVG实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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