[Mesa-users] eglInitialize

Alberich de megres alberich2k5 at gmail.com
Fri Dec 31 03:32:08 PST 2010


Oh, sorry for the type, i was trying different clear color and at the
end I didn't change it back.

But on wayland the server doesn't call glFlush. How it render/draws
the background then?

Also I tried drmModePageFlip, to change buffers, but i cannot get rid
of these wierd things (like lots of thin columns).

thanks!

On Fri, Dec 31, 2010 at 10:11 AM, Chia-I Wu <olvaffe at gmail.com> wrote:
> On Thu, Dec 30, 2010 at 2:26 AM, Alberich de megres
> <alberich2k5 at gmail.com> wrote:
>> I found my error, I compiled a kernel and forgot some kms options. So
>> now i can get a DRMDisplay
>>
>> But, now I got a different problem:
>> I can set a mode, using drm. And I set up the minimun so i should be
>> able to clean the backgound (or the buffer) to white and see the
>> screen on white. But what i really get is weird things like lots of
>> columns...
>>
>> Is there some place where i can read about drm+egl? My init code is
>> barely copy+paste from wayland..
>>
>> I attached the code, don't blame me for the code (copy+paste stuff)
>> i'm only trying to understand how drm+egl works so i can create one by
>> my own.
> Since you are rendering to rbo[0], you should use fb_id[0] in
> drmModeSetCrtc.  You also need to call glFlush at the end of
> draw_scene.  The clear color is black, not white as you said.
>
> These should be enough to see the correct result on screen.  But you
> might want to go further to implement double buffering (switch between
> rbo[0] and rbo[1], and flip between fb_id[0] and fb_id[1]).
>
>> thanks!
>>
>>
>> On Mon, Dec 20, 2010 at 1:55 PM, Chia-I Wu <olvaffe at gmail.com> wrote:
>>> On Tue, Dec 14, 2010 at 5:24 PM, Alberich de megres
>>> <alberich2k5 at gmail.com> wrote:
>>>> Hi !!
>>>>
>>>> I got a problem while initializing egl, using the source on git repo:
>>>> git clone git://anongit.freedesktop.org/mesa/mesa
>>>>
>>>> So what i do is first
>>>>
>>>> display = (EGLDisplay) eglGetDRMDisplayMESA(fd);
>>>> if (display == NULL) return -1;
>>>>
>>>> if (!eglInitialize(display, &major, &minor)) {
>>>> ... error check
>>>> }
>>>>
>>>> When I do that i receive a message:
>>>> libEGL warning: failed to create DRM screen
>>>>
>>>> And sometimes i get this other on the same point:
>>>> libEGL warning: failed to create DRM screen
>>>> libEGL warning: EGL-DRI2: malformed or no PCI ID
>>>>
>>>> I tried with both nourveau modeset=1, and radeon modeset=1
>>>>
>>>> I compiled libdrm with the following options:
>>>> ./configure --enable-nouveau-experimental-api --enable-vmwgfx-experimental-api
>>>>
>>>> And mesa with the following:
>>>> ./configure --with-dri-drivers=nouveau --enable-glx-tls
>>>> --with-driver=dri --enable-xcb --disable-glut  --enable-egl
>>>> --enable-gles2 --with-egl-platforms=drm --disable-gallium
>>>>
>>>> Also i tried those recomended on wayland site:
>>>> ./configure  --enable-egl --enable-gles2
>>>>
>>>> Can any one point me some light?
>>> The configure options look fine.  It is not clear what might have gone
>>> wrong.  Can you try again with EGL_LOG_LEVEL=debug set?
>>>
>>>> thanks!
>>>> Albert
>>>> _______________________________________________
>>>> mesa-users mailing list
>>>> mesa-users at lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/mesa-users
>>>>
>>>
>>>
>>>
>>> --
>>> olv at LunarG.com
>>>
>>
>
>
>
> --
> olv at LunarG.com
>


More information about the mesa-users mailing list