John A. Stewart wrote:
> Hi all;
>
> This is Mesa and generic OpenGL based. I'd like to, in C,
> fork a process to render textures into OpenGL textures,
> rather than have the main thread do this.
>
> Can I simply fork() a process, then use the parent's
> GLXContext as the shareList parameter to the child's
> glXCreateContext() call?
>
> Any hints/tips/war stories?
In general, you can't do this. The GLX specification states that
for context sharing to take place, the two contexts' processes must
share the same address space. That won't be true if you fork/exec.
One exception is indirect GLX rendering. In principle, two separate
indirect GLX clients can share a GLXContext handle. I wouldn't be
surprised if that's a buggy path and wouldn't recommend it.
Have you considered using threads? Mesa and OpenGL are thread-safe
and context sharing among threads should work.
-Brian

Hi all;
This is Mesa and generic OpenGL based. I'd like to, in C,
fork a process to render textures into OpenGL textures,
rather than have the main thread do this.
Can I simply fork() a process, then use the parent's
GLXContext as the shareList parameter to the child's
glXCreateContext() call?
Any hints/tips/war stories?
Thanks;
John Stewart
CRC Canada
Ottawa.

On Fri, 20 Sep 2002, Lalithamba Guntupalli wrote:
> Can anybody give me an idea as to "how to create a circle &
> fill it with 2 colors,the circle should be split into 2 .as the line
> translates,the particular color should change(increase/decrease)
> accordingly..
This isn't really a Mesa question - but:
1) Just calculate the geometry you need and draw two sets of
coloured polygons. I'm not going to figure it out for you -
it's just high school stuff.
...or...
2) Draw a simple circle (I'd use a triangle fan with the
first vertex at the center of the circle)...use a two
colour texture to render it in two colours and translate
the texture (either by computing the texture coordinates
appropriately - or by using the OpenGL Texture Matrix).
----
Steve Baker (817)619-2657 (Vox/Vox-Mail)
L3Com/Link Simulation & Training (817)619-2466 (Fax)
Work: sjbaker@... http://www.link.com
Home: sjbaker1@... http://www.sjbaker.org

Hello,
Can anybody give me an idea as to "how to create a circle &
fill it with 2 colors,the circle should be split into 2 .as the line
translates,the particular color should change(increase/decrease)
accordingly..
kindly give me a clue
regards
lalitha

On Thu, 19 Sep 2002, Ross Miller wrote:
> My understanding is that OpenGL's smooth shading uses Gouraud shading.
Yes. It computes the lighting equation at each vertex of the polygon,
then interpolates the resulting colours to get a colour at each pixel.
> Is this correct? And is it part of the OpenGL spec...
Yes.
> or could an implementation choose to use Phong shading instead?
No.
> Also, my understanding is that both Phong and Gouraud shading use vertex
> normals, but that where Gouraud calculates the colors of the vertexes and
> then interpolates those colors, Phong shading interpolates the normals and
> evaluates a different normal for every pixel in the polygon. Is this
> correct?
Yes. Phong is obviously more compute-intensive because the lighting
equation has to be evaluated at every fragment (which might be a pixel -
or it might be a sub-pixel if FSAA is in use).
It's possible to implement Phong shading (or something very close to it)
on most modern graphics cards using various OpenGL extensions. The
next generation of cards (ATI's 9xxx and nVidia's NV3x machines) will
implement Phong shading more or less directly as a part of their
fragment programming extensions.
You can also get something very close to Phong shading by using
OpenGL's standard environment-mapping feature.
----
Steve Baker (817)619-2657 (Vox/Vox-Mail)
L3Com/Link Simulation & Training (817)619-2466 (Fax)
Work: sjbaker@... http://www.link.com
Home: sjbaker1@... http://www.sjbaker.org

Ross Miller wrote:
> Hello all,
> This isn't strictly a Mesa3d question, but I figure the folks on this list
> would know the answer, so...
>
> My understanding is that OpenGL's smooth shading uses Gouraud shading. Is
> this correct? And is it part of the OpenGL spec, or could an implementation
> choose to use Phong shading instead?
It's part of the OpenGL spec. I believe there's an extension for Phong
shading. It can also be accomplished with fragment programming, sphere/cube
mapping tricks, etc.
> Also, my understanding is that both Phong and Gouraud shading use vertex
> normals, but that where Gouraud calculates the colors of the vertexes and
> then interpolates those colors, Phong shading interpolates the normals and
> evaluates a different normal for every pixel in the polygon. Is this
> correct?
That's basically it, yes. Though one could get nit picky and get into
Phong shading vs. lighting, etc. I'll spare you.
-Brian

