opengl support issue?
Hello,
I am on windows 7 32bits. I have installed opencv (the latest GIT sources) with opengl support. When I launch a simple test app that displays my webcam images in real-time, everything works fine, my console displays "opengl support available". However, when I create a simple opengl callback with the samples provided in the OpenCV documentation (see end of the email), the simples opengl function glLoadIdentity() returns an error "identifier is undefined".
I suspect that this is an include problem, but it was my understanding that it wasn't necessary to have OpenGL installed on the computer on windows to have OpenGL support with OpenCV. Am I wrong? Are there specific OpenCV include files (or OpenGL include files) that need to be included in addition to highgui to have OpenGL support work ?
Sorry if my question is irrelevant, but I have been looking for help for a while from different sources and could not find an answer. Thanks for any advice you can help with!
setOpenGlDrawCallback("video", onOpenGlDraw, void * userdata = 0); // in my main
void on_opengl(void* param){ // my simplistic callback glLoadIdentity(); }
did you compile in opengl support ? (the prebuilt libs probably won't have it) . do a
cerr << getBuildInformation() << endl;
(and look somewhere at the bottom to find out.)if so, you need a preceeding
namedWindow(someTitle, WINDOW_OPENGL);
to create an opengl context behind the curtainsHello,
Thanks for your help.
I did compile with opengl support : with getBuildInformation() I get OpenGL support : Yes (glu32, opengl32)
I have a window created with opengl context with namedWindow("video", WINDOW_OPENGL). When I compile the above described code, I still get the following compilation error with glLoadIdentity all all gl functions which seem not recongized:
error C3861: 'glLoadIdentity': identifier not foun
Would you have other explanations?
Thanks
I suspect that this is an include problem, but it was my understanding that it wasn't necessary to have OpenGL installed on the computer on windows to have OpenGL support with OpenCV. Am I wrong? Not sure and going a bit out of my expertise zone here, but it seems to me that it is impossible to run OpenGL supported software without OpenGL being on the machine itself ...
"but it was my understanding that it wasn't necessary to have OpenGL installed on the computer on windows to have OpenGL support with OpenCV." - well, ofc. you need the opengl headers/libs/dll's on your machine, but they are supplied with your compiler.
yeah ok my bad I just needed to include
include <windows.h>
include <gl gl.h="">
...