Hi,
 
quick update on that. Finally I found a laptop that has a Intel HD Graphics board. Indeed extension GL_ARB_imaging is not supported while GLversion is 4.0.0.
I changed the hasExtOrVersion() calls back to hasExtension() and the crash moved ;-)
Extensions     GL_EXT_blend_minmax and  GL_EXT_blend_subtract are supported but retrieving the function pointer for glBlendEquationExt is 0x00000.
So I added an additional test for that and now the crashes are gone. Attached you can find my BlendChunk changes...
 
Thanks,
Michael
 
Gesendet: Mittwoch, 06. August 2014 um 10:22 Uhr
Von: "Michael Raab" <michael-r...@gmx.de>
An: opensg-users@lists.sourceforge.net
Betreff: [Opensg-users] OpenSG2.0 - Issues and Improvements
Hi,
 
we have some problems, actually crashes, on client laptop that use Intel HD chips. The problems are linked to the usage of BlendChunk's and I think we have narrowed it down to the BlendEquation.
It seems Intel HD chips and their drivers do not support GL_ARB_imaging extension, which is necessary for glBlendEquation. This problem arised with the switch from 1.8 to 2.0. I checked the BlendChunk implementation for differences and I've got a presumption what may be the problem. In 1.8 the BlendChunk uses ::hasExtension() to check for GL_ARB_imaging. 2.0 uses hasExtOrVersion(). So I guess that the GL version is large enough to get a true here even if the extension is not supported. What is the reason why this check was changed?
 
Furthermore I've improved some other things:
 
1.) TextureBuffer::processPreDeactivate(): Check if image is assigned to TextureObj, before accessing it..
2.) OSGGeoSplitVertexArrayPumpGroup/OSGGeoVertexArrayPumpGroup: We had some Geometries that had at certain times no vertices. Calling glDrawArray with vertexCount 0 caused crashes on some graphics cards. I added a check here.
3.) OSGImage: Added simple hash calculation to be able to compare images faster.
4.) OSGBlendChunk: In some cases glBlendEquation was used where glBlendEquationEXT should have be used.
 
Patch is attached...
 