Hello all,
This isn't strictly a Mesa3d question, but I figure the folks on this l=
ist=20
would know the answer, so...
My understanding is that OpenGL's smooth shading uses Gouraud shading. I=
s=20
this correct? And is it part of the OpenGL spec, or could an implementat=
ion=20
choose to use Phong shading instead?
Also, my understanding is that both Phong and Gouraud shading use vertex=20
normals, but that where Gouraud calculates the colors of the vertexes and=
=20
then interpolates those colors, Phong shading interpolates the normals an=
d=20
evaluates a different normal for every pixel in the polygon. Is this=20
correct?
Thanks very much,
-Ross

shankar ghosh wrote:
> It will be nice if a beta version of Mesa comes out
> that implements the OpenGL 2.0 (as specified by
> 3dlabs) so the cute HLSL can be tested before OGL2.0
> comes out which seems to be quite far away.
> But I guess not many people have enough time to spare
> for this.
That's basically it. I'm hesitant to write code for an unfinished
spec, and I don't have any time to do so anyway.
> When will Mesa 5.0(?) be released ,implementing OGL 1.4?
Probably in October.
-Brian

It will be nice if a beta version of Mesa comes out
that implements the OpenGL 2.0 (as specified by
3dlabs) so the cute HLSL can be tested before OGL2.0
comes out which seems to be quite far away.
But I guess not many people have enough time to spare
for this.
When will Mesa 5.0(?) be released ,implementing OGL
1.4?
Shankar.
__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

Darrell Blake wrote:
> Hi,
>
> I'm wanting to use MesaGL's GLUT with my NVidia drivers. I know it's possible
> but I'm not sure how to do it. With NVidia having their nice closed source
> drivers and no DRI for X mesa runs really really slow (as you can imagine). I
> can't get OpenGL GLUT (from freshmeat.net) to install no matter what I do and
> have been trying for ages then someone raised this as an alternative. I'm
> hoping someone can help me do it. At the moment whenever I install mesa it
> overwrites my nvidia drivers and the only way to get the speed back up is to
> do a "make uninstall" in the mesa directory. I only want to install GLUT. I
> also tried freeGLUT but it's not very good at all and had to do quite a bit
> of messing about to get it installed.
Download Mesa (MesaLib*tar.gz and MesaDemos.tar.gz)
Build Mesa (and GLUT).
Look for the Mesa/src-glut/.libs/libGLU.so* file (or Mesa/lib/libGLUT*.so)
and copy it (and the symlinks) to /usr/lib/ or /usr/local/lib.
I.e. don't run 'make install' ; just copy the libGLUT*.so library files
by hand.
-Brian

Hi,
I'm wanting to use MesaGL's GLUT with my NVidia drivers. I know it's poss=
ible=20
but I'm not sure how to do it. With NVidia having their nice closed sourc=
e=20
drivers and no DRI for X mesa runs really really slow (as you can imagine=
). I=20
can't get OpenGL GLUT (from freshmeat.net) to install no matter what I do=
and=20
have been trying for ages then someone raised this as an alternative. I'm=
=20
hoping someone can help me do it. At the moment whenever I install mesa i=
t=20
overwrites my nvidia drivers and the only way to get the speed back up is=
to=20
do a "make uninstall" in the mesa directory. I only want to install GLUT.=
I=20
also tried freeGLUT but it's not very good at all and had to do quite a b=
it=20
of messing about to get it installed.
Please help.
Darrell

Hi,
My project use Qt and Mesa.
When using the ati dri driver, I experienced several crash
of the X server when trying to make a large selection(pickup matrix)
of elements in a scene.
Furthermore when I use several QT-OpenGl window, the context
is not correct.
I write here, because in each case, the bug doesn't appear when I use
the NVidia driver.
regards,
David Auber
--
_________________________________________
Auber David
Labri, University Bordeaux I
351 cours de la lib=E9ration
33405 Talence Cedex
Phone number : 05 56 84 84 27 / 06 09 17 33 95
E-mail: auber@...
E-Mail Tulip: auber@...
_________________________________________

