views:

186

answers:

1

Does anyone have any sample code to how to use DDraw & OpenGL in wince?

I have searched the net and I didn't find anything on how to implement hardware acceleration in wince using DDraw & OpenGL.

Please guide me how to use OpenGL API in wince 6.0 r3 for implementing hardware acceleration.

I want to know the steps regarding how to use the following:

 1. IRenderer
 2. ICustomSurface
 3. ICustomGraphicsDevice

in wince 6.0 r3.

I have made one xaml which consist of four button . On click of any one button it calls a particular event. I have written c++ code in my subproject for using that xaml file.

Now i have to implement h/w acceleration for graphics in silverlight for windows embedded using OpenGL APIs

The default OpenGL plug-in is implemented in the following interfaces:

IRenderer :%_WINCEROOT%\PUBLIC\COMMON\OAK\XAMLRENDERERPLUGIN\OPENGL\
    openglrenderer.cpp
ICustomSurface: %_WINCEROOT%\PUBLIC\COMMON\OAK\XAMLRENDERERPLUGIN\OPENGL\
    openglsurface.cpp
ICustomGraphicsDevice :%_WINCEROOT%\PUBLIC\COMMON\OAK\XAMLRENDERERPLUGIN\OPENGL\
    opengldevice.cpp 

I know that if i become familiar with OpenGL APIs then i can also become familiar with DDraw APIs

Please guide me as i am very much unfamiliar with these APIs.

Thanks in Advance

+1  A: 

MSDN (and Platform Builder help) have a pretty thorough explanation of DirectDraw display driver concepts as well as the DDGPE and DDHAL references.

The reality is that creating display drivers is hard work. Very hard work, in fact. If you're starting from nothing but a data sheet, it's likely to be several months of work and I wouldn't be surprised if it took more if the data sheets are wrong or incomplete (and yet, that happens a lot).

Have you checked with your silicon vendor (you didn't say what display controller you're using) to see if they already have a reference driver for CE that supports hardware acceleration? If they don't have one, you might look to the Linux community to see if you can find a driver and then port the acceleration code over to either one of the generic template drivers that ships with Platform Builder or some other display controller that is close to the controller you're using.

ctacke
Abhi
@ctacke : The i.MX51 family incorporates OpenVG and OpenGL-ES hardware acceleration that is vital for Adobe Flash. In combination with the QNX Aviage middleware, customers can easily develop multimedia products with advanced human-machine interfaces imperative to the automotive infotainment space.Graphics hardware acceleration in Silverlight is based on one of the following: DirectDraw - Supports hardware-accelerated two-dimensional graphics. OpenGL - Supports hardware-accelerated two-dimensional or three-dimensional graphics, skewing, and rotation.
Abhi