Thanks,
Michael
 
 
------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk_______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users
diff --git "a/C:\\Users\\raab\\AppData\\Local\\Temp\\TortoiseGit\\OSG9017.tmp\\OSGBlendChunk-f8d85aa-left.cpp" "b/D:\\Dev\\opensg2\\Source\\System\\State\\Base\\OSGBlendChunk.cpp"
index b4d50d5..5137478 100644
--- "a/C:\\Users\\raab\\AppData\\Local\\Temp\\TortoiseGit\\OSG9017.tmp\\OSGBlendChunk-f8d85aa-left.cpp"
+++ "b/D:\\Dev\\opensg2\\Source\\System\\State\\Base\\OSGBlendChunk.cpp"
@@ -248,7 +248,8 @@ void BlendChunk::activate(DrawEnv *pEnv, UInt32)
 
     if(_sfEquation.getValue() != GL_NONE)
     {
-        if(pWin->hasExtOrVersion(_extImaging, 0x0104, 0x0200))
+        //if(pWin->hasExtOrVersion(_extImaging, 0x0104, 0x0200))
+		if(pWin->hasExtension(_extImaging))
         {
             // get "glBlendEquation" function pointer
             OSGGETGLFUNCBYID_GL3_ES( glBlendEquation, 
@@ -256,19 +257,24 @@ void BlendChunk::activate(DrawEnv *pEnv, UInt32)
                                     _funcBlendEquation,
                                      pWin);
 
-            osgGlBlendEquation(_sfEquation.getValue());
+			if(osgGlBlendEquation)
+				osgGlBlendEquation(_sfEquation.getValue());
         }
-        else if(pWin->hasExtOrVersion(_extBlendSubtract, 0x0102, 0x0200) ||
-                pWin->hasExtOrVersion(_extBlendMinMax,   0x0102, 0x0200) ||
-                pWin->hasExtOrVersion(_extBlendLogicOp,  0x0101, 0x0200)  )
-        {
+        //else if(pWin->hasExtOrVersion(_extBlendSubtract, 0x0102, 0x0200) ||
+        //        pWin->hasExtOrVersion(_extBlendMinMax,   0x0102, 0x0200) ||
+        //        pWin->hasExtOrVersion(_extBlendLogicOp,  0x0101, 0x0200)  )
+		else if(pWin->hasExtension(_extBlendSubtract) ||
+				pWin->hasExtension(_extBlendMinMax) ||
+				pWin->hasExtension(_extBlendLogicOp)  )
+		{
             // get "glBlendEquationEXT" function pointer
-            OSGGETGLFUNCBYID_GL3_ES( glBlendEquation, 
-                                     osgGlBlendEquation,
-                                    _funcBlendEquation,
+            OSGGETGLFUNCBYID_GL3_ES( glBlendEquationEXT, 
+                                     osgGlBlendEquationExt,
+                                    _funcBlendEquationExt,
                                      pWin);
 
-            osgGlBlendEquation(_sfEquation.getValue());
+			if(osgGlBlendEquationExt)
+				osgGlBlendEquationExt(_sfEquation.getValue());
         }
     }
     
@@ -383,27 +389,33 @@ void BlendChunk::changeFrom(DrawEnv    *pEnv,
 
     if(_sfEquation.getValue() != old->_sfEquation.getValue())
     {
-        if(pWin->hasExtOrVersion(_extImaging, 0x0104, 0x0200))
-        {
+        //if(pWin->hasExtOrVersion(_extImaging, 0x0104, 0x0200))
+		if(pWin->hasExtension(_extImaging))
+		{
             // get "glBlendEquation" function pointer
             OSGGETGLFUNCBYID_GL3_ES( glBlendEquation, 
                                      osgGlBlendEquation,
                                     _funcBlendEquation,
                                      pWin);
 
-            osgGlBlendEquation(_sfEquation.getValue());
+			if(osgGlBlendEquation)
+				osgGlBlendEquation(_sfEquation.getValue());
         }
-        else if(pWin->hasExtOrVersion(_extBlendSubtract, 0x0102, 0x0200) ||
-                pWin->hasExtOrVersion(_extBlendMinMax,   0x0102, 0x0200) ||
-                pWin->hasExtOrVersion(_extBlendLogicOp,  0x0101, 0x0200))
-        {
+        //else if(pWin->hasExtOrVersion(_extBlendSubtract, 0x0102, 0x0200) ||
+        //        pWin->hasExtOrVersion(_extBlendMinMax,   0x0102, 0x0200) ||
+        //        pWin->hasExtOrVersion(_extBlendLogicOp,  0x0101, 0x0200))
+		else if(pWin->hasExtension(_extBlendSubtract) ||
+				pWin->hasExtension(_extBlendMinMax) ||
+				pWin->hasExtension(_extBlendLogicOp)  )
+		{
             // get "glBlendEquationEXT" function pointer
-            OSGGETGLFUNCBYID_GL3_ES( glBlendEquation, 
-                                     osgGlBlendEquation,
-                                    _funcBlendEquation,
+            OSGGETGLFUNCBYID_GL3_ES( glBlendEquationEXT, 
+                                     osgGlBlendEquationExt,
+                                    _funcBlendEquationExt,
                                      pWin);
-
-            osgGlBlendEquation(_sfEquation.getValue());
+			
+			if(osgGlBlendEquationExt)
+				osgGlBlendEquationExt(_sfEquation.getValue());
         }
     }
     
@@ -445,7 +457,8 @@ void BlendChunk::deactivate(DrawEnv *pEnv, UInt32 )
 
     if(_sfEquation.getValue() != GL_NONE)
     {
-        if(pWin->hasExtOrVersion(_extImaging, 0x0104, 0x0200))
+        //if(pWin->hasExtOrVersion(_extImaging, 0x0104, 0x0200))
+		if(pWin->hasExtension(_extImaging))
         {
             // get "glBlendEquation" function pointer
             OSGGETGLFUNCBYID_GL3_ES( glBlendEquation, 
@@ -453,19 +466,24 @@ void BlendChunk::deactivate(DrawEnv *pEnv, UInt32 )
                                     _funcBlendEquation,
                                      pWin);
 
-            osgGlBlendEquation(GL_FUNC_ADD);
+			if(osgGlBlendEquation)
+				osgGlBlendEquation(GL_FUNC_ADD);
         }
-        else if(pWin->hasExtOrVersion(_extBlendSubtract, 0x0102, 0x0200) ||
-                pWin->hasExtOrVersion(_extBlendMinMax,   0x0102, 0x0200) ||
-                pWin->hasExtOrVersion(_extBlendLogicOp,  0x0101, 0x0200)  )
-        {
+        //else if(pWin->hasExtOrVersion(_extBlendSubtract, 0x0102, 0x0200) ||
+        //        pWin->hasExtOrVersion(_extBlendMinMax,   0x0102, 0x0200) ||
+        //        pWin->hasExtOrVersion(_extBlendLogicOp,  0x0101, 0x0200)  )
+		else if(pWin->hasExtension(_extBlendSubtract) ||
+				pWin->hasExtension(_extBlendMinMax) ||
+				pWin->hasExtension(_extBlendLogicOp)  )
+		{
             // get "glBlendEquationEXT" function pointer
-            OSGGETGLFUNCBYID_GL3_ES( glBlendEquation, 
-                                     osgGlBlendEquation,
+            OSGGETGLFUNCBYID_GL3_ES( glBlendEquationEXT, 
+                                     osgGlBlendEquationExt,
                                     _funcBlendEquationExt,
                                      pWin);
 
-            osgGlBlendEquation(GL_FUNC_ADD_EXT);
+			if(osgGlBlendEquationExt)
+				osgGlBlendEquationExt(GL_FUNC_ADD_EXT);
         }
     }
     
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to