This post consists of 2 sections: 1) Errors found with glIntercept 2) Error handling in OpenGL - my research
My main idea was: spring should work on intel video cards. I think that some opengl errors can be fixed/workarounded and spring will run on intel. So I tryed to find out which errors can produce these visual bugs on intel video. And I find a few ways how to get error messages. 1) glIntercept (http://code.google.com/p/glintercept/) 2) glGetError() (http://www.glprogramming.com/red/chapter14.html#name1)
So 1) glIntercept. It works only under windows. So I played short singleplayer game with 2-4 fps using this tool. Error log is attached (gliLog.txt).
into Game:Draw function to get errors. Also I rewrite clearGlErrors function and some other places where I found glGetError().
So I compilled and tested spring with glGetError() enabled. It logs lot's of GL_INVALID_ENUM too.
I am newbie in c++ and opengl.. So maybe my research was very dumb. I just want to show you these errors, maybe you can fix it and spring will run under intel without problems?
------ Why we can see strange visual bugs using intel video:
Quote:
When OpenGL detects an error (in either the base GL or GLU), it records a current error code. The command that caused the error is ignored, so it has no effect on OpenGL state or on the framebuffer contents.
What we can do to detect such opengl errors?
Quote:
It is strongly recommended that you call glGetError() at least once in each display() routine
Attachments:
File comment: infolog.txt for my test singleplayer game infolog.txt [73.86 KiB]
Downloaded 89 times
File comment: error log. Found with glIntercept gliLog.txt [624.66 KiB]
Downloaded 91 times
Why spring does not work on intel then? I think because of these opengl errors.
Cause their OpenGL drivers have endless loops, pointer dangling, ... in them = their drivers are BUGGED. Neither do they update/fix once released drivers (for most GPUs there was just _one_ driver released and never updated!)
Quote:
It is strongly recommended that you call glGetError() at least once in each display() routine
Cause it is a flush operator? (it will halt the thread until the GPU is finished with processing all commands in the GL stream)
two possible solutions: improve this, so it works with spring: http://sourceforge.net/projects/gldirect/ (opengl->directx wrapper) i don't know if its possible to do that with a nice performance (or at all...)
currently it cries about "Needed OpenGL extension(s) not found: GL_ARB_texture_env_combine GL_ARB_texture_compression
use linux! intels opensource drivers should be better as the closed one. they are regulary updated and some steam and intel guys are currently working on improving it.
abma, I use linux. And spring has lots of visual bugs with intel sandy bridge video. Unplayable. So OpenGL->DirectX is not a solution for me :-D I think realo solution - understand what exactly causes problems and fix/workaround it.
I rebooted to windows just to get glIntercept reports as OpenGL errors example.
Quote:
those `errors` are by design and handled correctly
Sounds strange. But I am newbie. So I will trust you.
abma, I use linux. And spring has lots of visual bugs with intel sandy bridge video. Unplayable. So OpenGL->DirectX is not a solution for me :-D I think realo solution - understand what exactly causes problems and fix/workaround it.
from your infolog.txt: OS: Microsoft Windows
sad to hear that its still unplayable. hopefully it becomes better when steam officially supports linux.
Normally Mesa (and OpenGL) records but does not notify the user of errors. It is up to the application to call glGetError to check for errors. Mesa supports an environment variable, MESA_DEBUG, to help with debugging. If MESA_DEBUG is defined, a message will be printed to stdout whenever an error occurs.
also
Quote:
There is a display list printing/debugging facility. See the end of src/dlist.c for details.
Mesa prints messages like that: Mesa: User error: GL_INVALID_ENUM in glPolygonMode(mode) (my logging) [f=0000237] after eventHandler.DrawWorldPreUnit(); OpenGL Error: invalid enumerant
I recompiled Spring without LINES and there are now less errors. But still lots of them.
Examples: Mesa: User error: GL_INVALID_ENUM in glGetFramebufferAttachmentParameterivEXT(attachment) Mesa: User error: GL_INVALID_OPERATION in glFramebufferTexture2DEXT
Mesa: User error: GL_INVALID_OPERATION in Inside glBegin/glEnd Mesa: 13 similar GL_INVALID_OPERATION errors Mesa: User error: GL_INVALID_OPERATION in glBegin [f=0025148] after LocalModelPiece::Draw() glCallList(dispListID); OpenGL Error: invalid operation
Mesa: User error: GL_STACK_OVERFLOW in glPushAttrib [f=0025616] after selectedUnits.DrawCommands(); OpenGL Error: stack overflow
Mesa: User error: GL_INVALID_OPERATION in Inside glBegin/glEnd Mesa: 411 similar GL_INVALID_OPERATION errors Mesa: User error: GL_INVALID_OPERATION in glBegin [f=0025619] after sky->DrawSun(); OpenGL Error: invalid operation
Mesa: User error: GL_STACK_OVERFLOW in glPushAttrib [f=0025810] after featureDrawer->DrawFadeFeatures(noAdvShading); OpenGL Error: stack overflow
conclusion: lot's of problems inside display lists. Only god knows how to fix them. Looks like we need to compile mesa with debug symbols and use "void mesa_print_display_list(GLuint list)" function from ./src/mesa/main/dlist.c
glGetFramebufferAttachmentParameterivEXT located in FBO::DownloadAttachment(const GLenum attachment)
and used: for(int i = 0; i < 15; ++i) { DownloadAttachment(GL_COLOR_ATTACHMENT0_EXT + i); }
why ++i? what will be generated as result? DownloadAttachment(GL_COLOR_ATTACHMENT0_EXT + 0); ... DownloadAttachment(GL_COLOR_ATTACHMENT0_EXT + 15); ???
for(int i = 0; i < 15; ++i) { stdout << i << endl; }
0 1 ... 14 !
PS: using post- or pre-increment operator doesn't make any _logical_ difference in for-loops increment part (still pre-increment produces more efficient code with non-native vartypes).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum