Hi,all
I want to develop a display XR subsystem ,and run sample downloaded from [link text][1] correctly.
But get black screen when change code from
`
uDesc.color.nativePtr = (void*)kUnityXRRenderTextureIdDontCare;
` into
`
GLuint mTexId;
glGenTextures(1, &mTexId);
glBindTexture(GL_TEXTURE_2D, mTexId);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texWidth, texHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
glBindTexture(GL_TEXTURE_2D, 0);
uDesc.color.nativePtr = (void*)(&mTexId);
`
So how to use opengles texture in Unity display subsystem?
[1]: https://create.unity3d.com/thank-you-vsp-signup-form
,
↧