[C#]在Windows应用商店中使用OpenGL和C#进行图形渲染 [英] [C#]Using OpenGL and C# for graphics rendering in Windows store app

查看:108
本文介绍了[C#]在Windows应用商店中使用OpenGL和C#进行图形渲染的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用C#和XAML开发Windows应用商店应用。部分开发是使用OpenGL渲染图形。  我们做了一些研究,发现DirectX和C ++是可行的方法,但我们真的希望继续使用C#和OpenGL,如果可能的话。
原因是, 


1。其余的应用程序是用C#编写的。


2。适用于iOS和Android平台的应用程序使用OpenGL。 


我们还发现了可以将OpenGL转换为DirectX的ANGLE,但它也是使用C ++。 


我的问题是,我们可以在商店应用中同时使用C#和OpenGL吗?如果是这样怎么办?如果这是不可能的,我们想继续使用C#我们有什么选择?


谢谢Josh。 

解决方案


嗨Josh,



如下面的话题所述,ANGLE目前让OpenGL API在UWP中运行的唯一方法。 

https://social.msdn.microsoft.com/Forums/en-US/ae97534f-8f48-4bf9-ae7e-2c7a12e75190/uwp-opengl -in-c?forum = wpdevelop

请同时参考以下github问题,您将在C#中使用P / Invoke for OpenGL找到XAML SwapChainPanel示例。

https://github.com/Microsoft/angle/issues/89  



最好的问候,

David


We are developing a Windows store app using C# and XAML. Part of the development is using OpenGL to render graphics.  We did some research and found DirectX and C++ is the way to go, but we really want stay with C# and OpenGL if it's possile. The reason is, 

1. The rest of application is written in C#.

2. The app for iOS and Android platforms uses OpenGL. 

We also found ANGLE which can convert OpenGL to DirectX, but it's also in C++. 

My question is, can we use both C# and OpenGL in store app? If so how to do it? If it's impossible and we want to stay with C# what are our options?

Thanks Josh. 

解决方案

Hi Josh,

As discussed in the following thread, ANGLE is currently the only way to get the OpenGL API to run in UWP. 
https://social.msdn.microsoft.com/Forums/en-US/ae97534f-8f48-4bf9-ae7e-2c7a12e75190/uwp-opengl-in-c?forum=wpdevelop
Please also refer to the following github issue and you will find the XAML SwapChainPanel sample in C# using P/Invoke for OpenGL.
https://github.com/Microsoft/angle/issues/89 

Best Regards,
David


这篇关于[C#]在Windows应用商店中使用OpenGL和C#进行图形渲染的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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