Jim Newberry wrote:
> Hi,
> I have been chasing an X Server crash in (I know it is old...) 3.4.2-7.
> (RH Linux, i386, XFree 4.1.0-3, found using both "nv" and "savage" drivers)
>
> My application has multiple executables with GLX widgets
> (glwMDrawingAreaWidgetClass). I'm experiencing a crash in the situation
> where an application is closed whose GLX widget is at least partially
> obscured. The crash occurs when the window on top of the one that was
> closed is subsequently moved via its title bar. I can recreate the crash
> about 70% of the time. If (as a test), I don't call exit() when the user
> closes the window, but just unmap everything and have the process stay
> around, the X Server doesn't crash.
>
> When I run the X Server in debug using xfree-gdb, the call stack is
> pretty trashed at the time of the segmentation fault, but it seems to
> point to:
>
> XMesaForceCurrent (c=0x80) at xmesa1.c:2160
>
> The function is calling
> gl_make_current(c->gl_ctx, c->xm_buffer->gl_buffer);
>
> The gl_ctx argument is "valid", but c->xm_buffer is NULL, so the seg
> fault occurs.
>
> My (unsatisfying) workaround is to pop the window to the front (with
> XRaiseWindow) when the user does a close action, then delay the
> application's exit by installing an Xt timeout.
>
> Since it doesn't occur every time and seems to not be an issue if the
> GLX widget is unobscured, it seems like a synchronization problem to me.
>
> The questions I have are:
>
> * Am I on track at all with this?
>
> * I didn't see anything obvious in the version history notes that looks
> the same. Has this already been addressed and fixed?
>
> * Is there any better workaround or procedure to force synchronization
> before the program exits? I've tried both glXWaitGL and glXWaitX and saw
> no change in behavior.
>
>
> I have users crashing out to the login screen many times per day due to
> this (I believe), so I've got a significant problem on my hands. Any
> advice is welcome. Preferable would be a workaround so I don't have to
> patch users' stock RH distributions...
Could I get a copy of your program to test this? I could probably just
add a check for the NULL pointer to "fix" this but I'd rather investigate
to see if there's a deeper problem.
-Brian

Hi,
I have been chasing an X Server crash in (I know it is old...) 3.4.2-7.
(RH Linux, i386, XFree 4.1.0-3, found using both "nv" and "savage" drivers)
My application has multiple executables with GLX widgets
(glwMDrawingAreaWidgetClass). I'm experiencing a crash in the situation
where an application is closed whose GLX widget is at least partially
obscured. The crash occurs when the window on top of the one that was
closed is subsequently moved via its title bar. I can recreate the crash
about 70% of the time. If (as a test), I don't call exit() when the user
closes the window, but just unmap everything and have the process stay
around, the X Server doesn't crash.
When I run the X Server in debug using xfree-gdb, the call stack is pretty
trashed at the time of the segmentation fault, but it seems to point to:
XMesaForceCurrent (c=0x80) at xmesa1.c:2160
The function is calling
gl_make_current(c->gl_ctx, c->xm_buffer->gl_buffer);
The gl_ctx argument is "valid", but c->xm_buffer is NULL, so the seg fault
occurs.
My (unsatisfying) workaround is to pop the window to the front (with
XRaiseWindow) when the user does a close action, then delay the
application's exit by installing an Xt timeout.
Since it doesn't occur every time and seems to not be an issue if the GLX
widget is unobscured, it seems like a synchronization problem to me.
The questions I have are:
* Am I on track at all with this?
* I didn't see anything obvious in the version history notes that looks
the same. Has this already been addressed and fixed?
* Is there any better workaround or procedure to force synchronization
before the program exits? I've tried both glXWaitGL and glXWaitX and saw
no change in behavior.
I have users crashing out to the login screen many times per day due to
this (I believe), so I've got a significant problem on my hands. Any
advice is welcome. Preferable would be a workaround so I don't have to
patch users' stock RH distributions...
Thanks!
Jim
- Jim Newberry
- Applied Precision, LLC http://www.api.com
- Issaquah WA, USA

