I want to make
this happen with Horde3D. In essence it boils down to writing data to a texture while it is assigned to a model. But how?
Awesomium includes examples that work like this:
Code:
const Awesomium::RenderBuffer* buffer =
myobject->webView->render();
memcpy(myobject->buffer, buffer->buffer, myobject->width * myobject->height * 4);
glBindTexture(GL_TEXTURE_2D, myobject->textureID);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, myobject->width, myobject->height,
myobject->bpp == 3 ? GL_RGB : GL_BGRA, GL_UNSIGNED_BYTE,
myobject->buffer);
Pretty straightforward in OpenGL. But how would I do this operation with Horde3D? I am stuck implementing this because of a lack of reading material.
Here are my ideas, but I have no idea if they go in the right direction at all:
A) Create a h3dUpdateResource() that does: h3dUnloadResource(); create a new h3dRes from a buffer; h3dLoadResource() with the same name. Isn't this slow?
B) Use the h3dMapResStream() stuff? I couldn't find any examples for this.
C) It doesn't work like that at all because.
Any guidance is appreciated.
Semi-unrelated extra question: In an older thread I read that it is slow to switch between normal OpenGL and Horde3D to draw a GUI on top of Horde3D. Does that still apply, or has that changed with h3dutReleaseOpenGL() (and does this still only work with Windows?)?