Topic: OpenGL problem
ChemBro Topic Opener |
Posted at:
2010-11-25, 21:18 UTC+1.0
Somehow, the OpenGL option in Widelands doesn't work for me (it worked for me, when there was the opengl-branch). I start widelands with "--opengl=1" and the output says, that OpenGL is enabled, but it is in fact not. Two things that say to me, that OpenGL is somehow not used:
My question is: Why does it not work (besides it is in experimental stage)? And how can I find out to get it working or why it does not work? The output, when I start Widelands (the relevant one, in my opinion): $ ./widelands --opengl=1 Set home directory: /home/christian/.widelands No version file found LANG de_DE.utf8, LANGUAGE de_DE.utf8:de localedir : /home/christian/widelands-bzr/locale using locale de_DE.utf8 Adding directory:./. Version file found with id "bzr5752[widelands-bzr]" (real "bzr5752[widelands-bzr]" ) No version file found Adding directory:/usr/share/games/widelands Adding directory:. Version file found with id "bzr5752[widelands-bzr]" (real "bzr5752[widelands-bzr]" ) No version file found SDL_VIDEODRIVER=& Graphics: Trying Video driver: 0 x11 SDL_VIDEODRIVER=x11 Graphics: Trying opengl Graphics: Try to set Videomode 1024x768 32Bit Graphics: Setting video mode was successful Graphics: OpenGL: OpenGL enabled Graphics: OpenGL: Double buffering enabled Graphics: OpenGL: Max texture size: 8192 Graphics: OpenGL: Number of aux buffers: 0 Graphics: OpenGL: Number of stencil buffer bits: 8 Graphics: OpenGL: Version 3.3 "3.3.10317 Compatibility Profile Context" Graphics: OpenGL: Textures may have any size ![]() ![]() |
ixprefect |
Posted at:
2010-11-26, 18:27 UTC+1.0
Has anything else changed in your setup? Perhaps it is a matter of compositing vs. non-compositing, or another change of drivers? Can you record other OpenGL applications? I don't think those messages would appear if an OpenGL context had not been created. Try to look for the OpenGL-specific rendering glitches (e.g. no caret displayed in text fields). ![]() ![]() |
ChemBro Topic Opener |
Posted at:
2010-11-26, 20:27 UTC+1.0
Well, some updates changed. I'm on Arch Linux and half a year later, there are many, many new updates. It did work half a year ago with the opengl-branch, but I didn't test that specific branch later, because it already merged with trunk. I don't use compositing in KDE/Kwin. And yes, I can record other OpenGL applications (like SuperTuxKart). And I am aware of the rendering glitches from OpenGL, but I can't see them (which also means, that OpenGL isn't active for me). I tested it with my AMD Radeon HD 4650 with Catalyst drivers and on my Netbook with Intel drivers: Same (no OpenGL) result. ![]() ![]() |
timowi |
Posted at:
2010-11-27, 14:13 UTC+1.0
Are you really sure you are not in OpenGL mode? How does the terrain looks? please post an in game screenshot. And if it really is not in opengl mode please give a longer output. Going through menu and starting a game. It's interesting which messages are there and which are missing. The "Graphics: OpenGL ..." messages are only printed if the SDL_Surface has a OpenGL context. If these messages are printed an opengl flag is set and the opengl rendering code is used. I see no chance that you are not using OpenGL rendering code. Perhaps there is only something wrong with OpenGL setup or with libraries so it does not use hardware OpenGL but software rendering. ![]() ![]() |
ChemBro Topic Opener |
Posted at:
2010-11-27, 14:56 UTC+1.0
I'm sure, that I started with "--opengl=1", but with no OpenGL-Support in the game. Output: http://widelands.pastebin.com/bydnyu03 Screenshot: http://dl.dropbox.com/u/4950273/widelandsnopengl.jpg And what do you mean by software rendering? That I'm using hardware rendering for all the other OpenGL-applications and for Widelands, I'm using software renderer only? ![]() ![]() |
timowi |
Posted at:
2010-11-27, 15:29 UTC+1.0
you definitely use opengl rendering With software rendering I mean that maybe the OpenGL commands are not rendered by your graphic card but by a OpenGL software renderer. I don't know how your capturer work, but if it grabs the Information from the graphics adapter it would not work in this case. Maybe it works by replacing libGL? I think this would be the easiest way to grab the rendering: replace the existing libGL and forward the commands to the real libGL. There are some reasons why it could be done in software on your system(s). Widelands using OpenGL mode just means widelands calls OpenGL function from a libGL to do the rendering. But it does not mean these get actually get rendered by hardware. You may have different libGL libraries on your system. These may have different capabilities. Maybe SDL is compiled with a wrong libGL version. Maybe widelands choose a bad gl visual which is not supported by your graphic card and so cause a fallback to software rendering. So first of all: how did you got your widelands? compiled from bzr or downloaded binary (a binary compiled on another system may be linked with a wrong libGL) Do you have different libGL and/or libSDL libraries on your system? ix86 or x86_64? (x86_64 with multilib have two different libGL libraries, the ix86 may do software fallback) which libraries does widelands use? (ldd /path/to/wideladns-executable) which architecture does widelands and the libraries use? (objdump -a /path/to/wideladns-executable, objdump -a /path/to/libGL.so.your-libgl-version) compare this with working games. Timo ![]() ![]() |
ChemBro Topic Opener |
Posted at:
2010-11-27, 16:12 UTC+1.0
I'm not really familiar with all these things, but to your questions: It's widelands from trunk (bzr version 5752). I'm on x86 and I don't get the libGL/libSDL question (due to not enough knowledge). The proprietary driver uses it's own libGL, the open source driver the "normal" libGL. I have some outputs (ldd and objdump) and compared it with SuperTuxKart, though the only difference (in my eyes) is, that SuperTuxKart doesn't use libSDL. http://widelands.pastebin.com/1x4C0fg6 http://widelands.pastebin.com/Xqv0geer http://widelands.pastebin.com/7iVTuqeB Also according to my little graphics card monitor, Widelands doesn't use my card (still 0%), but SuperTuxKart does (23%). But it might be, that the work, my card has to do in Widelands is so little, that it is something between 0% and 1%. The capture software is called "glc" (http://nullkey.ath.cx/projects/glc/). It is (sadly) the best way to record OpenGL/ALSA programs in Linux and it seems like, the project is dead (more sadly). Then again... recording Widelands was possible half a year ago... ![]() ![]() |