Help with OpenGL

Status
Not open for further replies.

Sik

Member
OK, lame question goes :P It's simple: I want to get rid of texture borders when clamping. There's linear filtering in the way so it does annoy. The most obvious and straighfoward answer is using GL_CLAMP_TO_EDGE instead of GL_CLAMP. Yes, it works, and is definitely the thing to use when available. But it's from OpenGL 1.2, so it won't work in 1.0 and 1.1.

So, do you know any way to get GL_CLAMP do its work without texture borders getting in the way but having the texture to be clamped to the edge? A solution is remove filtering for that side... but you know how bad that looks :P Through you'll most likely have an old computer if you have OpenGL 1.0 or 1.1.

Not something urgent, I don't think there are many OpenGL < 1.2 computers out there right now.
 
Clamp to edge.

Are you SURE that is part of the GL 1.2 spec? I have GL 1.1 libraries and I think it compiles fine...
 
GL_CLAMP_TO_EDGE is from 1.2. You can access it through glext.h under Windows, which gives you more functionality (I have the lastest one from opengl.org which gives me 2.1 functionality).

EDIT: actually I don't remember exactly if it was from 1.2 or 1.3, but definitely it isn't from 1.1, otherwise it would appear in gl.h rather than glext.h. I should try to find that skybox tutorial again which explains why we should use GL_CLAMP_TO_EDGE instead of GL_CLAMP, as it mentioned from which version it is :/
 
Triple posting >_> I still need a solution for the above, but I think I'll finish up faking the clamping effect copying the edges of the textures to the borders after all...

But now I have another problem. It seems that for some weird reason, it's taking the Z as always the same value o_o' No kidding, if I use GL_LESS or GL_GREATER, it doesn't render at all, if I use GL_EQUAL, it does. What is it trying to do?! I checked the depth buffer BPP, and it's 24-bit, so I didn't forget to set it. No idea what's going on :/

Before you ask for it:
Code:
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glDepthMask(GL_TRUE);
glDepthRange(pgl_render_mode.min_z, pgl_render_mode.max_z);
>_>

EDIT: nevermind, fixed, that glDepthRange() shouldn't be used D: And for the record, third time I ask SSNTails for help, he does nothing, and the bug gets fixed >_>
 
Do you know where to get another graphic card and install it.Mines is going old and starting to play software mode.I know its not on the topic and sorry I just want to know.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top