question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Impossible to create render texture (failed to link the target texture to the frame buffer)

See original GitHub issue

When running examples/create_env.py, I get this error:

Impossible to create render texture (unsupported anti-aliasing level) Requested: 4 Maximum supported: 1. Impossible to create render texture (failed to link the target texture to the frame buffer).

It seems that it might be caused by SFML package. To get SFML>=2.5, I downloaded it from: https://www.sfml-dev.org/download.php (apt-get install libsfml-dev installs version 2.4.2). Has anyone faced this issue?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:27

github_iconTop GitHub Comments

3reactions
BenQLangecommented, Jun 30, 2022

Oh wait a second.

This line breaks X11 forwarding:

import os
os.environ["DISPLAY"] = ""

But this line doesn’t and also no ‘Impossible…’ error appear:

import os
del os.environ["DISPLAY"]

It works! Thanks!

You can close it now, or later when you find more permanent solution.

Here is a visualized scene: scene_with_peds

2reactions
BenQLangecommented, Jun 30, 2022

My understanding is that the package runs on the cluster, and only visualization through XQuartz/X11 forwarding is done on Mac. If I enable X11 forwarding, sf::RenderTexture::getMaximumAntialiasingLevel() returns 16. If I don’t enable X11 forwarding nothing gets printed and I get:

Failed to open X11 display; make sure the DISPLAY environment variable is set correctly
Aborted (core dumped)

In nocturne:

I don’t need X11 forwarding for tasks without rendering. E.g. imitation learning script works without it.

When I run a script where a scene is rendered (e.g. create_env.py/rendering.py),

  1. without X11 forwarding it will crash:
Failed to open X11 display; make sure the DISPLAY environment variable is set correctly
Aborted (core dumped)
  1. with X11 forwarding but without Eugene’s fix, it will run but no scene is rendered (empty output images). And this is returned: Impossible to create render texture (failed to link the target texture to the frame buffer)

  2. with X11 forwarding and with Eugene’s fix, it will run just fine.

Hope it helps

Read more comments on GitHub >

github_iconTop Results From Across the Web

Impossible to create render texture (failed to link... - SFML
I'm on arch linux with fully up to date sfml. This happens on the open source radeon driver and the intel driver on...
Read more >
Bug - Unable to get correct pixels from RenderTexture in Vulkan
Rendering into the render texture worked, saving a texture worked, but the ReadPixels call never retrieves valid data. I seem to only get...
Read more >
[MESA Driver] Render on the window works but render to a ...
I need to render to a texture, but it doesn't display anything, only the clear color of the render texture is displayed, here...
Read more >
SFML/RenderTextureImplFBO.cpp at master - GitHub
err() << "Impossible to create render texture (failed to link the target texture to the frame buffer)" << std::endl;. return false;. }.
Read more >
How to use FBO with SDL? - Game Development
Impossible to create render texture. (failed to link the target texture to the framebuffer). Here is the code : [code]
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found