virtual result OnDraw(void)
{
- if (__pApp != null)
- {
- __pApp->Draw();
- }
-
return E_SUCCESS;
}
const int numIndices = 12;
GlesVideoTexture::GlesVideoTexture(void)
- : __eglDisplay(EGL_DEFAULT_DISPLAY)
+ : __eglDisplay(EGL_NO_DISPLAY)
, __eglSurface(EGL_NO_SURFACE)
, __eglConfig(null)
- , __eglContext(EGL_NO_DISPLAY)
+ , __eglContext(EGL_NO_CONTEXT)
, __programObject(0)
, __indexPosition(0)
, __indexTexture(0)
EGLint eglConfigList[] =
{
- EGL_RED_SIZE, 5,
- EGL_GREEN_SIZE, 6,
- EGL_BLUE_SIZE, 5,
+ EGL_RED_SIZE, 8,
+ EGL_GREEN_SIZE, 8,
+ EGL_BLUE_SIZE, 8,
EGL_ALPHA_SIZE, 0,
EGL_DEPTH_SIZE, 8,
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
eglBindAPI(EGL_OPENGL_ES_API);
- if (__eglDisplay)
- {
- DestroyGL();
- }
-
__eglDisplay = eglGetDisplay((EGLNativeDisplayType)EGL_DEFAULT_DISPLAY);
TryCatch(__eglDisplay != EGL_NO_DISPLAY, , "eglGetDisplay() failed.");
glUseProgram(__programObject);
- glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
glEnable(GL_DEPTH_TEST);
__angle = 45.0f;
glDeleteShader(vertShader);
glDeleteShader(fragShader);
- glClearColor(0, 0, 0, 1);
+ glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glEnable(GL_CULL_FACE);