
Blending and lighting problems on ubuntu
Posted Thursday, 30 October, 2008 - 19:07 by puklaus inMaybe just some stupid bugs that i cant see but heres the problem:
On ubuntu 8.04 (tested with mesa and ati official drivers):
When I draw png images with alpha (transclusent(?) images),
it will become darker than on xp.
Look at the picture I uploaded.
And second problem, on ubuntu, when I update lights position,
scene flickers. These works fine on xp.
In the zip file you can find sources, images and Release .exe.
| Attachment | Size |
|---|---|
| blending.JPG | 28.11 KB |
| Opentk_testaus.rar | 338.11 KB |


Comments
Re: Blending and lighting problems on ubuntu
Thanks, I'm testing right now. You are using the drivers from the package manager, right? (That is, catalyst 8.3 if I remember correctly).
Edit: What happens if you move all GL calls from the constructor to the OnLoad method? (Override or hook the OnLoad event). The OpenGL context is not guaranteed to be available in the constructor (this may change in the future).
Re: Blending and lighting problems on ubuntu
Yes, from package manager (it downloads them when i enable restricted drivers).
Oops I meant write setup GL calls to Onload, but if these calls are in the
OnLoad or even the render method, it doesnt fix the problem.
Re: Blending and lighting problems on ubuntu
Ok, I'll reboot to ubuntu and check there.
Re: Blending and lighting problems on ubuntu
Lighting problem solved!
GL.Lightv(LightName.Light0, LightParameter.Position, new float[] { x, y, z });
needs to be
GL.Lightv(LightName.Light0, LightParameter.Position, new float[] { x, y, z, 1 });
Did you tested blending? Is it dark at your machine too?
Re: Blending and lighting problems on ubuntu
Well..
I changed images to non-alpha (black background) images and BlendFunc to
GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.One);
And using GL.Color4 maybe i get what i want.
I think this is the way to go, works with linux too.