Skip to main content
gamedev.net
🔒 Locked

GL_CLAMP

Started by bengosney 5 replies 2.1k views
Original Post
bengosney
bengosney
I use GL_CLAMP for my skybox. It works fine on my PC but the other PC''s (ATI 8500 and Matrox, I don''t knwo what type)I tryed it on, it puts a black line at the edges. Has anyone else had this problem? Is there away around it or do I have to be very percise? Thanx for anyhelp, even it''s just to say "no" Ben Gosney. "There''s a war going on out there... and it aint easy" - Hardwar
Please excuse my grammer, I'm from zomerzet
Null and Void
Null and Void
It''s a minor bug in the NVidia drivers, if that''s what you''re using. Use GL_CLAMP_TO_EDGE instead.

bengosney
bengosney
Thanx for the tip, but it works on Nvidia cards, not on others and where is "GL_CLAMP_TO_EDGE" defined??

Ben Gosney.

"There''s a war going on out there... and it aint easy" - Hardwar
Please excuse my grammer, I'm from zomerzet
Null and Void
Null and Void
quote:
Original post by bengosney
Thanx for the tip, but it works on Nvidia cards, not on others and where is "GL_CLAMP_TO_EDGE" defined??

That''s the bug. On NVidia cards GL_CLAMP does what GL_CLAMP_TO_EDGE should do. GL_CLAMP_TO_EDGE is in OpenGL 1.2+ compliant headers. Since you''re most likely using Windows, you don''t get OpenGL 1.2+ headers by default and must use glext.h. You can find glext.h at SGI''s website or elsewhere online.

Null and Void
Null and Void
quote:
Original post by Anonymous Poster
This is quate common problem. I dunno why it is heppening but i know how to avoid it (once i did using voodoo3). You are setting texture coords like (0,0, 1.0, 1.0) - try to make a small (one textel) offset - (0.05, 0.05, 0.995, 0.995) - it would help avoiding this strange visual artefact.

That''s basically what GL_CLAMP_TO_EDGE does, except it does it more precisely (1/2 texel instead of whatever 0.05 comes out to be).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.