minor fix

This commit is contained in:
Vladislav Vinogradov 2011-11-28 12:10:37 +00:00
parent 9817252b23
commit 07debd6cb5
3 changed files with 71 additions and 17 deletions

View File

@ -609,21 +609,6 @@ void cv::clearTextOpenGl(const string& winname)
cvClearTextOpenGl(winname.c_str());
}
#if (!defined WIN32 && !defined _WIN32) || defined HAVE_QT
CV_IMPL void cvAddTextOpenGl(const char*, const char*, CvPoint, CvScalar, const char*, int, int, int)
{
CV_Error(CV_OpenGlNotSupported, "This function works only under WIN32");
}
CV_IMPL void cvClearTextOpenGl(const char*)
{
CV_Error(CV_OpenGlNotSupported, "This function works only under WIN32");
}
#endif // (!defined WIN32 && !defined _WIN32) || defined HAVE_QT
// Without OpenGL
#ifndef HAVE_OPENGL

View File

@ -1142,6 +1142,75 @@ CV_IMPL void cvSetOpenGlContext(const char* name)
__END__;
}
CV_IMPL void cvAddTextOpenGl(const char* name, const char* text, CvPoint org, CvScalar color, const char* fontName, int fontHeight, int fontWeight, int fontStyle)
{
CV_FUNCNAME( "cvAddTextOpenGl" );
__BEGIN__;
CV_ERROR( CV_OpenGlNotSupported, "Not Implemented" );
__END__;
/*__BEGIN__;
CvWindow* window;
if(!name)
CV_ERROR( CV_StsNullPtr, "NULL name string" );
window = icvFindWindowByName( name );
if (!window)
CV_ERROR( CV_StsNullPtr, "NULL window" );
if (!window->useGl)
CV_ERROR( CV_OpenGlNotSupported, "Window doesn't support OpenGL" );
if (!wglMakeCurrent(window->dc, window->hGLRC))
CV_ERROR( CV_OpenGlApiCallError, "Can't Activate The GL Rendering Context" );
if (!window->glText)
window->glText = new OpenGlText(window->dc);
window->glText->add(text, org, color, fontName, fontHeight, fontWeight, fontStyle);
InvalidateRect(window->hwnd, 0, 0);
__END__;*/
}
CV_IMPL void cvClearTextOpenGl(const char* name)
{
CV_FUNCNAME( "cvClearTextOpenGl" );
__BEGIN__;
CV_ERROR( CV_OpenGlNotSupported, "Not Implemented" );
__END__;
/*__BEGIN__;
CvWindow* window;
if(!name)
CV_ERROR( CV_StsNullPtr, "NULL name string" );
window = icvFindWindowByName( name );
if (!window)
CV_ERROR( CV_StsNullPtr, "NULL window" );
if (!window->useGl)
CV_ERROR( CV_OpenGlNotSupported, "Window doesn't support OpenGL" );
if (!wglMakeCurrent(window->dc, window->hGLRC))
CV_ERROR( CV_OpenGlApiCallError, "Can't Activate The GL Rendering Context" );
if (window->glText)
{
window->glText->clear();
InvalidateRect(window->hwnd, 0, 0);
}
__END__;*/
}
CV_IMPL void cvUpdateWindow(const char* name)
{
CV_FUNCNAME( "cvUpdateWindow" );

View File

@ -1268,7 +1268,7 @@ CV_IMPL void cvSetOpenGlContext(const char* name)
CV_IMPL void cvAddTextOpenGl(const char* name, const char* text, CvPoint org, CvScalar color, const char* fontName, int fontHeight, int fontWeight, int fontStyle)
{
CV_FUNCNAME( "cvSetOpenGlContext" );
CV_FUNCNAME( "cvAddTextOpenGl" );
__BEGIN__;
@ -1299,7 +1299,7 @@ CV_IMPL void cvAddTextOpenGl(const char* name, const char* text, CvPoint org, Cv
CV_IMPL void cvClearTextOpenGl(const char* name)
{
CV_FUNCNAME( "cvSetOpenGlContext" );
CV_FUNCNAME( "cvClearTextOpenGl" );
__BEGIN__;