Archived

This topic is now archived and is closed to further replies.

Common errors with texturing

This topic is 5586 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

Hey, Can you guys list a view common errors when texturing. I''ve set up my texture class, properly loaded a tga, created a texture object, bound the texture, set the texture params, created a basic quad with the texture coords, and I get no texture. I''m complete at a loss and I''ve been trying to see the problem for a day and a half and its really starting to bother me. If you know of anything that is commonly overlooked when texturing, let me know. If you wanna see some code just say so. Thanks


"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I''m reaching up and reaching out. I''m reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one''s been. We''ll ride the spiral to the end and may just go where no one''s been." - Maynard James Keenan
[TheBlackJester ]
[Wildfire Studios ]

Share this post


Link to post
Share on other sites
The most common error is not sizing the thing properly

it has to be a power of 2

2^n

2,4,8,16,32,64,128

If thats not your problem
Try this handy dandy code, it might help you out

char * Answer;
Answer = (char *)gluErrorString(glGetError());
MessageBox(NULL, Answer, "OpenGL Error", MB_OK);

Place it after you call your glTexImage2D

then look up the error message in the online blue book, it will tell you all possible problems






Share this post


Link to post
Share on other sites
Thanx, I hadn''t though of catching the error, thats very useful





"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I''m reaching up and reaching out. I''m reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one''s been. We''ll ride the spiral to the end and may just go where no one''s been." - Maynard James Keenan
[TheBlackJester ]
[Wildfire Studios ]

Share this post


Link to post
Share on other sites
Have you tried drawing the texture as a bitmap instead of texturing it? Have you checked your error codes (return values from glX calls and GetLastError)? Odds are, no one''s going to mention the error you have randomly; it''d be nice if you could list further symptoms or errors.

Later,
ZE.

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

Share this post


Link to post
Share on other sites
Hey,

I got it squared away. I checked the error codes after calling glTexImage2D and I got an "invalid enumerant" error. Turns out my type code wasn''t being read properly. It works great now though, thnx for the replies!



"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I''m reaching up and reaching out. I''m reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one''s been. We''ll ride the spiral to the end and may just go where no one''s been." - Maynard James Keenan
[TheBlackJester ]
[Wildfire Studios ]

Share this post


Link to post
Share on other sites