You have to request sharing explicitly when calling eglCreateContext. There is a share_context argument.

Sent from my BlackBerry 10 smartphone on the Rogers network.
From: Shawn Zhang
Sent: Wednesday, June 19, 2013 19:57
To: opengles-graphics
Reply To: opengles-graphics@community.qnx.com
Subject: OpenGL es2.0 question

I am having issue running an OGL v2 render engine in different threads. The use case is that an app would generate two instances of my render engine (for bb maps). The render engine itself has a couple of singletons serving OpenGL thread running and providing shader programs for different views.

The problem occurs (error# 1281, invalid value) when SECOND render thread tries to use the same shader program object (served by a singleton) by calling glUseProgram().

So my question is, how does OGL v2.0 work with different render threads in the same app process space? Do I have to create seperate shader programs for different render thread?

Any help is greatly appreciated.
Shawn



_______________________________________________

OpenGL ES
http://community.qnx.com/sf/go/post102449
To cancel your subscription to this discussion, please e-mail opengles-graphics-unsubscribe@community.qnx.com