Board index » cppbuilder » GetDC from Bitmap->Canvas for OpenGL
David Richard
![]() CBuilder Developer |
Sun, 10 Jun 2001 03:00:00 GMT
GetDC from Bitmap->Canvas for OpenGL
I'm attempting to write my first app using OpenGL, and haven't gotten
very far. I've downloaded the OpenGL for BCB tutorial from http://www.cbuilder.dthomas.co.uk/tutorials/gfx_hardware.htm , and am using the 'Bouncing Ball' demo as a starting point. The modification I'm attempting to make to the demo program is this. I've instantiated the bitmap by declaring a pointer " Graphics::TBitmap GLSurface = new Graphics::TBitmap; in the constructor function (see Note below). delete GLSurface; is in The trouble comes in the FormShow event handler. The example contained hdc = GetDC(Handle); if(hrc == NULL) What I tried was to substitute the Handle property from the instantiated [C++Warning] GLSkeleton.cpp(132): Temporary used for parameter The program ran, however, and somewhat unexpectedly displayed the OpenGL I next tried the same two permutations, but substituted My question, then, is this: How can I tweak this code so OpenGL will A Note - I had to add the line of code " _control87(MCW_EM, __fastcall TForm1::TForm1(TComponent* Owner) at the beginning of GLSkeleton.cpp in order to suppress floating point |