-
Good morning, I've run into a couple of issues when creating instances of Also setting
Maybe i'm doing something incorrectly here but the above function works without any issues, if I create and initialize the |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
Hi, there can be only one instance of the classes An exception from this rule is the Raspberry Pi 4, which has multiple HDMI connectors and thus multiple frame buffers. The Normally the instance of With
|
Beta Was this translation helpful? Give feedback.
-
Excellent explaination, thanks for clarifying this. I was suspecting this to be the case and it now clears up all the issues I've been encountering. Explains the reason why everything worked when I created and initialized the device in the kernel class. The DEPTH macro kind of makes sense also but didn't expect the function parameters to change when setting it to 8Bit. From now on I will be intitializing all Cricle devices in the Kernel class similar to the samples and passing a pointer to each device to my functions instead. Yes, the samples are a great resource and so are the docs, but there seems to be alot hidden under hood that is not in the docs. Thanks for your help again and I want to also add that your SDK is quite an achievement. |
Beta Was this translation helpful? Give feedback.
-
You are welcome. Oh, and for the record, after some testing I found it is possible to initialize and use both the So, in effect all the I also managed to get around the
Have a good weekend! |
Beta Was this translation helpful? Give feedback.
-
I've been running this combination without any problems so far. Being able to use the writing features of the CScreenDevice on top of the C2DGraphics device is useful for log output and textual information. The only gotcha with this is that the DEPTH must be 16Bit as I was unable to compile my code with any other color bit depth. I'm not quite sure if the Circle SDK requires recompiling after adding the |
Beta Was this translation helpful? Give feedback.
-
Thanks for that, makes sense to not use both the classes then as you said. I only porting an emulator so I guess I can add a few hacks here and there without bringing the internet to a crawl :) I think it's time for long weekend of relaxing and beer supping for me now. Have a great day! |
Beta Was this translation helpful? Give feedback.
Hi, there can be only one instance of the classes
CBcmFrameBuffer
,C2DGraphics
orCScreenDevice
at a time in the system, because they all directly communicate with the firmware in theInitialize()
method to setup the frame buffer hardware. If there would be multiple instances, they would disturb each other in this process. So you cannot useC2DGraphics
andCScreenDevice
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
orCScreenDevice
should be managed as a member varia…