I’m running into a problem when trying to display RGBA surfaces while using OpenGL hardware acceleration. It seems that when hardware acceleration is turned on I can’t blit RGBA surfaces. If I try to blit an RGBA surface to the screen using the following code, BltFast returns E_ERROR:
If I try to blit the RGBA surface to an E2DSurface using the following code, BltFast returns E_LOCKFAILED:
I am using the following code to create the RGBA Surface:
The above code seems to work fine if I don’t define EGL_USEGL. For my application I’m attempting to render a 3D scene and then overlay a GUI for the user. I need to be able to use RGBA surfaces to create the GUI, but I would also like to take advantage of OpenGL hardware acceleration for the 3D rendering. Is there any way to mix the two? If not, what is the typical approach for creating a 2D GUI to be used in a 3D application?
- Code:
display->Perspective2D(m_rgbaSurface.GetWidth(), m_rgbaSurface.GetHeight(), false);
display->buffer.BltFast(0, 0, &m;_rgbaSurface, NULL);
If I try to blit the RGBA surface to an E2DSurface using the following code, BltFast returns E_LOCKFAILED:
- Code:
E2DSurface tmpSurf;
if(E_OK == display->CreateSurface(&tmpSurf;, m_rgbaSurface.GetWidth(), m_rgbaSurface.GetHeight()))
{
tmpSurf.BltFast(0, 0, &m;_rgbaSurface, NULL);
}
I am using the following code to create the RGBA Surface:
- Code:
E2DSurfaceRGBA m_rgbaSurface;
if(E_OK != display->CreateSurface(&m;_rgbaSurface, "gui_control.png"))
return E_ERROR;
display->UploadTexture(&m;_rgbaSurface);
The above code seems to work fine if I don’t define EGL_USEGL. For my application I’m attempting to render a 3D scene and then overlay a GUI for the user. I need to be able to use RGBA surfaces to create the GUI, but I would also like to take advantage of OpenGL hardware acceleration for the 3D rendering. Is there any way to mix the two? If not, what is the typical approach for creating a 2D GUI to be used in a 3D application?