简体   繁体   English

ARToolkit-在没有当前上下文的情况下调用OpenGL ES API

[英]ARToolkit - call to OpenGL ES API with no current context

Currently I'm working on ARSimpleNativeCars in ARToolKit4Android that release on 2012-03-09. 目前,我正在开发于2012-03-09发布的ARToolKit4Android中的ARSimpleNativeCars。 Before running the ARSimpleNativeCarsActivity class, I add in another menu class. 在运行ARSimpleNativeCarsActivity类之前,我添加了另一个菜单类。 In that class I start a new intent in a button: Intent myIntent = new Intent(Assignment_Main.this, ARSimpleNativeCarsActivity.class); 在该类中,我在按钮中启动新的意图:意图myIntent = new Intent(Assignment_Main.this,ARSimpleNativeCarsActivity.class); startActivity(myIntent); startActivity(myIntent);

The camera view is working fine but the model does not appear. 相机视图工作正常,但未出现模型。 When I check my logcat, there is an error, call to OpenGL ES API with no current context. 当我检查logcat时,出现错误,请在没有当前上下文的情况下调用OpenGL ES API。

But if I run the ARSimpleNativeCarsActivity class directly then is working. 但是,如果我直接运行ARSimpleNativeCarsActivity类,则可以正常工作。

You might want to check the update to ARToolKit for Android released 2012-12-06, which includes a fix for an issue which might be affecting you. 您可能要检查2012年12月6日发布的Android版ARToolKit的更新,其中包括针对可能会影响您的问题的修复程序。 The release notes say: 发行说明说:

A problem with texture loading when using Wavefront .obj models in the Android examples has been fixed. 修复了在Android示例中使用Wavefront .obj模型时纹理加载的问题。 Now, a new function glmReadOBJ2 delays loading and submission of the textures until the model is ready to be drawn. 现在,新功能glmReadOBJ2延迟了纹理的加载和提交,直到准备好绘制模型为止。 Previously, texture loading was performed when the model was loaded, and typically no OpenGL context would be valid at that point. 以前,纹理加载是在加载模型时执行的,并且此时通常没有OpenGL上下文有效。

In other words, initialising the native code portion in the application, including model loading, was failing because textures were being loaded without a valid OpenGL context. 换句话说,初始化应用程序中的本机代码部分(包括模型加载)失败,因为在没有有效OpenGL上下文的情况下加载了纹理。 The code now implements lazy loading of textures. 该代码现在实现了纹理的延迟加载。 You might be seeing the same problem. 您可能会遇到相同的问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在没有当前上下文的情况下调用OpenGL ES API - Call to OpenGL ES API with no current context 没有当前上下文的opengl es api - opengl es api with no current context 为什么我“在没有当前上下文的情况下调用OpenGL ES API”? - Why am I getting “call to OpenGL ES API with no current context”? 在Android中使用imageloader时“在没有当前上下文的情况下调用OpenGL ES API” - “call to OpenGL ES API with no current context” while using imageloader in android 调用没有当前上下文的OpenGL ES API(每个线程记录一次) - call to OpenGL ES API with no current context (logged once per thread) 错误/libEGL(206):在没有当前上下文的情况下调用 OpenGL ES API - ERROR/libEGL(206): call to OpenGL ES API with no current context 在没有当前上下文的情况下调用OpenGL ES API(每个线程记录一次)-OpenGL ES - call to OpenGL ES API with no current context (logged once per thread) - OpenGL ES 处理和“没有当前上下文的OpenGL ES API” - Processing and “OpenGL ES API with no current context” Android NDK OpenGL glDeleteTextures导致错误:在没有当前上下文的情况下调用OpenGL ES API - Android NDK OpenGL glDeleteTextures causes error: call to OpenGL ES API with no current context E / libEGL:调用OpenGL ES API,没有当前上下文(每个线程记录一次) - Android / SDL - E/libEGL: call to OpenGL ES API with no current context (logged once per thread) - Android/SDL
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM