View Full Version : Rendering issues with Catalyst 8.9 on ATi XPRESS 200
Got it... it was black on black...
Looking over the code... Technically, you only need a (0,0,3,3) viewport. One pixel in the middle of the 9 block for a ray.
That is, if it looks in the center of the pixel as the value used for "Get pixel info". As opposed to using the 0,0 of the pixel. Since pixels have four plot points 0,0,1,1 but GL likes to center things, so I imagine that single pixel would translate into dead-center of the view. Seems to work the same when I key-in the (0,0,1,1) for the screen, and (0,0)
I see that "Color" is set to green... but that does not seem to work in entity worlds.
I turned-on the viewport for the front camera, and the track triangles all flicker on and off, like it has clipping issues. (I am also seeing 160 and 155 at odd times when the camera comes close to the wall, eventually the car just drives right through it at the second turn. (I believe there is an issue with the fact that the "View" FOV moves the front clipping plane in front of the camera, thus, it erases the wall when close enough for contact. Just as moving the FOV out, will bring the front clipping plain into normal view.)
I took some snapshots of the viewports and what the clipping planes look like on my computer. (I have the latest ATI drivers Catalyst 8.9, OpenGL Version 6.14.10.7976. I had to install the drivers again, because nothing works without them. Gotta play Spore or my brain goes into melt-down mode. ThinBASIC looked great without them, but it ran slow, so I guess it was using windows software drivers, but now ThinBASIC GL looks bad on some parts, except for the code using pure entities. Not sure which GL version TB uses.)
Petr Schreiber
04-11-2008, 17:29
Hi Jason,
values of 150 and similar are correct. It is when "ray" hits clipping volume ( Z-Buffer cannot contain infinity :) ).
As by default draw distance is set to 150, this is why you get such a values.
TBGL uses OpenGL 1.1, to be compatible with all cards on market.
It can currently cooperate with OpenGL context from 1.0 to 2.1.
I am unhapppy latest release of Catalyst cannot render properly even sphere... I will check my brothers PC, he is lucky one to have this release as well.
I suspect ATi tried to rewrite driver for new OpenGL 3.0 context and screwed something. It seems like basic visibility calculation implementation error in driver.
Both sphere and models use different way of vertex defintion, but both are rendered odd on your PC. I get no OpenGL error, so the code should be clean.
I profiled TBGL module with GL intercept, and no problem with arrays was detected.
Could you please check what TBGL_GetLastGLError returns on your PC?
In case there is no problem indicated by this function, I will send mail to ATi support.
Petr
TBGL_GetLastGLError
Stays empty the whole time...
The items are clipped fine, the structure is solid. The texture/color becomes removed an turns black. I removed the . (You see that better in the second image. Those surfaces are going from shade-value to solid black as you get closer to them. In the first image you can see that the rotated clipped planet has the triangle, but it is just blinking black/orange/black/orange.)
The track does the same thing, but there is no clipping at the time. The closer the camera comes to the surface, they all turn black.
I had a similar issue with the fog in the entity world. As did Eros. The fog, even though set to 0.01 or 1, renders thin or invisible away from light, but thick 100% thick at the source of a light. (He has a more recent card than I.)
I believe you are 100% correct, that the issue is related to the new GL 3.0 code, but that may be due to the fact that they dropped 1.1 support ten years ago, and GL drivers only have to be 1.2 and higher compatible. How can I force GL 1.2 or 2.1 to be used, or how can I tell what GL version is actually being used by TBGL? (With 1.7.0.0 going to XP as the minimum compatible version, will/could TBGL switch to the newer code as the minimum? OpenGL 2.1 seems to be the major adoption of all the "Experimental" codes into the core. Specifying a lower version uses the "old code" not the new versions of the same commands. My specific card seems to be using "Version: 2.1.7976 Release". Note: This card has no on-board memory, it is a mobile integrated card using shared RAM. Common laptop video card for the M series.)
The original GL by Mark Segal and Kurt Akeley, was never supported by anyone but them.
Chris Frazier edited version 1.1 (His work was/is no longer supported. 1.2 holds new versions of the same code.)
Jon Leech edited versions 1.2 through the present version 3.0 (This is the only, "Certified" release versions fully supported. The 1.1 and 1.2 code exists as it was originally created, only for reverse compatibility, without enhancements.)
Microsoft "GDI Generic" only uses the 7 (1.1) and 1 (1.2) features.
1.1 was the first version (For window 95), to have commands/drivers added specific to windows, by Microsoft (Pre Direct3D creation). I think that is why GL rendered fine before I put the catalyst drivers in. The Microsoft GL code uses DX.
When getting close to the wall, the camera does not "Constantly" see the distant view of 150... It flickers on and off, like the way it is being drawn. (Walls seem to be there in 95% of the steps.)
Don't hurt your head over it... The rest of GL looks fine, it is only the clipping thing, and the raw GL lighting on the surfaces in the entity world. I have posted the GL test results about my drivers/hardware in the attached text file. It reports that the 1.1 versions of the old code were replaced by the 2.1 versions also. (But only 3 of them. GL_EXT_blend_logic_op, GL_EXT_polygon_offset, GL_EXT_texture)
For now, I am just going to stop trying to make it work.
I used "OpenGL Extensions Viewer 3.0" to display the info, not microsoft's viewer. All tests passed without any errors.
Michael Clease
04-11-2008, 22:05
Jason try this.
Petr Schreiber
04-11-2008, 22:16
Hi Jason,
thanks for the info.
The thing is I do not want to bloat TBGL with workarounds around driver makers issues.
I will try to put together minimal example and send it to ATi, it is maybe naive to think somebody will check it out, but as I said - I would prefer that next Catalysts would fix this problem rather than torture you with flickering output.
Michael, thanks for the help :)
Petr
Petr Schreiber
04-11-2008, 22:47
but that may be due to the fact that they dropped 1.1 support ten years ago, and GL drivers only have to be 1.2 and higher compatible
Is it general rule or ATi specific one? Do you have some sources please? It sounds interesting :)
I remember my adventures when I bought my first ATi card - Radeon 7000. The drivers "performance" was such a shock for me ( blinking textures or even absent in some scenes ) that I went back to shop wanting them to replace damaged card.
Time showed it was not hardware damage, but just badly written driver, with years it got better.
One thing - you say you have Catalyst 8.9, did you tried latest 8.10 yet? Here is the link:
Catalyst 8.10 for WinXP (http://game.amd.com/us-en/drivers_catalyst.aspx?p=xp/integrated-xp).
Thanks,
Petr
Thank-you Mike and Petr... but that only shows the graphics card ability, not what version the TBGL is using. If the GL code is forcing 1.1 compatibility, it tells windows to use the old GL code version of that command.
EG... (Fake example, just to show the simplicity of how they developed each version.)
If 1.1 a function used BYTE X,Y
But 1.2 version of that same function used LONG X,Y
If the user selects 1.1 compatibility, LONG will not be used, nor will the 1.2 version of the 1.1 function. The function will use the older 1.1 BYTE version of the code you told it to use in the header. If you tell it to use 1.1, but use a 1.2 command, the output will not be the desired output, though it may be similar or close. On some instances, the 1.2 version is exactly the same as the 1.1 version, but after 2.1, none of the old code exists, it is all new code for the older functions, so they output the desired data that the new 2.1 functions need.
glSomeCode in 1.1 is the same command in 2.1, but the 2.1 code has new handling and fixes, related to video cards Post Windows 95. When Microsoft stopped supporting GL 1.1, and no longer requires 1.1 certification of the original 1.1 codes for video drivers. New cards that use a 1.1 command, are using the 2.1 version of the same command. That is the WHQL certified driver standard for XP.)
http://support.microsoft.com/kb/154877
"This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated."
http://www.gamedev.net/reference/articles/article1929.asp
"Unfortunately, this implementation is no longer supported by SGI"
http://www.opengl.org/about/arb/meeting_notes/notes/Meeting1.2/meeting_note_10-03-98.html
"SGI and Microsoft working to improve OpenGL support on Windows. This includes higher quality drivers, OpenGL 1.2 drivers, and a new driver license agreement for Windows IHVs." (This "New driver license agreement" was the death of 1.1 specification. All drivers had only to comply with 1.2 from that point on. 1.1 old-code was left for reverse compatibility, but no longer supported. The 1.1 commands of 1.2 were the only supported commands from that point on. Windows 95 was the last OS which had drivers that demanded 1.1 compliance of 1.1 code, for WHQL certification to carry the "Windows" logo on the video card and drivers.)
I am looking into the new drivers now... Arg, I just downloaded new drivers two weeks ago! However, it is only those specific codes that is causing the issues. (Viewport and Clipping)
The "TBGL_Fun_SpaceShooterGame.tBasic" shows a better example. (If you move the ship, so the fins extend beyond the border of the screen, you see the clipping on my computer.)
I don't think this is an "ATI" only issue, but it is clear that it shows this artifact on an ATI M-Series card. I suspect a matrix order or stacking issue, possibly also related to lighting, as it happens in the viewport on non-clipped surfaces as well. I say that it is not an ATI only issue, because it is not happening on anything else, or to anyone else. (Which points to the software code implementation, not the drivers. It may display "Better" on other cards, but the fact that it "Sees" through the triangle, also suggests it is matrix stack related, since the graphics don't determine matrix, the matrix determines the graphics. It sees through the wall at close range, but getting closer it sees the wall normal. So it is not just clipping the wall from being "Too close".)
The car will fly through the walls when the walls draw fine... In fact, it drives head-on through walls that report the wall is there. But the values still show the max-view distance most of the time. (Again, not a video issue, as video display is post-scene rendered.)
I also don't think this is any kind of a bug... No more of a bug than my attempt to try to manipulate the stack manually in an entity world. (That is like pulling the carpet out from under the entity. LOL... Move Light... Um... where did my light go, it was in the stack a minute ago?)
8.10 drivers show no change.
All drivers, except when I choose "No Drivers, which uses windows 1.1 software mode of the old code", have this same result.
It is still my strong belief that other cards/drivers are simply "Fixing" the problem better, or just displaying the scene better, with a "Fix". (I still believe it is something in those three sets of code, which is common among all three, which is not being done correctly in the stack. Though, it may appear to be correct on a better video-card that is "Fixing" the issue. Like how MSIE can "Fix" bad HTML, and display correct HTML on one screen by guessing what you were trying to say, but that same code which is not "Fixed" in FireFox displays a broken page on the same computer where it refuses to fix bad code.)
Petr Schreiber
05-11-2008, 22:57
Hi Jason,
interesting idea, but I am really sure there is nothing wrong with my code.
Could you test this code?:
'
' Test for Jason
'
Uses "TBGL"
DIM hWnd AS DWORD
DIM FrameRate AS DOUBLE
' -- Create and show window
hWnd = TBGL_CreateWindowEx("Test clipping - press ESC to quit", 640, 480, 32, %TBGL_WS_WINDOWED or %TBGL_WS_CLOSEBOX)
TBGL_ShowWindow
' -- Initialize lighting
TBGL_UseLighting %TRUE
TBGL_UseLightSource %GL_LIGHT0, %TRUE
tbgl_SetLightParameter %GL_LIGHT0, %TBGL_LIGHT_POSITION, 15, 10, 15, 1
' -- Resets status of all keys
TBGL_ResetKeyState()
' -- Main loop
While TBGL_IsWindow(hWnd)
FrameRate = TBGL_GetFrameRate
TBGL_ClearFrame
TBGL_Camera 5, 5, 5, 0, 0, 0
' Complete sphere
tbgl_pushmatrix
tbgl_translate -2,0,0
TBGL_Color 0, 128, 255
TBGL_SPHERE 1
tbgl_popmatrix
' Cut sphere
tbgl_pushmatrix
tbgl_translate 2,0,0
TBGL_Color 0, 128, 255
tbgl_useclipplane %GL_CLIP_PLANE0, %true
tbgl_setupclipplane %GL_CLIP_PLANE0, 0, 0, -1, 0
TBGL_SPHERE 1
tbgl_useclipplane %GL_CLIP_PLANE0, %false
tbgl_popmatrix
TBGL_DrawFrame
' -- ESCAPE key to exit application
If TBGL_GetWindowKeyState(hWnd, %VK_ESCAPE) Then Exit While
Wend
TBGL_DestroyWindow
... and post screenshot here.
Thank you,
Petr