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

Adding post processors makes the screen black #233

Closed
rafaelalmeidatk opened this Issue May 6, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@rafaelalmeidatk
Copy link
Contributor

rafaelalmeidatk commented May 6, 2017

Every time I add a post processor the game screen turns all black. Core file:

public class Game1 : Core
{
	protected override void Initialize()
	{
		base.Initialize();
		Window.AllowUserResizing = true;
		scene = new BasicScene();
	}
}

Class file:

public class BasicScene : Scene
{
    public override void initialize()
    {
        addRenderer(new DefaultRenderer());
        addPostProcessor(new ScanlinesPostProcessor(0)); // If this line is removed, the issue is solved
    }
}

I figured out after looking at #44 that adding the following snippet at the core solves the issue:

scene = Scene.createWithDefaultRenderer();
base.Update(new GameTime());
base.Draw(new GameTime());

So the working core class is the following:

public class Game1 : Core
{
	protected override void Initialize()
	{
		base.Initialize();
		scene = Scene.createWithDefaultRenderer();
		base.Update(new GameTime());
		base.Draw(new GameTime());
		scene = new BasicScene();
	}
}

I am not sure if it is the intended behaviour, just letting you know, I took a lot of time to make the Post Processors to work and was just able to do using this "hack".

@zerodarkzone

This comment has been minimized.

Copy link

zerodarkzone commented May 12, 2017

I have the same problem when working on Android. On desktop it works ok. Doing what you did to solve the problem doesn't work for me.

@prime31

This comment has been minimized.

Copy link
Owner

prime31 commented Dec 8, 2018

Closing out all old Nez bugs without recent activity. If you are still seeing any issues feel free to open a new bug and include a full repro project that clearly shows the issue.

@prime31 prime31 closed this Dec 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment