Re: [osg-users] Error Compiling OSG GL3 on Win7/VS 2008

2017-10-03 Thread Maxim Stere
Hi,

I'm also having a problem with GL3 on windows. 

When I build OSG with GL3 available and run an osg example I get an error:
GL3: Non-GL3 version number: 1.0

It looks like it is coming from the Statistics Handler. 

Is there a way to make OSG detect GL3 on windows? It is obviously there since 
it is included with the support of latest NVIDA cards. 


... 

Thank you!

Cheers,
Maxim

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72096#72096





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Error Compiling OSG GL3 on Win7/VS 2008

2017-02-07 Thread Sina Niemeyer
Hi, 

i got the same Error:
"GL3: Non-GL3 version number: 1.0",
Failed to load libEGLd.dll (Couldn't find module),
class QWindowsEGLStaticContext [...]: Faile to load and resolve libEGL 
functions"

As you suggested I built OSG again, disabling all OSG_GL_XXX_AVAILABLE, 
disabling OSG_USE_QT (I use Qt 5.5 builded before), but enabling 
OSG_GL3_AVAILABLE.
What about the gl3.h - do I really need it to be downloaded externally, and 
where to put it?

What might be the problem?
I don't know where to look out.

Thanks in advance, 
Cody

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70121#70121





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Error Compiling OSG GL3 on Win7/VS 2008

2010-12-15 Thread Torben Dannhauer
Hi Paul, Hi J-S,

the CMAKE modification works.

All other compile errors in a lot of files are cause on ambiguous symbols 
caused by wingdi.h. THis file is included in windows.h, which is in cluded in 
the gl3.h. To test if it is the reason, I modified gl3.h and disabled the 
include of windows.h.

Now the ambiguous symbols are disappared, but OSG has hundrets of linker 
errors, because all the _gl* functions are missing. Is this problem caused by 
my exclusion of windows.h, or is it another problem?

@Paul: You seem to have a running GL3 OSG. Is your OS windows? If yes, what ist 
build environment?


Thank you!

Cheers,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=34879#34879





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Error Compiling OSG GL3 on Win7/VS 2008

2010-12-15 Thread Torben Dannhauer
Hi Paul, J-S

I applied 2 modifications, and it nearly works:

Mod 1: your suggested CMAKE modification
Mod 2: I extended the osg/GL includefile to define some windows constants 
before including GL3/gl3.h to aviod the name confilcts in the same way like it 
is done prior to the GL2 include:

Code:

#elif defined(OSG_GL3_AVAILABLE)
// Under Windows avoid including windows.h
// to avoid name space pollution, but Win32's GL/gl.h 
// needs APIENTRY and WINGDIAPI defined properly. 
// XXX This is from Win32's windef.h 
#ifndef APIENTRY
#define GLUT_APIENTRY_DEFINED
#if (_MSC_VER = 800) || defined(_STDCALL_SUPPORTED)
#define WINAPI __stdcall
#define APIENTRY WINAPI
#else
#define APIENTRY
#endif
#endif

 // XXX This is from Win32's windef.h 
#ifndef CALLBACK
#if (_MSC_VER = 800) || defined(_STDCALL_SUPPORTED)
#define CALLBACK __stdcall
#else
#define CALLBACK
#endif
#endif

// XXX This is from Win32's wingdi.h and winnt.h 
#ifndef WINGDIAPI
#define GLUT_WINGDIAPI_DEFINED
#define DECLSPEC_IMPORT __declspec(dllimport)
#define WINGDIAPI DECLSPEC_IMPORT
#endif

// XXX This is from Win32's ctype.h
#if !defined(_WCHAR_T_DEFINED)  !(defined(__GNUC__)((__GNUC__ == 
3)||(__GNUC__ == 4)))
typedef unsigned short wchar_t;
#define _WCHAR_T_DEFINED
#endif




#define GL3_PROTOTYPES 1
#include GL3/gl3.h

#ifndef GL_APIENTRY
#define GL_APIENTRY APIENTRY
#endif // GL_APIENTRY

#else




No the compile works, and most of the linking as well.

Only the Qtosg Module faisl to link, because it includes Qts OpenGL module, 
wich includes gl.h

The resulting definition conflict of gl3.h and gl.h ends in a lot of compile 
errors in osgQt.

What would be the approriate way to solve this issue?  According to this Qt 
issue report http://bugreports.qt.nokia.com/browse/QTBUG-8611 Qt currently does 
not support gl3.h usage.

So currently the only option is to disable osgQt while using GL3.

I'll submit my two modified files, afterwards the following steps are required 
for windows+MSVC users:
1. Download gl3.h from www.opengl.org/registry and put it into your 
DevEnvIncludeDir/GL3/gl3.h
2. Configure CMake to disable all OSG_GLx_AVAILABLE
3. Configure CMake to disable OSG_GL_DISPLAYLISTS_AVAILABLE
4. Configure CMake to disable OSG_GL_FIXED_FUNCTION_AVAILABLE
5. Configure CMake to disable OSG_GL_MATRICES_AVAILABLE
6. Configure CMake to disable OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE
7. Configure CMake to disable OSG_GL_VERTEX_FUNCS_AVAILABLE
8. Configure CMake to ENable OSG_GL3_AVAILABLE
9. Configure CMake to disable Qt usage, because currently Qt is not GL3 capable.