----- Original Message -----
From: "David Isaac" <WellWisher@...>
To: "Karl Schultz" <k.w.schultz@...>
Sent: Sunday, September 08, 2002 11:14 AM
Subject: Re: [Mesa3d-users] Building MESA3D
> Thank you very much.
>
> You have helped me solve the problem.
>
> But during the process of compiling the Library
> I reach to a to a command line:
>
> "copying Mesa GLU import library to library directory..."
> copy MesaGLU.lib ..\lib
> 1 file(s) copied.
>
> Making in src-glut subdirectory...
> NMAKE : fatal error U1077: 'cd' : return code '0x1'
> Stop.
>
> Could you please tell me how to solve this problem.
My first guess is that you did not download and unzip the MesaDemos zip
file. I think that the glut and demo code is in there.
It looks like I should modify the makefile so that it doesn't walk
directories that are not there, or place a note in the readme that says the
makefiles require both zip files to be unzipped.
But if you got this far, you did build the MesaGL and MesaGLU libraries.
>
> I would like to know if there is any documents for the Mesa3d so I can
starting dreaming my own Ideas.
Well, there is stuff in the docs directory. Also, there are a few files
called NOTES in some of the src subtrees that describe parts of the
architecture of Mesa and Mesa driver code.
>
> Thank you.
> David.
yep!!!
>
> --- "Karl Schultz" <k.w.schultz@...> wrote:
> >
> >----- Original Message -----
> >From: "David Isaac" <WellWisher@...>
> >To: <mesa3d-users@...>
> >Sent: Saturday, September 07, 2002 8:19 AM
> >Subject: [Mesa3d-users] Building MESA3D
> >
> >
> >> I am trying to compile my new download of Mesa3D and I am trying to
build
> >it with the Visual C++
> >>
> >> I am using windowsXP and I have set the environment variable to have a
> >path for may NMAKE command.
> >>
> >> But I get the following message:
> >> Making in src subdirectory...
> >> Makefile.win(9) : fatal error U1052: file 'win32.mak' not found Stop.
> >> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual
> >Studio\VC98\Bin\NMAKE.EXE"'
> >> : return code '0x2' Stop.
> >>
> >> I have set the path of my Visual C++ bin directory and include
directory
> >in the Environment variables.
> >> But it doesn't help.
> >
> >The symptom you describe is usually addressed by setting these
environment
> >variables.
> >
> >>
> >> Can anyone tell me how do I solve the problem.
> >
> >Take a look at VCVARS32.BAT in your vc98/bin directory. You might simply
> >try executing this file and then see if you can then build. If it does
> >work, then you might not be setting up your environment correctly. Be
sure
> >that you are setting the variables the same way it is done in the bat
file.
> >
> >I've added notes about this to the docs for the next releases.
> >
> >Karl
>
> _____________________________________________________________
> Get email for your site ---> http://www.everyone.net
>
> _____________________________________________________________
> Promote your group and strengthen ties to your members with
email@... by Everyone.net http://www.everyone.net/?btn=tag
>

----- Original Message -----
From: "David Isaac" <WellWisher@...>
To: <mesa3d-users@...>
Sent: Saturday, September 07, 2002 8:19 AM
Subject: [Mesa3d-users] Building MESA3D
> I am trying to compile my new download of Mesa3D and I am trying to build
it with the Visual C++
>
> I am using windowsXP and I have set the environment variable to have a
path for may NMAKE command.
>
> But I get the following message:
> Making in src subdirectory...
> Makefile.win(9) : fatal error U1052: file 'win32.mak' not found Stop.
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual
Studio\VC98\Bin\NMAKE.EXE"'
> : return code '0x2' Stop.
>
> I have set the path of my Visual C++ bin directory and include directory
in the Environment variables.
> But it doesn't help.
The symptom you describe is usually addressed by setting these environment
variables.
>
> Can anyone tell me how do I solve the problem.
Take a look at VCVARS32.BAT in your vc98/bin directory. You might simply
try executing this file and then see if you can then build. If it does
work, then you might not be setting up your environment correctly. Be sure
that you are setting the variables the same way it is done in the bat file.
I've added notes about this to the docs for the next releases.
Karl

Hi to all programmers,
I am trying to compile my new download of Mesa3D and I am trying to build
it
with the Visual C++
I am using windowsXP and I have set the environment variable to have a path
for
may NMAKE command.
But I get the following message:
Making in src subdirectory...
Makefile.win(9) : fatal error U1052: file 'win32.mak' not found Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual
Studio\VC98\Bin\NMAKE.EXE"'
: return code '0x2' Stop.
I have set the path of my Visual C++ bin directory and include directory
in the
Environment variables.
But it doesn't help.
Can anyone tell me how do I solve the problem.
Thank you.
David Isaac.
_____________________________________________________________
Get email for your site ---> http://www.everyone.net
_____________________________________________________________
Promote your group and strengthen ties to your members with email@... by Everyone.net http://www.everyone.net/?btn=tag

I am trying to compile my new download of Mesa3D and I am trying to build it with the Visual C++
I am using windowsXP and I have set the environment variable to have a path for may NMAKE command.
But I get the following message:
Making in src subdirectory...
Makefile.win(9) : fatal error U1052: file 'win32.mak' not found Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\VC98\Bin\NMAKE.EXE"'
: return code '0x2' Stop.
I have set the path of my Visual C++ bin directory and include directory in the Environment variables.
But it doesn't help.
Can anyone tell me how do I solve the problem.
Thank you.
David Isaac.
_____________________________________________________________
Get email for your site ---> http://www.everyone.net
_____________________________________________________________
Promote your group and strengthen ties to your members with email@... by Everyone.net http://www.everyone.net/?btn=tag

Community

Help

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

CountryState

JavaScript is required for this form.

I agree to receive quotes, newsletters and other information from sourceforge.net and its partners regarding IT services and products. I understand that I can withdraw my consent at any time. Please refer to our Privacy Policy or Contact Us for more details