Speeding up Direct3D texture mapping

Started by
8 comments, last by CGameProgrammer 24 years ago
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( );

~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
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.
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( );

~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
Get a 3D card.

www.gameprojects.com - Share Your Games and Other Projects
Try creating your render surface and textures
in system memory. By default they are stored in
videomemory.
--- axelP
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

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( );

~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
D3D''s software render is very slow. One of the major disadvantages to DX.
Make sure bilinear interpolation, Z-writing, and perspective-correct texturing are turned off.
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( );

~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.

This topic is closed to new replies.

Advertisement