Author Topic: [linux] OpenGL error 0x0502 at Material::useEffect 1.  (Read 128163 times)

court-jus

  • Apprentice
  • *
  • Posts: 1
    • View Profile
[linux] OpenGL error 0x0502 at Material::useEffect 1.
« on: July 27, 2011, 01:05:33 PM »
When I launch cogs, its window keeps black. The buttons of the menu are active (I see the 'hand' cursor and when I click blindly on a button, there's a 'blinking' but everything keeps black).

I've copied the log in pastebin here : http://pastebin.com/QZ8NskeV

Thanks for your support

admin

  • Rob
  • Administrator
  • Widgeteer
  • *****
  • Posts: 218
    • View Profile
Re: [linux] OpenGL error 0x0502 at Material::useEffect 1.
« Reply #1 on: July 27, 2011, 01:41:55 PM »
The warnings that are showing up in your log file suggest that either the OpenGL drivers are out of date or your graphics card doesn't have the horsepower to run Cogs.  Depending on your Linux flavor, you may need to hunt for the graphics card manufacturer's drivers yourself.

If you're certain that your graphics drivers are current and that your graphics card should have hardware support for OpenGL 2.0 with hardware Transforms and Lighting (T&L), let me know and I'll keep digging for a fix.

Rob
Founder, Lazy 8 Studios
rob@lazy8studios.com

Samushighwind

  • Apprentice
  • *
  • Posts: 2
    • View Profile
Re: [linux] OpenGL error 0x0502 at Material::useEffect 1.
« Reply #2 on: July 27, 2011, 02:13:42 PM »
Same problem here, and I've seen it reported elsewhere.  It's understandable if you just now ported it to Linux, but a fix would be greatly appreciated!  Thanks

Ubuntu 11.04 btw

mastersyl

  • Apprentice
  • *
  • Posts: 1
    • View Profile
Re: [linux] OpenGL error 0x0502 at Material::useEffect 1.
« Reply #3 on: July 27, 2011, 02:53:21 PM »
Same problem here,

I have an ATI radeon HD5700
CPU i7 860 (quad core)
8 Gbytes
ubuntu 11.04

Hope my Pc is powerful enough to play the game  ;D

SomeoneOrOther

  • Apprentice
  • *
  • Posts: 1
    • View Profile
Re: [linux] OpenGL error 0x0502 at Material::useEffect 1.
« Reply #4 on: July 27, 2011, 05:21:29 PM »
I'm also having the same problem. My computer has a Radeon 6870, and I'm using the Catalyst drivers, version 11.6, on kernel 2.6.39.3.

admin

  • Rob
  • Administrator
  • Widgeteer
  • *****
  • Posts: 218
    • View Profile
FIXED
« Reply #5 on: July 27, 2011, 10:31:04 PM »
FIXED

This is a fix for the bug where Cogs launches with the following output:

Shader compile log for data/effects/TextureBumpCubemap.fsh:
Fragment shader failed to compile with the following errors:
ERROR: 0:41: error(#132) Syntax error: 'smooth' parse error
ERROR: error(#273) 1 compilation errors.  No code generated


Apparently the word "smooth" is reserved, but only on ATI cards in Linux.  The fix is to modify the following file.

~/games/cogs/data/effects/TextureBumpCubemap.fsh

Just do a global replace of the word "smooth" with "Smooth".

A huge thanks to Renee Marie Jones, who figured this one out :)

Rob
Founder, Lazy 8 Studios

ced117

  • Apprentice
  • *
  • Posts: 1
  • Linux team
    • View Profile
    • ced117, le pur geek dfenseur du logiciel libre
Re: [linux] OpenGL error 0x0502 at Material::useEffect 1.
« Reply #6 on: July 28, 2011, 06:14:40 AM »
Yep, it's working.

Thank you ;)
ced117, le pur geek dfenseur du logiciel libre

Samushighwind

  • Apprentice
  • *
  • Posts: 2
    • View Profile
Re: [linux] OpenGL error 0x0502 at Material::useEffect 1.
« Reply #7 on: July 28, 2011, 10:38:56 AM »
Works like a charm, thanks!

metaltyty

  • Apprentice
  • *
  • Posts: 3
    • View Profile
Re: [linux] OpenGL error 0x0502 at Material::useEffect 1.
« Reply #8 on: July 28, 2011, 02:53:56 PM »
Hi

My problem is similar to this. After launch Cobs, a got a black screen then a crash. The follow log is from the terminal after the crash.

Quote
OpenGL error 0x0502 at Material::useEffect 1.
OpenGL error 0x0502 at Material::useEffect 2.
OpenGL error 0x0502 at Material::useEffect 3.
OpenGL error 0x0502 at Material::useEffect 4.

Try the "smooth" by "Smooth" solution above. Same issue.

Config:
Archlinux x86_64
AMD Phenom II X4 840
Nvidia GeForce 9400 GT
4Gb de RAM

admin

  • Rob
  • Administrator
  • Widgeteer
  • *****
  • Posts: 218
    • View Profile
Re: [linux] OpenGL error 0x0502 at Material::useEffect 1.
« Reply #9 on: July 28, 2011, 02:57:18 PM »
Can you capture the first 50 or so lines from the log output?  You should be able to just grab this from ~/.local/share/Cogs/log.txt

In generaly, it sounds like most problems have been fixed by installing the latest drivers.  Note that even if you have a 64-bit system, you'll need to have the 32-bit drivers in place.

metaltyty

  • Apprentice
  • *
  • Posts: 3
    • View Profile
Re: [linux] OpenGL error 0x0502 at Material::useEffect 1.
« Reply #10 on: July 28, 2011, 03:44:48 PM »
Thks for your reactivity

the log file is very very long, because of loop of the "OpenGL error 0x0502 at Material::useEffect 1/2/3/4"

But, here is the begining:

Quote
Log output for Cogs build 110309, Cogs Linux 1.0.1
Video driver: x11
Loading preferences.
Loading localized strings.
Successfully loaded texture data/textures/splashscreen.dds
Initializing sound.
Loading asset library.
Loading level info.
write me: /home/icculus/projects/cogs-linux/src/main.cpp:972Initializing Interface3D
Initializing asset library.
Successfully loaded texture data/textures/woodtile01.dds
Successfully loaded texture data/textures/woodtile01-normal.dds
Successfully loaded texture data/textures/parchment.dds
Successfully loaded texture data/textures/counter.dds
Successfully loaded texture data/loc/english/uiDebrief.dds
Successfully loaded texture data/loc/english/uiDebrief-normal.dds
Successfully loaded texture data/textures/awardDone.dds
Successfully loaded texture data/textures/awardDone-normal.dds
Successfully loaded texture data/textures/awardMoves.dds
Successfully loaded texture data/textures/awardMoves-normal.dds
Successfully loaded texture data/textures/awardTime.dds
Successfully loaded texture data/textures/awardTime-normal.dds
Successfully loaded texture data/loc/english/uiDetails.dds
Successfully loaded texture data/loc/english/uiDetails-normal.dds
Successfully loaded texture data/textures/uiEntryMain.dds
Successfully loaded texture data/textures/uiEntryMain-normal.dds
Successfully loaded texture data/textures/uiLogoLetters.dds
Successfully loaded texture data/textures/uiLogoLetters-normal.dds
Successfully loaded texture data/loc/english/uiEntryMenu.dds
Successfully loaded texture data/loc/english/uiEntryMenu-normal.dds
Successfully loaded texture data/textures/galileo_cubemap.dds
Successfully loaded texture data/textures/chime_cubemap.dds
Successfully loaded texture data/textures/irisCubemap.dds
Successfully loaded texture data/textures/normal-noise.dds
Successfully loaded texture data/textures/counter-time-dial.dds
Successfully loaded texture data/textures/counter-moves-dial.dds
Successfully loaded texture data/textures/iris-blade.dds
Successfully loaded texture data/textures/iris-bump.tga
Successfully loaded texture data/textures/bronze.dds
Successfully loaded texture data/textures/copper.dds
Successfully loaded texture data/textures/silver.dds
Successfully loaded texture data/textures/chimegold.dds
Successfully loaded texture data/textures/chimesilver.dds
Successfully loaded texture data/textures/chimecopper.dds
Successfully loaded texture data/textures/gear-pegs.dds
Successfully loaded texture data/textures/gear02.dds
Successfully loaded texture data/textures/scratches01-normal.dds
Successfully loaded texture data/loc/english/uiHowTo.dds
Successfully loaded texture data/loc/english/uiHowTo-normal.dds
Successfully loaded texture data/textures/clockHand.dds
Successfully loaded texture data/loc/english/uiOptions.dds
Successfully loaded texture data/loc/english/uiOptions-normal.dds
Successfully loaded texture data/textures/uiHudDrivewheel.dds
Successfully loaded texture data/textures/uiHudLowerShaft.dds
Successfully loaded texture data/textures/uiHudSwingarm.dds
Successfully loaded texture data/textures/uiHudUpperShaft.dds
Successfully loaded texture data/textures/uiHudCounterweight.dds
Successfully loaded texture data/textures/uiHudClockTime.dds
Successfully loaded texture data/textures/uiHudClockMoves.dds
Successfully loaded texture data/loc/english/uiHud.dds
Successfully loaded texture data/loc/english/uiHud-normal.dds
Successfully loaded texture data/textures/buttonRound.dds
Successfully loaded texture data/textures/buttonLocked.dds
Successfully loaded texture data/textures/tuneIndicator.dds
Shader compile log for data/effects/TextureBumpCubemap.vsh:
YyW6Օ%W*AzYY^8
Failed to compile vertex shader data/effects/TextureBumpCubemap.vsh
Shader compile log for data/effects/TextureAlpha.vsh:
worldEye - worldPos;
    vec3 vLightDirection = worldLight - worldPos;

    toLight.x = dot(vLightDirection, worldTangent);
    toLight.y = dot(vLightDirection, worldBinormal);
    toLight.z = dot(vLightDirection, worldNormal);

    toEye.x = dot(vViewDirection, worldTangent);
    toEye.y = dot(vViewDirection, worldBinormal);
    toEye.z = dot(vViewDirection, worldNormal);
}
Failed to compile vertex shader data/effects/TextureAlpha.vsh
Shader compile log for data/effects/ShadowMap.vsh:
tNtN
Failed to compile vertex shader data/effects/ShadowMap.vsh
Shader compile log for data/effects/Texture.vsh:
.y*texTransform.z + texTransform.w);
    worldNormal   = normalize(matNormal * normal);
    //vec3 worldBinormal = normalize(matNormal * binormal);
    //vec3 worldTangent  = normalize(matNormal * tangent);
   
    //basis = mat3(worldBinormal, worldTangent, worldNormal);

    // Get a vector to the light in world coordinates
    vec4 posWorld = matWorld * position;
    toLight = normalize(worldLight - posWorld.xyz);
    toEye = normalize(worldEye - posWorld.xyz);
}
Failed to compile vertex shader data/effects/Texture.vsh
Initializing particle manager.
Successfully loaded texture data/textures/steam.dds
Successfully loaded texture data/textures/particle-fire.dds
Successfully loaded texture data/loc/english/font18black.tga
Successfully loaded texture data/loc/english/font18black-selected.tga
Successfully loaded texture data/textures/fontSymbols.tga
Successfully loaded texture data/loc/english/font28black.tga
Creating offscreen scroller texture 512x1024.
Initializing off-screen canvas texture with dimensions 352x44.
Initializing off-screen canvas texture with dimensions 352x44.
Initializing off-screen canvas texture with dimensions 608x456.
Initializing off-screen canvas texture with dimensions 608x456.
Initializing off-screen canvas texture with dimensions 320x240.
Initializing off-screen canvas texture with dimensions 320x240.
Successfully loaded texture data/loc/german/language.dds
Successfully loaded texture data/loc/english/language.dds
Successfully loaded texture data/loc/spanish/language.dds
Successfully loaded texture data/loc/french/language.dds
Successfully loaded texture data/loc/italian/language.dds
Successfully loaded texture data/loc/lolspeak/language.dds
Successfully loaded texture data/loc/dutch/language.dds
Successfully loaded texture data/loc/polish/language.dds
Successfully loaded texture data/loc/portuguese/language.dds
Successfully loaded texture data/loc/russian/language.dds
Creating offscreen scroller texture 256x512.
Shader compile log for data/effects/Screen_Copy.vsh:
puNpuN
Failed to compile vertex shader data/effects/Screen_Copy.vsh
Shader compile log for data/effects/Screen_Combine.vsh:
puNpuN
Failed to compile vertex shader data/effects/Screen_Combine.vsh
Shader compile log for data/effects/Screen_DownFilter4.vsh:
puNpuN
Failed to compile vertex shader data/effects/Screen_DownFilter4.vsh
Shader compile log for data/effects/Screen_BlurHorizontal.vsh:
puNpuN
Failed to compile vertex shader data/effects/Screen_BlurHorizontal.vsh
Shader compile log for data/effects/Screen_BlurVertical.vsh:
puNpuN
Failed to compile vertex shader data/effects/Screen_BlurVertical.vsh
Closing splash screen.

