Jump to content
  • Advertisement
Sign in to follow this  
Zaph-0

OpenGL Software Texture Mapping

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

Hi, does anyone know where to find a working sourcecode for Software Texture Mapping ? I need to do it without DirectX or OpenGL or any other kind of api/hardware acceleration so it has to be done the old fashioned way by the cpu. I'd really appreciate any kind of help with this...

Share this post


Link to post
Share on other sites
Advertisement
There are some articles here. There's also source code, but note that it uses a lot of assembly.

I'm sure there are some articles in the Articles section on this site, and I'm sure at least some of them contain source code.

Share this post


Link to post
Share on other sites
Thanks for your reply, but I'd rather have an algorithm in plain C++ as the porting of the assembler might prove to be too difficult. I checked the algorithms on this page too, but strangely the ones with source turn out to be not working...

Share this post


Link to post
Share on other sites
You could also try looking up gouraud shading, the U and V coordunates for texture mapping can be interpolated the same way as the colour components although that would result in affine texture mapping but the step from that to perspective corrected texture mapping isn't much.

Share this post


Link to post
Share on other sites
If you like you can also look at my software renderer. It can rasterize points, lines and triangles and can be used to do texture mapping. There are a few examples in the released package and there is also a thread on gp32x.com about it which could get you started.

My software renderer is actually just a rasterization engine and contains only a small amount of code lines. The rasterizer works with fixed point but could be converted to use floating point numbers if that would be required.

Share this post


Link to post
Share on other sites
You might also want to take a look at Muli3D. It's open source (LGPL so lots of freedom) and quite feature rich, with good attention to precision.

It's not as fast as software renderers optimized with assembly though. What exactly is your goal?

Share this post


Link to post
Share on other sites
Quote:
Original post by C0D1F1ED
You might also want to take a look at Muli3D. It's open source (LGPL so lots of freedom) and quite feature rich, with good attention to precision.


Wow, that looks like a nice library. I wonder how I've not seen it before? Shame it doesn't appear to be developed any more (since 2005), and is lacking geometry shaders.

Share this post


Link to post
Share on other sites
Quote:
Original post by PolyVox
Shame it doesn't appear to be developed any more (since 2005)...


I believe it's mainly used to support a computer graphics course. So once it featured everything covered in the course there was little need to extend it further. Still quite a nice portable software renderer though.

Quote:
...and is lacking geometry shaders.


What would you need geometry shaders for when software rendering? They were invented to let the GPU do work that would otherwise be done on the CPU (also avoiding all the bandwidth needed to send it to the card). For a software renderer just write your geometry processing code in C++.

Share this post


Link to post
Share on other sites
Heh, cool. I didn't know some people still remember Muli3D!

I used to work on that project in my first year at university as a hobby and I'm glad it's still useful. Just to let you know, development stopped simply because I thought the library was pretty much complete and I wanted to invest my time into other stuff. Is there anything specific you would like to see included? How about not extending Muli3D yourself, after all it's open source and that'd be the proper spirit of approaching a seemingly dead project.

Lately I've been working on a real-time ray tracing project as part of my Master's thesis, which is also available at SourceForge named "rapido": http://sourceforge.net/projects/rapido-rt. Screenshots. Videos.
I'm considering to merge the two projects into a hybrid rasterization-raytracing library, but I'm still in the stage of planning and dreaming of its potential coolness, lol, so don't expect anything anytime soon.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!