Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing Penumbra #34

Closed
KristopherJR opened this issue Oct 20, 2021 · 5 comments
Closed

Installing Penumbra #34

KristopherJR opened this issue Oct 20, 2021 · 5 comments

Comments

@KristopherJR
Copy link

KristopherJR commented Oct 20, 2021

Hi,

I'm having some issues getting Penumbra into my project, I'm hoping to use it for lighting in my 2D game. So I've went into Visual Studio 2019 and used the NuGet Package Manager Console to install Penumbra ("Package-Install MonoGame.Penumbra.WindowsDX")

This installed without any issues in the CLI and when I check the "packages.config" file I can see:
package id="MonoGame.Penumbra.WindowsDX" version="2.1.0" targetFramework="net45"

The issue is when I go into my main .cs file and type "using Penumbra;" I just get a namespace assembly reference error. I'm sure this is an easy fix but I'm not experienced with NuGet and using other peoples packages.

image

Can anyone give me a little more insight on how to properly install Penumbra and get it working in my project?

Thanks

@discosultan
Copy link
Owner

discosultan commented Oct 21, 2021

Hi @KristopherJR , what type of a MonoGame template did you use to create your project? And are you using the latest version of MonoGame?

@KristopherJR
Copy link
Author

KristopherJR commented Oct 21, 2021

Hey @discosultan, I think it was a ‘Monogame WindowsGL Project'. The version from what I can see is '3.8.0.1641'. I actually managed to get past this particular bug, I just had to add a reference to the .dll file in the VS project. I've hit another wall though and I'm guessing it's to do with the version of MonoGame I'm running, but maybe you know otherwise? Here's the screenshot:

image

everything builds/compiles fine but I get that error at runtime.

Cheers

@discosultan
Copy link
Owner

Hey @KristopherJR

When creating a MonoGame DesktopGL project, make sure to also use the DesktopGL version of Penumbra (https://www.nuget.org/packages/MonoGame.Penumbra.DesktopGL/). When creating a MonoGame WindowsDX project, make sure to use the WindowsDX version of Penumbra (https://www.nuget.org/packages/MonoGame.Penumbra.WindowsDX/). They use different graphics backends and need to be compatible with each other.

Next, I would ensure that you use the latest versions of everything, but that looks to be already the case (MonoGame 3.8 and Penumbra 2.1).

@KristopherJR
Copy link
Author

KristopherJR commented Oct 29, 2021

Hi @discosultan

So I've tried all of those steps and I'm still getting the runtime error. I don't suppose you could walk me through the installation steps from creating a brand new VS MonoGame project to installing Penumbra just in bullet points?

So far I'm creating the MonoGame WindowsDX project from scratch, then installing Penumbra with NuGet and including it with "using penumbra;" everything compiles fine but I still get that runtime error. Once I comment out the Penumbra code in Game1, the application runs fine.

Thanks!

@discosultan
Copy link
Owner

discosultan commented Oct 31, 2021

Hey @KristopherJR

I just tested locally and the scenario you described worked without issues (latest VS 2019 16.11.5, latest MonoGame 3.8.0, latest Penumbra 2.1.0). Most probably it's some missing component on your machine. What you can do:

  1. Make sure you have the DirectX End-User Runtimes (June 2010) installed. This is required to compile shaders on WindowsDX.
  2. If the previous step doesn't solve the problem, you can try cloning the Penumbra repository and see if you can build either the WindowsDX or DesktopGL solutions.
  3. If you were able to build the WindowsDX solution from step nr 2, check the Samples folder for various example games using Penumbra to figure out if it might've been bad usage of Penumbra.

One last thing that popped to mind: if your project just happens to be also named Penumbra, I think Visual Studio won't be able to use the actual Penumbra library. Though that's probably not the case, as your project was named Panacea based on the screenshot above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants