Looks like your code is not finding any mgl*() prototypes. What #includes do you have? I think you need to #include "GL/gl_mangle.h" and then "GL/gl.h", IIRC.
-Brian On 08/24/2015 11:42 AM, Yuzhu Lu wrote:
Sorry. Here it is: osboxes@osboxes:~/Documents/mesa-demos-8.2.0/src/osdemos$ gcc -o osdemo32 osdemo32.c -I/usr/local/include/ -I/home/osboxes/Documents/mesa-demos-8.2.0/src/util/ -L/usr/local/lib/ -lMangledOSMesa32 osdemo32.c: In function ‘Init’: osdemo32.c:122:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] printf("GL_RENDERER = %s\n",(const char *) mglGetString(GL_RENDERER)); ^ osdemo32.c: In function ‘main’: osdemo32.c:449:1: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat=] printf("Vendor: %s\n", mglGetString(GL_VENDOR)); ^ osdemo32.c:450:1: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat=] printf("Renderer: %s\n", mglGetString(GL_RENDERER)); ^ osdemo32.c:451:1: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat=] printf("Version: %s\n", mglGetString(GL_VERSION)); ^ osdemo32.c:452:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] printf("GL_PROGRAM_ERROR_STRING_ARB: = %s\n",(const char *)mglGetString(GL_PROGRAM_ERROR_STRING_ARB)); Yuzhu ------------------------------------------------------------------------ *From: *"Brian Paul" <bri...@vmware.com> *To: *"Yuzhu Lu" <yu...@wolfram.com> *Cc: *mesa-dev@lists.freedesktop.org, mesa-us...@lists.freedesktop.org *Sent: *Monday, August 24, 2015 6:07:19 PM *Subject: *Re: [Mesa-users] [Mesa-dev] glClearColor is broken in a weird way if compiled with mangling enabled On 08/24/2015 10:51 AM, Yuzhu Lu wrote: > Hi Brian, > > It happens for all the configuration I tried. Here is one example: > > ./configure --disable-xvmc --disable-glx --disable-dri > --with-dri-drivers="" --with-gallium-drivers="swrast" > --enable-texture-float --enable-shared-glapi --disable-egl > --enable-mangling --with-egl-platforms="" --enable-gallium-osmesa > --enable-gallium-llvm=yes --disable-llvm-shared-libs > > I am not sure this is related. I am using 64bit Ubuntu. > > Here are the only warnings I get: > > nir/glsl_to_nir.cpp: In member function 'virtual void > {anonymous}::nir_visitor::visit(ir_call*)': > nir/glsl_to_nir.cpp:610:73: warning: 'op' may be used uninitialized in > this function [-Wmaybe-uninitialized] > nir_intrinsic_instr *instr = nir_intrinsic_instr_create(shader, op); > > nir/nir_lower_phis_to_scalar.c: In function 'is_phi_src_scalarizable': > nir/nir_lower_phis_to_scalar.c:70:14: warning: 'or' of unmatched > not-equal tests is always 1 > src_alu->op != nir_op_vec4; > ^ > CXX nir/nir_lower_samplers.lo > nir/nir_lower_samplers.cpp: In function 'void > lower_sampler(nir_tex_instr*, gl_shader_program*, const gl_program*, > void*)': > nir/nir_lower_samplers.cpp:72:9: warning: unused variable 'has_indirect' > [-Wunused-variable] > bool has_indirect = false; I was asking about the compiler options/warnings when you compile your mgl application, not Mesa itself. -Brian
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev