help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Build gst without GL


From: leledumbo
Subject: Re: [Help-smalltalk] Build gst without GL
Date: Thu, 19 Feb 2009 20:01:35 -0800 (PST)

Sorry, I'm a newbie in patch files. Which lines are the patch? How to apply
it?


Paolo Bonzini-2 wrote:
> 
> Gwenael Casaccio wrote:
>> On Wednesday 18 February 2009 15:56:10 you wrote:
>>> Gwenael Casaccio wrote:
>>>> Hi,
>>>>
>>>> Is it possible to build gst without opengl ? I've tried to build with
>>>> ./configure  --without-opengl option but it has no effect...
>>> What's the problem?  (and the platform?)
>>>
>>> Paolo
>> 
>> gstGl.c: In function 'gst_opengl_glMultTransposeMatrixv':                    
>>                                                                              
>>                        
>> gstGl.c:220: warning: implicit declaration of function 
>> 'glMultTransposeMatrixf'                                                     
>>                                              
>> gstGl.c: In function 'gst_opengl_glLoadTransposeMatrixv':                    
>>                                                                              
>>                        
>> gstGl.c:326: warning: implicit declaration of function 
>> 'glLoadTransposeMatrixf'                                                     
>>                                              
>> gstGl.c: In function 'gst_initModule_gl':                                    
>>                                                                              
>>                        
>> gstGl.c:1070: error: 'glActiveTexture' undeclared (first use in this
>> function)                                                                    
>>                                
>> gstGl.c:1070: error: (Each undeclared identifier is reported only once       
>>                                                                              
>>                        
>> gstGl.c:1070: error: for each function it appears in.)                       
>>                                                                              
>>                        
>> gstGl.c:1076: error: 'glBlendEquation' undeclared (first use in this
>> function)                                                                    
>>                                
>> gstGl.c:1087: error: 'glClientActiveTexture' undeclared (first use in
>> this 
>> function) 
>> 
>> I've the gl headers (that's the nvidia headers on kubuntu)...
> 
> You can apply this patch (taken from git).  It is curiously enough
> exactly the same errors that I had on Windows a few weeeks ago.
> 
> Paolo
> 
> diff --git a/packages/opengl/ChangeLog b/packages/opengl/ChangeLog
> index 6bfc5da..dc33a4b 100644
> --- a/packages/opengl/ChangeLog
> +++ b/packages/opengl/ChangeLog
> @@ -1,3 +1,20 @@
> +2009-01-25  Paolo Bonzini  <address@hidden>
> +
> +     * OpenGL.st: Temporarily disable extensions not in Win32.
> +     * gstGl.c: Temporarily disable extensions not in Win32.
> +     * gstGlu.c: Temporarily disable functions not in Win32.
> +     * gstGluNurbs.c: Disable if not available.
> +
> +2009-01-25  Paolo Bonzini  <address@hidden>
> +
> +     * gstGl.c: Fixes for missing GL_ARB_transpose_matrix,
> +     GL_EXT_blend_minmax, GL_EXT_blend_color.
> +     * gstGlu.c: Reimplement gluCheckExtension.
> +
> +2009-01-25  Paolo Bonzini  <address@hidden>
> +
> +     * gstGluTess.c: Fix typo.
> +
>  2008-08-27  Olivier Blanc  <address@hidden>
>  
>       * test/trim.st: New.
> diff --git a/packages/opengl/OpenGL.st b/packages/opengl/OpenGL.st
> index 46bf616..028478a 100644
> --- a/packages/opengl/OpenGL.st
> +++ b/packages/opengl/OpenGL.st
> @@ -416,30 +416,6 @@ See OpenGL programming guide for more informations.'>
>       
>      ]
>  
> -    loadTransposeMatrixf: aMatrix [
> -     <category: 'Matrix manipulation'>
> -     <cCall: 'glLoadTransposeMatrixf' retuning: #void args: #(#cObject)>
> -     
> -    ]
> -
> -    multTransposeMatrixf: aMatrix [
> -     <category: 'Matrix manipulation'>
> -     <cCall: 'glMultTransposeMatrixf' retuning: #void args: #(#cObject)>
> -     
> -    ]
> -
> -    loadTransposeMatrixd: aMatrix [
> -     <category: 'Matrix manipulation'>
> -     <cCall: 'glLoadTransposeMatrixd' retuning: #void args: #(#cObject)>
> -     
> -    ]
> -
> -    multTransposeMatrixd: aMatrix [
> -     <category: 'Matrix manipulation'>
> -     <cCall: 'glMultTransposeMatrixd' retuning: #void args: #(#cObject)>
> -     
> -    ]
> -
>      loadMatrix: aMatrix [
>       <category: 'Matrix manipulation'>
>       <cCall: 'glLoadMatrixv' retuning: #void args: #(#smalltalk)>
> diff --git a/packages/opengl/gstGl.c b/packages/opengl/gstGl.c
> index 0bcb863..deecfdb 100644
> --- a/packages/opengl/gstGl.c
> +++ b/packages/opengl/gstGl.c
> @@ -217,7 +217,19 @@ gst_opengl_glMultTransposeMatrixv (OOP matrixOOP)
>    if (!p)
>      return GL_INVALID_VALUE;
>  
> +#ifdef GL_ARB_transpose_matrix
>    glMultTransposeMatrixf (p);
> +#else
> +  {
> +    GLfloat mt[16];
> +    mt[0] = p[0]; mt[1] = p[4]; mt[2] = p[8]; mt[3] = p[12];
> +    mt[4] = p[1]; mt[5] = p[5]; mt[6] = p[9]; mt[7] = p[13];
> +    mt[8] = p[2]; mt[9] = p[6]; mt[10] = p[10]; mt[11] = p[14];
> +    mt[12] = p[3]; mt[13] = p[7]; mt[14] = p[11]; mt[15] = p[15];
> +    glMultMatrixf (mt);
> +  }
> +#endif
> + 
>    return 0;
>  }
>  
> @@ -323,7 +335,18 @@ gst_opengl_glLoadTransposeMatrixv (OOP matrixOOP)
>    if (!p)
>      return GL_INVALID_VALUE;
>  
> +#ifdef GL_ARB_transpose_matrix
>    glLoadTransposeMatrixf (p);
> +#else
> +  {
> +    GLfloat mt[16];
> +    mt[0] = p[0]; mt[1] = p[4]; mt[2] = p[8]; mt[3] = p[12];
> +    mt[4] = p[1]; mt[5] = p[5]; mt[6] = p[9]; mt[7] = p[13];
> +    mt[8] = p[2]; mt[9] = p[6]; mt[10] = p[10]; mt[11] = p[14];
> +    mt[12] = p[3]; mt[13] = p[7]; mt[14] = p[11]; mt[15] = p[15];
> +    glLoadMatrixf (mt);
> +  }
> +#endif
>    return 0;
>  }
>  
> @@ -700,7 +723,9 @@ gst_opengl_glGetv_size (GLenum pname)
>      case GL_AUX_BUFFERS:
>      case GL_BLEND:
>      case GL_BLEND_DST:
> +#if GL_EXT_blend_minmax
>      case GL_BLEND_EQUATION_EXT:
> +#endif
>      case GL_BLEND_SRC:
>      case GL_BLUE_BIAS:
>      case GL_BLUE_BITS:
> @@ -869,7 +894,9 @@ gst_opengl_glGetv_size (GLenum pname)
>        return 3;
>  
>      case GL_ACCUM_CLEAR_VALUE:
> +#if GL_EXT_blend_color
>      case GL_BLEND_COLOR_EXT:
> +#endif
>      case GL_COLOR_CLEAR_VALUE:
>      case GL_COLOR_WRITEMASK:
>      case GL_CURRENT_COLOR:
> @@ -1067,13 +1094,17 @@ gst_opengl_glCallLists( GLsizei first, GLsizei
> last, OOP listsOOP )
>  void gst_initModule_gl()
>  {
>    vm_proxy->defineCFunc ("glAccum", glAccum);
> +#if 0
>    vm_proxy->defineCFunc ("glActiveTexture", glActiveTexture);
> +#endif
>    vm_proxy->defineCFunc ("glAlphaFunc", glAlphaFunc);
>    vm_proxy->defineCFunc ("glArrayElement", glArrayElement);
>    vm_proxy->defineCFunc ("glBegin", glBegin);
>    vm_proxy->defineCFunc ("glBindTexture", glBindTexture);
>    vm_proxy->defineCFunc ("glBitmap", gst_opengl_glBitmap);
> +#if 0
>    vm_proxy->defineCFunc ("glBlendEquation", glBlendEquation);
> +#endif
>    vm_proxy->defineCFunc ("glBlendFunc", glBlendFunc);
>    vm_proxy->defineCFunc ("glCallList", glCallList); 
>    vm_proxy->defineCFunc ("glCallLists", gst_opengl_glCallLists); 
> @@ -1084,7 +1115,9 @@ void gst_initModule_gl()
>    vm_proxy->defineCFunc ("glClearDepth", glClearDepth);
>    vm_proxy->defineCFunc ("glClearIndex", glClearIndex);
>    vm_proxy->defineCFunc ("glClearStencil", glClearStencil);
> +#if 0
>    vm_proxy->defineCFunc ("glClientActiveTexture", glClientActiveTexture);
> +#endif
>    vm_proxy->defineCFunc ("glClipPlane", glClipPlane);
>    vm_proxy->defineCFunc ("glColor3b", glColor3b);
>    vm_proxy->defineCFunc ("glColor3bv", glColor3bv);
> @@ -1113,12 +1146,14 @@ void gst_initModule_gl()
>    vm_proxy->defineCFunc ("glColorv", gst_opengl_glColorv);
>    vm_proxy->defineCFunc ("glColorMask", glColorMask);
>    vm_proxy->defineCFunc ("glColorMaterial", glColorMaterial);
> +#if 0
>    vm_proxy->defineCFunc ("glCompressedTexImage1D",
> glCompressedTexImage1D);
>    vm_proxy->defineCFunc ("glCompressedTexImage2D",
> glCompressedTexImage2D);
>    vm_proxy->defineCFunc ("glCompressedTexImage3D",
> glCompressedTexImage3D);
>    vm_proxy->defineCFunc ("glCompressedTexSubImage1D",
> glCompressedTexSubImage1D);
>    vm_proxy->defineCFunc ("glCompressedTexSubImage2D",
> glCompressedTexSubImage2D);
>    vm_proxy->defineCFunc ("glCompressedTexSubImage3D",
> glCompressedTexSubImage3D);
> +#endif
>    vm_proxy->defineCFunc ("glCullFace", glCullFace);
>    vm_proxy->defineCFunc ("glDeleteLists", glDeleteLists);
>    vm_proxy->defineCFunc ("glDeleteTextures",
> gst_opengl_glDeleteTextures);
> @@ -1162,7 +1197,9 @@ void gst_initModule_gl()
>    vm_proxy->defineCFunc ("glGenTextures", gst_opengl_glGenTextures);
>    // vm_proxy->defineCFunc ("glGetBooleanv", glGetBooleanv);
>    vm_proxy->defineCFunc ("glGetClipPlane", glGetClipPlane);
> +#if 0
>    vm_proxy->defineCFunc ("glGetCompressedTexImage",
> glGetCompressedTexImage);
> +#endif
>    vm_proxy->defineCFunc ("glGetDoublev", gst_opengl_glGetDoublev); 
>    vm_proxy->defineCFunc ("glGetError", glGetError);
>    vm_proxy->defineCFunc ("glGetFloatv", gst_opengl_glGetFloatv);
> @@ -1223,8 +1260,10 @@ void gst_initModule_gl()
>    vm_proxy->defineCFunc ("glLoadMatrixf", glLoadMatrixf);
>    vm_proxy->defineCFunc ("glLoadMatrixv", gst_opengl_glLoadMatrixv);
>    vm_proxy->defineCFunc ("glLoadName", glLoadName);
> +#if 0
>    vm_proxy->defineCFunc ("glLoadTransposeMatrixd",
> glLoadTransposeMatrixd);
>    vm_proxy->defineCFunc ("glLoadTransposeMatrixf",
> glLoadTransposeMatrixf);
> +#endif
>    vm_proxy->defineCFunc ("glLoadTransposeMatrixv",
> gst_opengl_glLoadTransposeMatrixv);
>    vm_proxy->defineCFunc ("glLogicOp", glLogicOp);
>    vm_proxy->defineCFunc ("glMapGrid1d", glMapGrid1d); 
> @@ -1240,9 +1279,12 @@ void gst_initModule_gl()
>    vm_proxy->defineCFunc ("glMultMatrixd", glMultMatrixd);
>    vm_proxy->defineCFunc ("glMultMatrixf", glMultMatrixf);
>    vm_proxy->defineCFunc ("glMultMatrixv", gst_opengl_glMultMatrixv);
> +#if 0
>    vm_proxy->defineCFunc ("glMultTransposeMatrixd",
> glMultTransposeMatrixd);
>    vm_proxy->defineCFunc ("glMultTransposeMatrixf",
> glMultTransposeMatrixf);
> +#endif
>    vm_proxy->defineCFunc ("glMultTransposeMatrixv",
> gst_opengl_glMultTransposeMatrixv);
> +#if 0
>    vm_proxy->defineCFunc ("glMultiTexCoord1d", glMultiTexCoord1d);
>    vm_proxy->defineCFunc ("glMultiTexCoord1dv", glMultiTexCoord1dv);
>    vm_proxy->defineCFunc ("glMultiTexCoord1f", glMultiTexCoord1f);
> @@ -1275,6 +1317,7 @@ void gst_initModule_gl()
>    vm_proxy->defineCFunc ("glMultiTexCoord4iv", glMultiTexCoord4iv);
>    vm_proxy->defineCFunc ("glMultiTexCoord4s", glMultiTexCoord4s);
>    vm_proxy->defineCFunc ("glMultiTexCoord4sv", glMultiTexCoord4sv);
> +#endif
>    vm_proxy->defineCFunc ("glNewList", glNewList);
>    vm_proxy->defineCFunc ("glNormal3b", glNormal3b);
>    vm_proxy->defineCFunc ("glNormal3bv", glNormal3bv);
> @@ -1341,12 +1384,16 @@ void gst_initModule_gl()
>    vm_proxy->defineCFunc ("glRects", glRects);
>    vm_proxy->defineCFunc ("glRectsv", glRectsv);
>    vm_proxy->defineCFunc ("glRenderMode", glRenderMode);
> +#if 0
>    vm_proxy->defineCFunc ("glResetHistogram", glResetHistogram);
>    vm_proxy->defineCFunc ("glResetMinmax", glResetMinmax);
> +#endif
>    vm_proxy->defineCFunc ("glRotatev", gst_opengl_glRotatev);
>    vm_proxy->defineCFunc ("glRotated", glRotated);
>    vm_proxy->defineCFunc ("glRotatef", glRotatef);
> +#if 0
>    vm_proxy->defineCFunc ("glSampleCoverage", glSampleCoverage);
> +#endif
>    vm_proxy->defineCFunc ("glScalev", gst_opengl_glScalev);
>    vm_proxy->defineCFunc ("glScaled", glScaled);
>    vm_proxy->defineCFunc ("glScalef", glScalef);
> diff --git a/packages/opengl/gstGlu.c b/packages/opengl/gstGlu.c
> index 55e5082..52f55a9 100644
> --- a/packages/opengl/gstGlu.c
> +++ b/packages/opengl/gstGlu.c
> @@ -221,6 +221,24 @@ void gst_opengl_gluPartialDisk (GLenum draw, GLenum
> normals, GLenum orient,
>    gluDeleteQuadric (q);
>  }
>  
> +/* Not provided on MinGW, but easy enough to provide.  */
> +GLboolean
> +glu_check_extension(const char *extName, const char * extString)
> +{
> +  const int len = strlen (extName);
> +  const char *c;
> +
> +  while (extString && (c = strstr (extString, extName)) != NULL)
> +    {
> +      if ((c == extString || c[-1] == ' ') && (c[len] == ' ' || c[len] ==
> 0))
> +     return GL_TRUE;
> +
> +      extString = strchr (c + len, ' ');
> +    }
> +
> +  return GL_FALSE;
> +}
> +
>  /* Init module */
>  void gst_initModule_glu() {
>  
> @@ -229,13 +247,17 @@ void gst_initModule_glu() {
>    vm_proxy->defineCFunc ("gluBeginPolygon", gluBeginPolygon) ;
>    vm_proxy->defineCFunc ("gluBeginSurface", gluBeginSurface) ;
>    vm_proxy->defineCFunc ("gluBeginTrim", gluBeginTrim) ;
> +#if 0
>    vm_proxy->defineCFunc ("gluBuild1DMipmapLevels",
> gluBuild1DMipmapLevels) ;
> -  vm_proxy->defineCFunc ("gluBuild1DMipmaps", gluBuild1DMipmaps) ;
>    vm_proxy->defineCFunc ("gluBuild2DMipmapLevels",
> gluBuild2DMipmapLevels) ;
> -  vm_proxy->defineCFunc ("gluBuild2DMipmaps", gluBuild2DMipmaps) ;
>    vm_proxy->defineCFunc ("gluBuild3DMipmapLevels",
> gluBuild3DMipmapLevels) ;
> +#endif
> +  vm_proxy->defineCFunc ("gluBuild1DMipmaps", gluBuild1DMipmaps) ;
> +  vm_proxy->defineCFunc ("gluBuild2DMipmaps", gluBuild2DMipmaps) ;
> +#if 0
>    vm_proxy->defineCFunc ("gluBuild3DMipmaps", gluBuild3DMipmaps) ;
> -  vm_proxy->defineCFunc ("gluCheckExtension", gluCheckExtension) ;
> +#endif
> +  vm_proxy->defineCFunc ("gluCheckExtension", glu_check_extension) ;
>    vm_proxy->defineCFunc ("gluCylinder", gst_opengl_gluCylinder) ;
>    vm_proxy->defineCFunc ("gluDeleteTess", gluDeleteTess) ;
>    vm_proxy->defineCFunc ("gluDisk", gst_opengl_gluDisk) ;
> diff --git a/packages/opengl/gstGluNurbs.c b/packages/opengl/gstGluNurbs.c
> index cf521fe..36a38e4 100644
> --- a/packages/opengl/gstGluNurbs.c
> +++ b/packages/opengl/gstGluNurbs.c
> @@ -55,6 +55,7 @@
>  #include <stdlib.h>
>  #include <string.h>
>  
> +#ifdef GLU_NURBS_BEGIN
>  
>  #define nil  vm_proxy->nilOOP
>  
> @@ -290,3 +291,11 @@ void gst_initModule_gluNurbs() {
>  
>    vm_proxy->defineCFunc ("gluNurbsConnectSignal",
> gst_opengl_gluNurbsConnectSignal);
>  }
> +
> +#else
> +
> +/* Init module */
> +void gst_initModule_gluNurbs() {
> +}
> +
> +#endif
> diff --git a/packages/opengl/gstGluTess.c b/packages/opengl/gstGluTess.c
> index 3aecc6e..ab76c0a 100644
> --- a/packages/opengl/gstGluTess.c
> +++ b/packages/opengl/gstGluTess.c
> @@ -107,7 +107,7 @@ gst_glu_tessCallback_Tess_EdgeFlag_Data ( GLenum edge,
> void* data )
>  static void
>  gst_glu_tessCallback_Tess_End_Data (void* data )
>  {
> -  gst_glu_tessCallback_sendMessageTo((OOP)data, GLU_NURBS_END, NULL, 0);
> +  gst_glu_tessCallback_sendMessageTo((OOP)data, GLU_TESS_END, NULL, 0);
>  }
>  
>  static void
> @@ -159,7 +159,7 @@ static struct gst_glu_callback
> gst_glu_tessCallbackFuncs[] = {
>      (GLUfuncptr) gst_glu_tessCallback_Tess_EdgeFlag_Data },
>    { GLU_TESS_COMBINE, GLU_TESS_COMBINE_DATA,
>      (GLUfuncptr) gst_glu_tessCallback_Tess_Combine_Data },
> -  { GLU_NURBS_END, GLU_NURBS_END_DATA,
> +  { GLU_TESS_END, GLU_TESS_END_DATA,
>      (GLUfuncptr) gst_glu_tessCallback_Tess_End_Data }
>  };
>  
> 
> _______________________________________________
> help-smalltalk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-smalltalk
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Build-gst-without-GL-tp22080441p22114487.html
Sent from the Gnu - Smalltalk mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]