PDA

View Full Version : C++ Builder and OpenGL Rendering Contexts



clunis_immensus
10-03-2001, 10:46 PM
I need to use OpenGL with C++ Builder 5.
I need to create several drawing areas (with input focus) in my application's window. I tried using TImage, but the HDC thst I get (timage->Canvas->Handle) causes wglCreateContext() to fail.
From the documentation, I am now inclined towards switching to TCustomControl for the drawing areas.

I was hoping someone who has been down this road before could make some recommendations.

many thanks
Karthik

MButchers
10-03-2001, 11:58 PM
Hi there,

you could use a TPanel and to get the hdc call


HDC dc = GetDC(PanelName->Handle);

....


Hope it helps

Mark


[This message has been edited by MButchers (edited 10-04-2001).]