Jump to content
  • Advertisement

Archived

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

pleja

Texture problem

This topic is 5560 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 have a pretty complex skull model here and I have jpeg texture which has dimensions 1010x460. As far as I get it OGL supports only dimensions that are power of 2 and that is making holes on my model. How can I fix this?

Share this post


Link to post
Share on other sites
Advertisement
If you are using mipmapping, the holes have nothing to do with the texture, because mipmapping automatically resizes the texture for you.

-~-The Cow of Darkness-~-

Share this post


Link to post
Share on other sites
Heh, I''m new to this stuff. I''m probably not using mipmapping. I think OGL resizes texture to pows of 2 ''cause some other 3d programs can load that model correctly.

Share this post


Link to post
Share on other sites
Opengl doesn''t ressize them automatically, unless you are using mipmapping or your texture loading rutine does automatically. Try resizing you''re texture to be powers of 2 to see if the holes go away. resizing the texture won''t change the appearence unless you make the texture really small.

-~-The Cow of Darkness-~-

Share this post


Link to post
Share on other sites
I just resized it to 1024x512. It looks same. Loading routine resized it before. Everything would be fine if it didn''t? Texture would remain 1010x460? What''s the loss on performance with this dimensions of textures?

Share this post


Link to post
Share on other sites
It might help if you post a screenshot, ''holes'' isn''t a very good description of the problem.

The simple fact is some hardware can''t use texture dimensions other than power-of-2 (some will tho). It sounds like your problem might not be the texturing, how does the model look with texturing off?

Share this post


Link to post
Share on other sites
quote:
Original post by pleja
I just resized it to 1024x512. It looks same. Loading routine resized it before. Everything would be fine if it didn''t? Texture would remain 1010x460? What''s the loss on performance with this dimensions of textures?


If you saw you''re texture at all at those weird dimensions, you are probably just loading your model wrong, and having some polygons face backwards, hence the holes.


-~-The Cow of Darkness-~-

Share this post


Link to post
Share on other sites
I commented out all the texture resizing code and it didn't even load texture. Hardware problem? Well, I do have shity graphics card .

Anyway, entire project is here


[edited by - pleja on April 3, 2003 1:05:12 PM]

[edited by - pleja on April 3, 2003 1:07:00 PM]

Share this post


Link to post
Share on other sites
#$@#$@$@

Sorry, it should be ok now.

LOL, ignore the second .h file. I'm to lazy to upload it again

[edited by - pleja on April 3, 2003 1:14:00 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!