Dear all,
I am using Borland C++ Builder (I’m afraid I don’t have a choice of compiler ( ). If I start Builder and literally in my main file I have the following code:-
#include “gl/gl.h”
#include “gl/glu.h”
#include <windows.h>
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource “*.dfm”
TForm1 Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent Owner)
: TForm(Owner)
{
HWND hwnd = NULL;
hwnd = Handle;
HDC hdc = NULL;
hdc = GetDeviceContext(hwnd);
HGLRC hglrc = NULL;
hglrc = wglCreateContext(hdc);
…
then hglrc is NULL!!! What am I doing wrong?
Yours Sincerely,
Matthew Banham