hi,

   I modified my own directfb driver based on gfxdrivers{gl and
omap}. And now, it can probe through my driver, but when I run
dfbinfo, I got an error like below:

(!) Direct/Modules: Unable to dlopen `/home/htang/target//lib/directfb-1.4-0/gfx
drivers/libdirectfb_omap.so'!
   --> /home/htang/target//lib/directfb-1.4-0/gfxdrivers/libdirectfb_omap.so: u
ndefined symbol: eglInitialize
[   41.624145] omapfb omapfb: Unknown ioctl 0x4700

 I think this error is caused by I didn't initialize OpenGLES
properly, before I first invoked its function. is that the problem?

 I wanna  initialize OpenGLES and connect its display to framebuffer,
becuase I don't know how to initialize OpenGLES with its display. So,
I did it in driver_init_device like below:


static DFBResult
driver_init_device( CoreGraphicsDevice *device,
                   GraphicsDeviceInfo *device_info,
                   void               *driver_data,
                   void               *device_data )
{
    D_DEBUG_AT( opengles, "%s()\n", __FUNCTION__ );

    const char *renderer;
    EGLDisplay display;
    EGLBoolean ret;

    display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
    if(display == EGL_NO_DISPLAY)
    {
         printf("eglGetDisplay: can't get a proper display\n");
    }

    ret = eglInitialize(display, NULL, NULL);

    if( ret = EGL_FALSE)
    {
         printf("eglInitialize failed \n");
    }
    renderer = (const char*) glGetString( GL_RENDERER );

    /* fill device info */
    snprintf( device_info->vendor,
DFB_GRAPHICS_DEVICE_INFO_VENDOR_LENGTH, "OpenGLES Acceleration -" );
    snprintf( device_info->name,
DFB_GRAPHICS_DEVICE_INFO_NAME_LENGTH,   "%s", renderer ?: "Unknown" );

    return DFB_OK;
}

   because I can't refer to gl driver to implement driver_init_device
function, it is only for OpenGL on X11, it has some differences with
OpenGLES on framebuffer. Could you give me some help about how to
implement this function?

  Must OpenGLES be initialized before any of its function is invoked?


On Mon, Jul 6, 2009 at 6:47 PM, stas<s...@lvk.cs.msu.su> wrote:
> Hi.
>
>  It seems to be no guides on writing gfxdrivers. There is a small
> presentation that can be found at
> http://directfb.org/docs/ELC2008/elc2008_directfb_gfx.pdf . But it is to
> short and superficial.
>  I based my driver on gfxdrivers/{davinci,sh772x,gl} sources. All of
> them are good structured & documented - there is no problem to
> understand what is each function for and how you should change it.
>> hi,
>>
>>    I wanna write a gfxdriver for OpenGLES, I refer to gl driver for
>> X11. I still don't know how to implement these functions.
>>
>> for example:
>> driver_probe driver_init_device etc...
>>
>>   can you give me a guide or link me to somewhere, so I can get
>> started. I am so frustrate by this for several weeks.
>> I have learn some API about OpenGLES, and read gfxdriver for gl, how
>> do your guys implement these functions in gl gfxdriver?
>> I still haven't got any clue. I found few document to illustrate this.
>>
>> so, I hope you guys can give me some advice in this regard. I am a
>> newbie in directFB driver porting.
>>
>> thanks in advance
>>
>>
>
> --
>        Best regards. Stas.
>
>
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to