Jump to content
Xtreme .Net Talk

spatuel

Members
  • Posts

    10
  • Joined

  • Last visited

Personal Information

  • Occupation
    Software Engineer
  • Visual Studio .NET Version
    Pro
  • .NET Preferred Language
    C#, C++, VB.NET, ASP, SQL

spatuel's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, I am building an xtended procedure DLL in C++, I need to have an static/global pointer to a managed class but the compiler says I can not have it if the class is not managed, the problem is I can not publish my Xtended functions in a managed class, so is the egg and the chicken story: I want something like this: #using <mscorlib.dll> class normalClass { private: ManagedClass* m_ManagedClass; public: normalClass(void); ~normalClass(); } Please help me :(
  2. GDI vs byte arrays Frist approach, use the GDI function GetPixel from the bitmap object Better approach, If you need to access to the pixel several times use a byte array to store the bitmap information and then read the position is 12 times faster than using the GDI bitmap object. ;)
  3. Can you send me more details? I can manage to produce a binary serialization of my class , storing it on a folder and then loading it from other application instance. I am not using any DLL, you can serialize using a normal APP or a WEB app as well. Indeed I have four engines running as a service that serialize the data and can share information. Salvador
  4. Hi, This is one option: At the beginning just link the usercontrol (ex...) <%@ Register TagPrefix="BIDUP" TagName="Presenters" src="usercontrols\bid_presenters.ascx" %> Then put in your code <BIDUP:PRESENTERS id="Presenters" allpresenters="false" runat="server" /> (the last example also shows you how to send parameters (allpresenters) ) So you can put that code in your Response.Write(...);
  5. My Solution Hi, Well, The windows installer that you can produce using .NET automatically checks if the .NET version x is installed before proceding. So if there is no framework it won't install it. other option: You can disable that check and inserts and ACTION on the setup project that checks if the .NET framework is installed (you can check the registry very easy - also to check the version - ) and then install it. The action can be a small CMD application. I have use it several times to setup my application after an installation. Hope this helps
  6. Check top 10 selling games Two things: first: 6 of 10 top selling games last year were 2D (does anybody see The Sims?) Second: If you don't have an accelerator card and want to draw a sprite using two vectors and one texture will fill the pain, try to draw 15.000 vectors and you will see your frame rate on the floor. Conclusion: I believe is necessary to have DDraw and D3D, otherwise check DirectX 9 were DDraw is back again and is not the same as DDraw 7.
  7. I am not stretching it, indeed my filters are Filter.None Anyway is good to know that!, thanks a lot. I think I found the problem, I changed how the device is created, at the moment is using HAL, I have changed to Reference and works ok but is soooooooooo slow that is impossible. I have tested it on a desktop machine with a 3d accel card and works fine, is my laptop where is shown the problem, thanks a lot! SAlva
  8. Hi, The double/triple buffer on the surfaces can work on a windowed mode as well, maybe there is a problem with the bit depth that you are using, it happened to me before. Other tip: How often are you flipping? if you flip on an unlimited loop it will also consume all your machine resources, maybe your kind of app doesn't need a very high frame rate. (this usually happens on the windowed mode) Another way to do it, try the Sprite object of the Direct3D (instead of using DirectDraw) is very fast and you don't have to bother about 3D parameters, just put the Z on the vector as 0. _MainSprite.Begin (SpriteFlags.AlphaBlend); m_MainSprite.Draw ( Texture, Rectangle_of_your_texture, VectorNull, VectorPosition on the screen, Color.FromArgb(255,255,255,255).ToArgb() ); m_MainSprite.End(); The texture is your image or whatever you want to blit. Hope this is helpful, Regards Salvador
  9. Hi All, Blending is a pain for me, I am trying to write a simple tile engine, the images are ok, everything looks fine, but when I draw it on Direct 3d is showing a small line between every sprite, indeed, I create a wrong coast line that goes into the previous tile and you can see the effect. I am pretty sure is something wrong with the blending, can anybody check the code or explain me how blending works? Thanks a lot. Init: _objDD.RenderState.CullMode = Cull.Clockwise; _objDD.RenderState.Lighting = false; _objDD.RenderState.AlphaBlendEnable = true; _objDD.RenderState.SourceBlend = Blend.SourceAlpha; _objDD.RenderState.DestinationBlend = Blend.InvSourceAlpha; _objDD.Clear (ClearFlags.Target, Color.FromArgb (255,0,0,0).ToArgb(),0,0); [/img] Draw: m_MainSprite.Begin (SpriteFlags.AlphaBlend); m_MainSprite.Draw ( m_Map [FirstHeightTile,FirstWidthTile,0].Tile_Texture, m_Map [FirstHeightTile,FirstWidthTile,0].Frame, VectorNull, Vector, Color.FromArgb(255,255,255,255).ToArgb() ); Of course I am closing and I didn't put any extra init code, my blending is showins as the attached file. Can anybody help me please? thanks!! example.bmp
×
×
  • Create New...