I have just installed the Nvidia VDPAU library (32-bit). Try another driver other than the generic nvidia but have some issues with dependencies. I Will try again tomorrow.

Thaks again

admin

  • Rob
  • Administrator
  • Widgeteer
  • *****
  • Posts: 218
    • View Profile
Re: [linux] OpenGL error 0x0502 at Material::useEffect 1.
« Reply #11 on: July 28, 2011, 04:01:26 PM »
metaltyty: It appears that even the simplest vertex and fragment shaders are failing to compile, which suggests that this is a problem with your graphics drivers.  Even if you have the right drivers, some people love to tweak their systems and mess with the driver settings... if you're prone to doing that, you may want to make sure that the graphics settings are set to their defaults.

metaltyty

  • Apprentice
  • *
  • Posts: 3
    • View Profile
Re: [linux] OpenGL error 0x0502 at Material::useEffect 1.
« Reply #12 on: July 29, 2011, 08:48:32 AM »
Upgrade to Linux 3 fix the issue. Hope this help someone.

Thanks again.

By the wait, good game! Have fun!

admin

  • Rob
  • Administrator
  • Widgeteer
  • *****
  • Posts: 218
    • View Profile
Re: [linux] OpenGL error 0x0502 at Material::useEffect 1.
« Reply #13 on: July 29, 2011, 12:02:17 PM »
Patch Released

A new Linux installer is now available at the Humble Bundle website.  Here are the fixes:
  • Game now works on systems without S3TC support. If your system has buggy S3TC support, you can disable it with the -nos3tc command line option.
  • Fixed game rendering on ATI's fglrx drivers.
  • Added -force command line option to ignore hardware compatibility warnings.
  • Removed some debug output that got left in by accident.
Note that if you're still seeing warnings about lack of hardware support for fragment shaders and vertex shaders, then you may not have the hardware horespower needed to run Cogs, or you may simply need to update your graphics drivers.  Even if you're using a 64-bit system, you may need to install the 32-bit drivers.