android - 如何创建 android.opengl.EGLContext 对象的实例?
问题描述
我有这个功能(取自 webRTC api):
public static EglBase createEgl14(
android.opengl.EGLContext sharedContext) {...}
所以我需要用android.opengl.EGLContext
. 我有上下文的句柄(长),但我找不到创建android.opengl.EGLContext
对象的方法
当我做:
new EGLContext(myContextHandle)
我收到
错误:EGLContext(long) 在 EGLContext 中不公开;无法从外部包访问
这是 EGLContext 的实现:
public class EGLContext extends EGLObjectHandle {
private EGLContext(long handle) {
super(handle);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof EGLContext)) return false;
EGLContext that = (EGLContext) o;
return getNativeHandle() == that.getNativeHandle();
}
}
解决方案
推荐阅读
- sql - 对具有不同时间的相同部件集合中最早的数据进行排序
- java - 如何创建连接管理器并以多种方式处理查询结果?(爪哇)
- android - 移动应用程序中的管理面板 || 如何添加和隐藏本地用户 || 反应原生 || 安卓
- vba - 如何应用粗体和项目符号?
- visual-studio - 调试不适用于带有 Visual Studio 的 docker compose
- reactjs - 如何处理未经授权的用户并将其重定向到 Reactjs 中的 403 页面
- wso2 - 如何更新 SAML WSO2 身份服务器
- r-markdown - r 脚本中的源 .Rmd
- sql-server - 即使连接条件匹配,第二个左外连接也不返回结果集中的行
- java - 具有相同性能的内循环(易碎)替代方案