Cheers,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=34883#34883





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Error Compiling OSG GL3 on Win7/VS 2008

2010-12-15 Thread Paul Martz

On 12/15/2010 2:25 AM, Torben Dannhauer wrote:

@Paul: You seem to have a running GL3 OSG. Is your OS windows? If yes, what ist 
build environment?


Yes, it was on Windows, which, of course, only support GL 1.1 native.

When I had this working, I was using gl3.h only for function prototype 
definitions, then filling in the necessary function pointers. As a result, there 
were no undefined symbols.


--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Error Compiling OSG GL3 on Win7/VS 2008

2010-12-13 Thread Torben Dannhauer
Hi,

I tried to compile OSG withGL3 on windows and VS 2008 fo testing purposes.

I disabled the other GL options as describte in an other thread.

VS failed to compile in Matrix_implementation.cpp:

Code:

 if (fabs(length2) = std::numeric_limitsdouble::min())
 ...




The error output is about the min macro and invalid token right to '::' (line 
70+)

Does anyone know what this error could be about? Has anyone used GL3 
successfully on a windows machine?

Thank you!

Cheers,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=34789#34789





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Error Compiling OSG GL3 on Win7/VS 2008

2010-12-13 Thread Jean-Sébastien Guay

Hi Torben,


The error output is about the min macro and invalid token right to '::' (line 
70+)

Does anyone know what this error could be about? Has anyone used GL3 
successfully on a windows machine?


I haven't built OSG with GL3, but when MSVC complains about min/max, 
it's usually because someone somewhere included windows.h without first 
defining WIN32_LEAN_AND_MEAN or NOMINMAX (the former implies the 
latter). This happens because somewhere in the headers included by 
windows.h, min and max are defined as macros. So anywhere code uses the 
names min or max after that, it will be replaced by the preprocessor and 
then anything before (like std::numeric_limitsdouble:: in the line you 
quoted) will cause a compiler error.


I guess you'll have to find where windows.h was included (any of the 
headers included in Matrix_implementation.h, and headers included by 
those, etc.) and add the appropriate define to stop it from defining the 
min and max macros.


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Error Compiling OSG GL3 on Win7/VS 2008

2010-12-13 Thread Torben Dannhauer
Hi J-S,

you are right using NOMINMAX avoids the problem. I tracked it down to osg/GL 
and the inclusion of gl3.h:

Code:

#elif defined(OSG_GL3_AVAILABLE)

#define GL3_PROTOTYPES 1
#include  GL3/gl3.h 

#ifndef GL_APIENTRY
#define GL_APIENTRY APIENTRY
#endif // GL_APIENTRY

#else




With definintion NOMINMAX in front of the include it works, defining NOMINMAX 
after the gl3.h include, it failed.

In the gl3.g it checks for win and defines WIN32_LEAN_AND_MEAN.

In my case this is not enough, only with defining NOMINMAX, it compiles (at 
least the osg module, some plugins still fail but I will test that tomorrow.)

To avoid modifications in gl3.h i modified my osg/GL:

Code:

...
#elif defined(OSG_GL3_AVAILABLE)
#ifdef WIN32
#ifdef NOMINMAX
#define NOMINMAX
#endif
#endif

#define GL3_PROTOTYPES 1
#include  GL3/gl3.h 

#ifndef GL_APIENTRY
#define GL_APIENTRY APIENTRY
#endif // GL_APIENTRY

#else
...




Is this a valid fix ready to submit, or is it to much hack to be ready for 
merging?

In the next days I hope to solve the confict between tesselator and unit to 
solve this GL3 issue for the next dev release.


Thanks for your help,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=34795#34795





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Error Compiling OSG GL3 on Win7/VS 2008

2010-12-13 Thread Paul Martz

On 12/13/2010 3:12 PM, Torben Dannhauer wrote:

#ifdef NOMINMAX
#define NOMINMAX


I assume you mean #ifndef above?

--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Error Compiling OSG GL3 on Win7/VS 2008

2010-12-13 Thread Jean-Sébastien Guay

Hi Torben,

Perhaps moving this to the CMake files would make sense?

I just checked the root CMakeLists.txt, and it has a section:

IF (WIN32)

...

# Both Cygwin and Msys need -DNOMINMAX ???
IF(UNIX)
ADD_DEFINITIONS(-DNOMINMAX)
ENDIF()

...

ENDIF()

Removing the IF(UNIX) from the above would also define NOMINMAX for MSVC 
(i.e. it would be defined for all Windows compilers, including Cygwin 
and MinGW which fall under the IF(UNIX) test and MSVC which falls under 
the IF(MSVC) test just above those lines).


Can you try this?

Thanks,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Error Compiling OSG GL3 on Win7/VS 2008

2010-12-13 Thread Torben Dannhauer
Hi Paul, Hi J-S

yes you are right, I meant #ifndef, sorry for the typo :)


Yes I'll move it to the cmake file as it does not touch the cource files, but I 
have no clue about bugs my changes could introduce on other build systems the 
MSVC, so I decided to ask :)

Todayevening I'll move it to the cmakelists.txt and then try to solve the 
issues with tesselator and unit.


So far, Thank you! :)

Cheers,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=34807#34807





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org