Is there any way to apply the texture to an object without specifying texture coordinates?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In fixed-function OpenGL, you can generate texture coordinates by activating texture coordinate generation modes. There are a couple of fixed algorithms (spherical coordinates, reflection coordinates), and there is one that multiplies a vertex component by a 4×4 matrix to generate a texture coordinate.
In shaders, you can use anything you can algorithmically generate.
However, without telling us how you want a texture mapped to the surface, there’s no way to know if what you want is possible. There is no
glTextureMyObjectthat does “something”; either explicit texture coordinates must be used or some algorithm must generate them.