Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About Enitalp

  • Rank

Personal Information

  • Role
  • Interests


  • Twitter
  • Twitch
  • Steam
  1. Enitalp

    Vulkan and C#

    Thanks a lot for your answer, will look at them.
  2. Enitalp

    I need help with unity... :(

    No problem, The usage of this architecture is more safe to use, and easier. Unity or unity tutorial don't teach you that way of coding, but it's much better.
  3. Enitalp

    I need help with unity... :(

    One architecture to get rid of the problem once for all. Put your gamemanager on a gameobject in your scene. Remove the reference on the gamemamanger in your store script. change your gamemanger code for : static public GameManager Instance; // Use this for initialization void Start() { currentBalance.text = "$" + balance.ToString(); Instance = this; } and in store.cs public void buyStore() { if (GameManage.Instance.canBuy(baseStorePrice)) { GameManage.Instance.addToBalance(-baseStorePrice
  4. Enitalp

    I need help with unity... :(

    So your GameManager is also in the store prefab ? because a prefab can't have a reference to an object in the scene. If you edited the prefab in your scene and made a link to your GameManager, then apply the prefab, and then later spawn the prefab, it doesn't work. Only work if you specialized the prefab that stay in your scene.
  5. Enitalp

    I need help with unity... :(

    So you should have something like that ? Works for me as there is no reason for it to not work unless you point to the wrong store behavior in your button, and this store doesn't have a gm
  6. Enitalp

    I need help with unity... :(

    Ok, that's an "easy" one. In store you have a GameManager gm; and gm is not initialized. you should in the inspector point to the gameobject containining your GameManager.
  7. One thing about those singleton. In the example you give the first one to be initialized is the memory manager., That imply that memory allocation is custom, and the singletons are object, not pointer to object, That mean that there is the possibility that the global destructor could destroy some memory after the memory manager is gone so crash. It's a good idea to allocate the memory manager, init it. then allocate the singletons and init them, And when shuting down, Deinit singletons, delete them, then deinit memory manager, and delete it.
  8. Enitalp

    I need help with unity... :(

    hi, i can help you, no problem, if i can see the code and the crash i will give you what you "did wrong"
  9. Hi I'm searching for a good implementation of Vulkan in C#, Don't need to be the fastest as it's for an Editor, but i need the most complete and most active one. Saw a few ones but with no update in the past 5 months. Don't want to implement a "dead" library as my usage is for the next 3/4 years. Any idea ? thanks
  10. Hum all those brain and no one have an idea ?
  11. I'm a self-taugh programmer, but in was easier in my "time", started in 81 with an Apple 2 switched in 88 on an Atari ST, became an official Atari dev on Falcon and TT in 93 and since my first program i only worked on game mostly, Farcry 1, star wars, avatar, rainbow 6, farcry primal, farcry 5, to name a few ;p. Left school at 16, so my math is bad. But thanks to Internet if i need something, i just have to search for what i need. http://www.mobygames.com/developer/sheet/view/developerId,168167/ And i just started to learn DX11 and get more advanced in shaders.
  12. Hi all. I have a direct2d1 application with all my UI. And now i'm trying to insert 3d rendering in my UI. I tried a lot of thing as i'm new to that. and failed.... So my UI contain a control that is a 3d render. so stupidly i was thinking of making a 3d rendertarget, get the bitmap of that. and draw it at the place of my control. So i created this function public Bitmap1 CreateTarget(int i_Width, int i_Height) { Texture2DDescription l_Description = new Texture2DDescription(); l_Description.BindFlags = BindFlags.RenderTarget; l_Description.Format = m_BackBuffer.Description.Format; l_Description.Width = i_Width; l_Description.Height = i_Height; l_Description.Usage = ResourceUsage.Default; l_Description.ArraySize = 1; l_Description.MipLevels = 1; l_Description.SampleDescription = new SampleDescription(1, 0); l_Description.CpuAccessFlags = CpuAccessFlags.None; l_Description.OptionFlags = ResourceOptionFlags.None; Texture2D l_RenderTarget = new Texture2D(m_Device, l_Description); BitmapProperties1 properties = new BitmapProperties1() { PixelFormat = new PixelFormat(l_Description.Format, SharpDX.Direct2D1.AlphaMode.Premultiplied), BitmapOptions = BitmapOptions.Target, DpiX=96, DpiY = 96 }; Bitmap1 m_OffscreenBitmap; using (Surface l_Surface = l_RenderTarget.QueryInterface<Surface>()) { m_OffscreenBitmap = new Bitmap1(m_2DContext, l_Surface, properties); } return m_OffscreenBitmap; } And my control does a simple : if (m_OldSize != Size) { m_OldSize = Size; if (m_OffscreenBitmap != null) { m_OffscreenBitmap.Dispose(); } m_OffscreenBitmap = i_Param.CurrentWindow.CreateTarget(Size.Width, Size.Height); } i_Context.DrawContext2D.DrawBitmap(m_OffscreenBitmap, m_Rect, 1.0f, BitmapInterpolationMode.Linear); Here is my problem, if BitmapOptions is different from BitmapOptions = BitmapOptions.Target | BitmapOptions.CannotDraw i crash when creating my new Bitmap1 because of invalid params. and if i let it, i crash at present because : Additional information: HRESULT: [0x88990021], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_BITMAP_CANNOT_DRAW/BitmapCannotDraw], Message: Impossible de dessiner avec une bitmap qui a l’option D2D1_BITMAP_OPTIONS_CANNOT_DRAW. I must admit i'm out of idea. and i'm stuck. Please help. Does my method is totally wrong ? I tried to make my control owning is own 3d device so i can render that at a different pace than the 2d and did get the same result
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!