DirectX 8, where's DirectDraw??

Started by
14 comments, last by dacrisxp 22 years, 6 months ago
ok.. I kind of get what you mean, but I''m a beginner in D3D programming and I would really appreciate it if you could show me just a few code snippets of how I would do this.

thanks
Advertisement
CrazedGenius:

What surface level do I get using GetSurfaceLevel()?
How do I display the surface once it''s made?

Thanks for your help.
To Fresh:

No.

My geForce2Go has 2048x2048 textures. I''ll have to check the GF3, it''s either 2048 or 4096...

That''s the whole point of the CAps structure - the API is not explicitly limited. Please don''t mislead people.

To dacrisxp: Use surface level 0. After that, just display the texture like always. Take a look at the docs - they are much more explanatory than code snippets. It''ll take longer, but you''ll learn much more.
Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials
quote:Original post by F_r_e_s_h
The max size for textures in DX8 is 256X256. If you want to display larger stuff you have to create a surface.


Actually it depends on the 3D Accelerator. On my GeForce I can load 2048x2048 sized textures and blit them with no problems, though its not a good idea to have large textures since many cards are limited to 256x256 sized textures, specifically the Voodoo3 card.

As for creating a D3D 2Dwrapper without D3DXSprite, in my opinion both techniques have the same performance when programmed correctly, though D3DXSprite it the better of the two since it supports scaling, rotation, and alpha, implementing these features without D3DXSprite would be a major hassle... why re-invent the wheel? - well its up to u.

  Downloads:  ZeroOne Realm

  Downloads:  ZeroOne Realm

SikCiv - I agree with not reinventing the wheel, but this is actually a case where it might make sense because it sounds like he may have to rework the texture part.

About scaling, rotation, etc. It''s no hassle at all...

D3DXSprite supports DrawTransform, which just means that it passes a matrix to the device. Doing that is just a matter of calling SetTransform.

Implementing your own version of D3DXSprite->Draw is just a matter of passing the Draw parameters to the D3DXMatrix... functions and building the transform.

Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials
quote:Original post by Krunk

AFAIK, Modern 3D cards (3dfx voodoo 3 upwards) are heavily optimised for drawing textured triangles at the expense of framebuffer access (pixel plotting and blitting). Its even worse for cards like the GeForce, because while you have the framebuffer locked to write pixels to it, the GPU has to idle.

If you`re planning to use modern hardware, you get more speed and flexibility by using D3D8 (you can use alpha blending, and hardware accelerated scaling and rotation). Its harder to write though...

The tutorial InvaderX mentioned is well worth a look.


Hmm... To be honest, I''m focusing in way older hardware for my games.


--DK
--H. Hernán Moraldo
http://www.hhm.com.ar/
--DK--H. Hernán Moraldohttp://www.hhm.com.ar/Sign up to the HHM's developers' newsletter.

This topic is closed to new replies.

Advertisement