Jump to content
Xtreme .Net Talk

Gustav Evertsso

Members
  • Posts

    5
  • Joined

  • Last visited

About Gustav Evertsso

  • Birthday September 15

Personal Information

  • Occupation
    Student
  • .NET Preferred Language
    C#

Gustav Evertsso's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I found the solution to the problem myself. If anyone else wants to know how, this is how I did it. I use Material to set the alpha value. But Material needs Light to work so I started to setup the Ambient value under RenderState. Then can I set the DiffuseMaterialSource value to ColorSource.Material and set the materials color Ambient and Diffuse to the alphavalue I want. This result in the code something like this: device.RenderState.Lighting = true; device.RenderState.Ambient = System.Drawing.Color.FromArgb(128, 255, 255, 255); Material material = new Material(); material.Ambient = material.Diffuse = Color.FromArgb(alphaValue, 255, 255, 255); device.RenderState.DiffuseMaterialSource = ColorSource.Material; device.Material = material;
  2. So it is no way to alter the opacity with Renderstate or some other flags that you can find in the Direct3D Device class? I'm looking for a simple and fast way to do this. It must be someone here that knows how to do this.
  3. I have now tested to code it in Direct3D and it works, but I'm afraid I do it the wrong way. When I want to change the alpha value now have I looked the vertexbuffer and changed the color there. But what I can see from examples of older Direcx version (I havn't found anything about DX9) is it done without using the vertexbuffer, but I have problem converting it to csharp. Can anyone show me some code how to do this the right way in DX9 and csharp?
  4. I search for the same feature with some sort of alpha-blendning under DirectDraw. I tested AndreRyan code and it works, you get the control over it in "GDI+ mode", but it is VERY slow. I tested to only draw a few lines on the screen and the frame rate drops direct to a level where it is unacceptable low. But because DD9 is the same as DD7 so this must be an old problem, there must be someone out there with some old C++ or VB code that can be translated into C# and MDX.
  5. I have the same problem when my brother tried my little MDX game. I found some help on the directx newsgroup. But I didn't realy like it because they recommend to downloed (the SDK) ~80-90 mb and install with "/installmanageddx". But I don't like that everyone must download that mush. So, if you found that you could make a small setup program mabey you could upload it to the forum or mail it to me. I would be very greatful for it!
×
×
  • Create New...