Activating OpenGL makes the chart disappear?...

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
JNuzzi
Newbie
Newbie
Posts: 17
Joined: Mon Mar 21, 2022 12:00 am

Activating OpenGL makes the chart disappear?...

Post by JNuzzi » Mon Sep 23, 2024 6:17 pm

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 31026 times
Screenshot 2024-09-23 141253.png
Screenshot 2024-09-23 141253.png (24.34 KiB) Viewed 31026 times
Thank you,

John

Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

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

Post by Yeray » Tue Sep 24, 2024 10:37 am

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?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

JNuzzi
Newbie
Newbie
Posts: 17
Joined: Mon Mar 21, 2022 12:00 am

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

Post by JNuzzi » Tue Sep 24, 2024 6:16 pm

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 30945 times
Basically, I have never been able to use OpenGL.

John

Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

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

Post by Yeray » Wed Sep 25, 2024 8:51 am

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 30878 times
I haven't tried TeeChart Pro v2023 in RAD 12.2. I assume you had to do some changes to make it compilable.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

JNuzzi
Newbie
Newbie
Posts: 17
Joined: Mon Mar 21, 2022 12:00 am

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

Post by JNuzzi » Wed Sep 25, 2024 11:44 am

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.

Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

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

Post by Yeray » Wed Sep 25, 2024 12:17 pm

Hello,

Do you have a simple example we can run as-is to reproduce the problem here?
Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

JNuzzi
Newbie
Newbie
Posts: 17
Joined: Mon Mar 21, 2022 12:00 am

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

Post by JNuzzi » Wed Sep 25, 2024 3:53 pm

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 30788 times
My project is blank:
Screenshot 2024-09-25 115053.png
Screenshot 2024-09-25 115053.png (7.39 KiB) Viewed 30788 times
John

JNuzzi
Newbie
Newbie
Posts: 17
Joined: Mon Mar 21, 2022 12:00 am

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

Post by JNuzzi » Wed Sep 25, 2024 4:20 pm

I figured it out. It does not like being on a PageControl's Tabsheet component set to draw Double Buffered.
Last edited by JNuzzi on Wed Sep 25, 2024 5:08 pm, edited 1 time in total.

JNuzzi
Newbie
Newbie
Posts: 17
Joined: Mon Mar 21, 2022 12:00 am

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

Post by JNuzzi » Wed Sep 25, 2024 5:07 pm

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 30783 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 30783 times
John

Post Reply