Hi all,

Well, it's been a while since I posted anything other than site notices and such, but now I have a window in my studies so I'm getting down to some development... mainly because I've been asked to build a game (most likely web based using Cocos2d-Javascript).

I want a map editor (yes, I've looked at Tiled, the de facto tool for creating tilemaps for Cocos2d, but it's just not got the features I want). I want it to be cross platform so I can run it on both my PC and my Mac (am also learning Objective C for Mac and iOS development, with Cocos2d). So I figured I'd break out my copy of XE2 and take it for a spin. And well... that's where it's becoming a real pain in the posterior.

I sat down last night and started banging out a map editor with RadStudio 2009... it's been a while, but within an hour I had two independent OpenGL rendering areas (one for the map and one for the palette). Then, as I say, I thought I'd make use of the cross platform features of XE2 and build a PC and Mac version.

So, I've started again and set about creating an OpenGL rendering panel. It's based on TControl, much like TPaintBox. The plan is to have it initialise OpenGL if it's not already and when the paint event occurs, to activate the relevant rendering context etc.

In RS2009, I've got this code

Code:
  fMapRC:=createRenderingContext(oglMap.canvasDC,[opDoubleBuffered],32,24,0,0,0,0);

  ...

  activateRenderingContext(oglMap.canvasDC,fMapRC);
And this works a treat. In XE2 I have nothing.

I can't find a definition for createRenderingContext or activateRenderingContext. I also don't seem to be able to find a routine to get a device context from a handle.

Does anyone have any suggestions, example code etc. of how to create and manage a rendering context on both Windows and Mac OSx for XE2?

I've googled with lots of different search strings and so far I've drawn a complete blank.

Thanks in advance for any help/suggestions.