Sign in to follow this  

glTexGen Problem(read the bottom)

This topic is 3731 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i tried to write a shader and i get link error what the problem here is the shader:
uniform sampler2D DisplacementMap;
uniform float DisplacementMapSize;
void main()
{
	vec4 Pos;
	Pos = gl_Vertex;
	vec2 DisTexCoord;
	DisTexCoord.x = Pos.x/DisplacementMapSize;
	DisTexCoord.y = Pos.z/DisplacementMapSize;
	vec4 color = texture2DLod(DisplacementMap,DisTexCoord,0.0);
	gl_Position = gl_ModelViewProjectionMatrix * Pos;

} 
[Edited by - barp12 on September 30, 2007 6:10:26 AM]

Share this post


Link to post
Share on other sites
i dont recive any errors just Link faild error and i found the problem my Graphic card doesn't support textures in Vertex Shader
now i have new problem i trying to use glTexGen to genarate texcoord for Terrain and i getting weird result does anyone can show me example to use glTexGen For Terrain.

Share this post


Link to post
Share on other sites
You really need to be more specific if you want other people to be able to help you. Put your mind together and be *specific*. Post some code snippets, error messages, etc. What link error(s) do you get? The compiler must be showing something. You can get a link error for every single function mankind (and aliens for that matter [wink]) has ever written, so saying that you get a link error without specifying the error message is like trying to hunt an elephant* with a needle. It really won't get the job done. Would it?

*Not to mention it's illegal to hunt an elephant!

Share this post


Link to post
Share on other sites

This topic is 3731 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this