Jump to content
  • Advertisement

Archived

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

Speeding up Direct3D texture mapping

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

Recently I implemented texture mapping into my Direct3D IM engine, and it''s really slow! Just drawing one textured cube drops the framerate to around 10-12 fps if it''s large enough to take up half the screen space. Admittedly I''m in software mode, but I''ve run Direct3D games at smooth speeds on this computer. Any suggestions? ~CGameProgrammer( );

Share this post


Link to post
Share on other sites
Advertisement
How big are your textures? How close are you to the cube? And are you sure that the other games were in software mode? I have a 450 K6-2 and When I run in software mode, no matter what, I get arround 10-20 frames.

Share this post


Link to post
Share on other sites
The texture is 64x64. I tried resizing it; there was no speed improvement. The distance to the cube is irrelevant since DrawPrimitive only knows the screen coordinates. When the cube is scaled to a small size, I get 40 fps simply because not much is being drawn on the screen. When I scale it so it takes up roughly half of the screen, framerate drops rapidly, down to 10 or 12 fps. This proves it''s not the polygon count that''s the problem; it''s simply how much screen space is being drawn.

I have no 3D card. That''s why I''m trying to improve the software performance of my engine.

~CGameProgrammer( );

Share this post


Link to post
Share on other sites
Try creating your render surface and textures
in system memory. By default they are stored in
videomemory.

Share this post


Link to post
Share on other sites
Also use the ramp emulation model in D3D, not an RGB model. Use an 8-bit or 16-bit surface instead of an 32-bit one. Try to fit multiple textures into one 256x256 texture. The DirectX guides tell you how to get decent performance out of software rendering.

DaBit

Share this post


Link to post
Share on other sites
I would get a 3D card if I could, but I''m on a laptop, and can''t yet afford a new desktop.

Thanks for the help DaBit. My computer, curiously, doesn''t support ramp emulation -- only MMX and RGB. My texture is stored in system memory, and the screen mode is 16-bit so all surfaces are created with that bit depth. But I''ll read the MSDN docs again and look for further help.

~CGameProgrammer( );

Share this post


Link to post
Share on other sites
Bilinear interpolation was off, as it is by default. Same with perspective-correct textures. And the 10-12 fps was with the z-buffer off (it was 6-7 with it on).

Metolo is right -- the software rasterizer is too slow. Direct3D and OpenGL are good APIs to interface with the hardware, but in the event that the user has no 3D card, I''ll implement my own software polygon renderer.

Speaking of which, anyone know any good tutorials? I know Flipcode has a couple, which I''m looking through, but more couldn''t hurt.

~CGameProgrammer( );

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!