Page 1 of 1

Activating OpenGL makes the chart disappear?...

Posted: Mon Sep 23, 2024 6:17 pm
by 16493447
I am trying to use OpenGL 3D rendering and when I click the Activate button, the whole chart disappears. What am I doing wrong?
Screenshot 2024-09-23 141239.png
Screenshot 2024-09-23 141239.png (27.64 KiB) Viewed 31024 times
Screenshot 2024-09-23 141253.png
Screenshot 2024-09-23 141253.png (24.34 KiB) Viewed 31024 times
Thank you,

John

Re: Activating OpenGL makes the chart disappear?...

Posted: Tue Sep 24, 2024 10:37 am
by yeray
Hello John,

This seems to work fine for me here with the latest TeeChart Pro v2024.41 and RAD 12.2.
Could you please specify what TeeChart and RAD Studio versions are you using?

Re: Activating OpenGL makes the chart disappear?...

Posted: Tue Sep 24, 2024 6:16 pm
by 16493447
Hi Yeray...

It is TChart Pro 2023, and RAD Studio (C++) 12.2. However, I have had this issue in previous versions as well. I usually just switch to GDI+, but I need to use lighting for this particular project. And, if I use OpenGL in Tee, then I cannot use it in the project itself. I get all types of errors (I have posted about this in the past) if I include "gl/gl.h."
Screenshot 2024-09-24 141343.png
Screenshot 2024-09-24 141343.png (52.57 KiB) Viewed 30943 times
Basically, I have never been able to use OpenGL.

John

Re: Activating OpenGL makes the chart disappear?...

Posted: Wed Sep 25, 2024 8:51 am
by yeray
Hello John,

With TeeChart Pro v2024.41 and RAD 12.2, I've just created a new C++Builder project, added a TChart with a couple of TLineSeries and this TButton:

Code: Select all

void __fastcall TForm1::Button1Click(TObject *Sender)
{
  Chart1->Canvas = new TGLCanvas();
}
And this to the .hpp:

Code: Select all

#include <VCLTee.TeeGLCanvas.hpp>
And it seems to work fine for me here:
mstsc_1zr9dB3NCd.gif
mstsc_1zr9dB3NCd.gif (95.56 KiB) Viewed 30876 times
I haven't tried TeeChart Pro v2023 in RAD 12.2. I assume you had to do some changes to make it compilable.

Re: Activating OpenGL makes the chart disappear?...

Posted: Wed Sep 25, 2024 11:44 am
by 16493447
I don't think this would make a difference, but the project is dynamic linked library (DLL), not an executable. I can't see how that would affect the design time, though. It just doesn't work...never has.

Re: Activating OpenGL makes the chart disappear?...

Posted: Wed Sep 25, 2024 12:17 pm
by yeray
Hello,

Do you have a simple example we can run as-is to reproduce the problem here?
Thanks in advance.

Re: Activating OpenGL makes the chart disappear?...

Posted: Wed Sep 25, 2024 3:53 pm
by 16493447
Unfortunately, my projects have many external references, so I would not be able to send you one. However, you are more than welcome to remote in if you would like. I am in the US Eastern time zone and here from 7:30 - 4:00 most weekdays. I did notice one interesting thing. I made a small DLL project and added a TChart with OpenGL and got the following information on the Renderer tab:
Screenshot 2024-09-25 115141.png
Screenshot 2024-09-25 115141.png (10.07 KiB) Viewed 30786 times
My project is blank:
Screenshot 2024-09-25 115053.png
Screenshot 2024-09-25 115053.png (7.39 KiB) Viewed 30786 times
John

Re: Activating OpenGL makes the chart disappear?...

Posted: Wed Sep 25, 2024 4:20 pm
by 16493447
I figured it out. It does not like being on a PageControl's Tabsheet component set to draw Double Buffered.

Re: Activating OpenGL makes the chart disappear?...

Posted: Wed Sep 25, 2024 5:07 pm
by 16493447
Well, I finally got it showing in Design mode. However, in runtime, it went from:
Screenshot 2024-09-25 125245.png
Screenshot 2024-09-25 125245.png (28.25 KiB) Viewed 30781 times
In GDI+

To a flickering black and white window in OpenGL. Is this because there is OpenGL being used in the main executable (remember, this is in a DLL).
Screenshot 2024-09-25 130412.png
Screenshot 2024-09-25 130412.png (10.17 KiB) Viewed 30781 times
John