Skip to content

C2DGraphics creating multiple instances inside functions and issues with the DEPTH macro #363

Answered by rsta2
ArnoldUK asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, there can be only one instance of the classes CBcmFrameBuffer, C2DGraphics or CScreenDevice at a time in the system, because they all directly communicate with the firmware in the Initialize() method to setup the frame buffer hardware. If there would be multiple instances, they would disturb each other in this process. So you cannot use C2DGraphics and CScreenDevice together.

An exception from this rule is the Raspberry Pi 4, which has multiple HDMI connectors and thus multiple frame buffers. The nDisplay parameter can be used to select the HDMI connector to be used in this case.

Normally the instance of CBcmFrameBuffer, C2DGraphics or CScreenDevice should be managed as a member varia…

Replies: 5 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by ArnoldUK
Comment options

You must be logged in to vote
1 reply
@rsta2
Comment options

Comment options

You must be logged in to vote
1 reply
@rsta2
Comment options

Comment options

You must be logged in to vote
1 reply
@rsta2
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants