I am seeing a nasty render problem on the intel x3100 card, under
linux only. The same card works correctly on windows XP. Nvidia and
ATI cards also work correctly under linux. Has anyone noticed this
sort of problem before? Might there be something wrong with my code,
it seems unlikely at the moment though.
Here are some screen shots that show the lighting way out on linux:
http://jason.spashett.com/pics/gltest/
I setup lighting once:
// Setup lighting
glEnable(GL_DEPTH_TEST);
glEnable(GL_TEXTURE_2D);
glEnable(GL_LIGHTING);
glDisable(GL_COLOR_MATERIAL);
GLfloat Ambient[4] = [0.5f, 0.5f, 0.5f, 1.0f];
GLfloat whiteDiffuse[4] = [1f, 1f, 0.8f, 1.0f];
GLfloat light_position[4] = [5, 10, 10, 0];
glLightfv(GL_LIGHT0, GL_POSITION, &light_position[0]);
glLightfv(GL_LIGHT0, GL_AMBIENT, &Ambient[0]);
glLightfv(GL_LIGHT0, GL_DIFFUSE, &whiteDiffuse[0]);
glEnable(GL_LIGHT0);
glShadeModel(GL_SMOOTH);
glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL,
GL_SEPARATE_SPECULAR_COLOR);
Then when drawing the model:
Before geometry output:
m.texture.bind();
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
And then In a gemetry render loop I use the same material:
// Material properties
GLfloat mat_diffuse[4] = [0.9, 0.9, 0.9, 0];
GLfloat mat_specular[4] = [0.9, 0.9, 0.9, 0];
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, &mat_diffuse[0]);
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, &mat_specular[0]);
glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 100);
glVertex3f(x, y, z);
NB - Language is Digital Mars D
|
|
0
|
|
|
|
Reply
|
Spacen
|
7/8/2008 9:02:48 AM |
|
Spacen Jasset schrieb:
> I am seeing a nasty render problem on the intel x3100 card, under
> linux only. The same card works correctly on windows XP. Nvidia and
> ATI cards also work correctly under linux. Has anyone noticed this
> sort of problem before? Might there be something wrong with my code,
> it seems unlikely at the moment though.
Well, suppose it's a driver bug - what's your driver version (GL
version, vendor an renderer strings, maybe just post the glxinfo output?)?
Philipp
|
|
0
|
|
|
|
Reply
|
Philipp
|
7/8/2008 6:15:37 PM
|
|
On Jul 8, 11:02=A0am, Spacen Jasset <jmspash...@gmail.com> wrote:
> Here are some screen shots that show the lighting way out on linux:
>
I think the problem is texture, not lighting. One has texture, one
doesn't.
> Before geometry output:
>
> m.texture.bind();
> glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
> glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
> glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
>
This might be the problem. Some drivers don't like to change the min/
max
filters after you set the texture image. To change the filters they
would have
to recalculate all the mipmaps, etc., and this isn't always easy to
do.
Technically they could do it, but in practice some don't.
|
|
0
|
|
|
|
Reply
|
fungus
|
7/9/2008 6:33:00 AM
|
|
> Before geometry output:
>
> m.texture.bind();
> glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
> glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
> glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
>
This might be the problem. Some drivers don't like to change the min/
max filters after you set the texture image.
Oh NO! I have a function that relies on this to work. Luckily noone
complained before.
Would I have to re-upload all the images again otherwise? <shivers\>
|
|
0
|
|
|
|
Reply
|
Gernot
|
7/10/2008 2:39:57 PM
|
|
On Jul 9, 7:33=A0am, fungus <openglMYSO...@artlum.com> wrote:
> On Jul 8, 11:02=A0am, Spacen Jasset <jmspash...@gmail.com> wrote:
>
> > Here are some screen shots that show the lighting way out on linux:
>
> I think the problem is texture, not lighting. One has texture, one
> doesn't.
>
> > Before geometry output:
>
> > m.texture.bind();
> > glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
> > glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
> > glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
>
> This might be the problem. Some drivers don't like to change the min/
> max
> filters after you set the texture image. To change the filters they
> would have
> to recalculate all the mipmaps, etc., and this isn't always easy to
> do.
>
> Technically they could do it, but in practice some don't.
So far this doesn't seem to be the problem - in the screen shot you
can just about see the textures, except they appear over saturated. I
am currently stripping out lots of code down to the minimum to see if
I can find the problem. It doesn't work with texuring disabled either.
But I notice if I resize the SDL window, sometimes I get a specular
like effect, but it's all jagged and horid, nothing like the windows
or nvidia versions. I'll post back if and when I find out any more.
My render is correct (I think):
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) 965GM 4.1.3002 x86/MMX/SSE2
OpenGL version string: 1.4 Mesa 7.0.3-rc2
OpenGL extensions:
|
|
0
|
|
|
|
Reply
|
Spacen
|
7/10/2008 6:39:50 PM
|
|
Spacen Jasset schrieb:
> My render is correct (I think):
> OpenGL vendor string: Tungsten Graphics, Inc
> OpenGL renderer string: Mesa DRI Intel(R) 965GM 4.1.3002 x86/MMX/SSE2
> OpenGL version string: 1.4 Mesa 7.0.3-rc2
> OpenGL extensions:
You might want to try a newer version, though the only 965 bug (except
for one about fragment shaders and one about sRGB texture readback) in
7.0.3-rc2 mentioned on the mailing list refers to another king of
graphics corruption:
http://pc486.net/screenshot/mesa-7-0-g965-incorrect.png
vs
http://pc486.net/screenshot/mesa-7-0-g965-correct.png
Philipp
|
|
0
|
|
|
|
Reply
|
Philipp
|
7/10/2008 10:13:11 PM
|
|
"Gernot Frisch" <me@privacy.net> wrote in message
news:6dml1sF3d7skU1@mid.individual.net...
>
>> Before geometry output:
>>
>> m.texture.bind();
>> glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
>> glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
>> glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
>>
>
> This might be the problem. Some drivers don't like to change the min/
> max filters after you set the texture image.
>
> Oh NO! I have a function that relies on this to work. Luckily noone
> complained before.
>
> Would I have to re-upload all the images again otherwise? <shivers\>
are your normals normalized? Is there a non-normalizing transform in play ?
It looks like a specular light problem. Do you have separate specular turned
on ? (you should).
jbw
|
|
0
|
|
|
|
Reply
|
jbwest
|
7/11/2008 1:25:31 AM
|
|
On 11 Jul, 02:25, "jbwest" <jbw...@comcast.net> wrote:
> "Gernot Frisch" <m...@privacy.net> wrote in message
>
> news:6dml1sF3d7skU1@mid.individual.net...
>
>
>
>
>
> >> Before geometry output:
>
> >> m.texture.bind();
> >> glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
> >> glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
> >> glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
>
> > This might be the problem. Some drivers don't like to change the min/
> > max filters after you set the texture image.
>
> > Oh NO! I have a function that relies on this to work. Luckily noone
> > complained before.
>
> > Would I have to re-upload all the images again otherwise? <shivers\>
>
> are your normals normalized? Is there a non-normalizing transform in play ?
> It looks like a specular light problem. Do you have separate specular turned
> on ? (you should).
>
> jbw
I load the normals from a lightwave .obj file, and I did in the past
check them to make sure they are of length 1. I'll recheck that again
to make sure they are the right length and point the right way and so
on. I'd expect it to not work on all cards if that was wrong though.
I have no scaling transfoms, only translation and rotation. But I
could turn on the automatic normalisation option in opengl I guess.
Interestingly enough when OpenGL Renderer is: GLX Mesa indirect on a
vmware installation the same problem occurs, this means that there is
something wrong in my code doesn't it? As mesa is doing all the
rendering and not using DRI?
|
|
0
|
|
|
|
Reply
|
Spacen
|
7/11/2008 9:35:46 AM
|
|
Spacen Jasset wrote:
> Interestingly enough when OpenGL Renderer is: GLX Mesa indirect
> on a vmware installation the same problem occurs, this means
> that there is something wrong in my code doesn't it? As mesa is
> doing all the rendering and not using DRI?
"Indirect" just means, that the GLX and X11 network layer is not
bypassed. So it's perfectly possible, that DRI is used.
Wolfgang Draxinger
--
E-Mail address works, Jabber: hexarith@jabber.org, ICQ: 134682867
|
|
0
|
|
|
|
Reply
|
Wolfgang
|
7/11/2008 10:25:33 AM
|
|
|
8 Replies
173 Views
(page loaded in 2.855 seconds)
Similiar Articles: texture-mapping differences between Linux and Mac for Bezier ...Direct rendering is, if the OpenGL library can ... Obviously this is possibly only if the program ... intellinuxgraphics.org/ which talks about Linux drivers for Intel ... request for advice - comp.graphics.api.opengl... is better but its support has problems on its own (at least on linux). For example - Intel ... How to do windowless offscreen rendering ... In only seconds, you can submit a ... Fast 2D blit and Fast Texture Upload - comp.graphics.api.opengl ...I found Nvidia graphics cards only support GL_BGRA as ... my program on on-board graphics chip such as intel 965G ... OpenGL video rendering - comp.graphics.api.opengl Later, in ... glVertexAttribPointer versus glNormalPointer - comp.graphics.api ...I got a Mac with Intel > graphics, on which I could do ... and (3) I am using this ARB extension, the only ... look at alternatives for (3) and that avoid the problems ... Fast memcpy() ??? - comp.lang.c++... on 32-bit machines for both Linux ... people have thought of all these issues ... comp.graphics.api.opengl I'm now rendering video using PBO, very fast. The problem was Intel ... FLAT Mode in Real Mode? - comp.lang.asm.x86... System is independment from depending on Linux ... programs problems. > > Why would it cause problems? The only ... out the ATI FIREGL's go into *software* rendering mode ... SPEED TEST: DirectX9 vs openGL - comp.graphics.api.opengl ...Only because I would like to see my own ... C++), but graphical glitches, incorrect rendering and performance issues. ... file copy speed - comp.unix.solaris AMD vs Intel ... [comp.publish.cdrom] CD-Recordable FAQ, Part 1/4 - comp.publish ...Archive-name: cdrom/cd-recordable/part1 Posting-Frequency: monthly Last-modified: 2008/10/09 Version: 2.71 Send corrections and updates to And... GUI for Fortran programs - comp.lang.fortranI also need to have a multiplatform software (Linux ... if you get into use of many python packages. EPD is only ... Tutorial for Intel Visual Fortran 11 - comp.lang.fortran ... improve strlen - comp.lang.asm.x86I also keep rendering module not too integrated ... the assumption that assembler is written only for immediate code problems ... If the Linux desktop market is 2%, gaming is 0 ... GMA X3100 Glx/Direct Rendering under intel driver... Linux Forums > Linux - Hardware: GMA X3100 Glx/Direct Rendering under intel driver ... If you have any problems with ... try to make direct rendering calls (blender is the only ... Intel GMA - Wikipedia, the free encyclopediaIntel releases official Linux drivers through the IEGD (Intel Embedded ... WDDM driver for GMA900 (due to issues with the ... Extraction Point, where it was able to render only 4 ... 7/24/2012 7:20:40 AM
|