lunixbochs / glshim

OpenGL 1.x driver shim for OpenGL ES devices.
https://boards.openpandora.org/topic/11506-glshim/
MIT License
160 stars 32 forks source link

What Lib i need for Jessie? #146

Open nighteagle1974 opened 8 years ago

nighteagle1974 commented 8 years ago

After make i became problem to find gl.h after install mesa-common-dev all is okay. After that there is looking for usr/bin/id - iGL

Which packge i need for these lib?

Regards

lunixbochs commented 8 years ago

Can you post an exact error message and tell me what hardware you're running this on?

nighteagle1974 commented 8 years ago

Yes i will check something now and then i will post it. I use the RPI2 with an fresh Jessie Image. First i have to install mesa-common-dev for the missing gl.h. Now i check after install libgl1-mesa-swx11.... also there is some problems without the libgl1-mesa-dri ...

nighteagle1974 commented 8 years ago

So is not SSH.. i will write Error Message

Bulding 100% Linking CXX shared library libGLU.so.1 /usr/bin/id : cannot find -iGL collect2: error: id returned 1 exit status CMakeFiles/GLU.dir/build.make:2285: recipe for target 'libGLU.so.1' failed

and so on....

MagaTailor commented 8 years ago

What's the silliness with these "i's" instead of "l's" in /usr/bin/id : cannot find -iGL ?

nighteagle1974 commented 8 years ago

So SSH:

[100%] Building CXX object CMakeFiles/GLU.dir/source/libnurbs/internals/flistsorter.cc.o Linking CXX shared library libGLU.so.1 /usr/bin/ld: cannot find -lGL collect2: error: ld returned 1 exit status CMakeFiles/GLU.dir/build.make:2285: recipe for target 'libGLU.so.1' failed make[2]: * [libGLU.so.1] Error 1 CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/GLU.dir/all' failed make[1]: * [CMakeFiles/GLU.dir/all] Error 2 Makefile:76: recipe for target 'all' failed make: *\ [all] Error 2 pi@raspberrypi:~/glues/build $ ^C

lunixbochs commented 8 years ago

Did you build and install glshim? You're posting compile errors for glues which is a different project.

nighteagle1974 commented 8 years ago

???

I have read these README:

https://github.com/lunixbochs/glshim

So what have i to do? I'm confused....

lunixbochs commented 8 years ago

You posted a compile error in glues, which is not this project. If you want glshim to be your primary OpenGL provider, try running make install.

nighteagle1974 commented 8 years ago

Hi, and thanks for the overview... :-)

okay.. i thought i have to use glues also for glshim. Is there somewhere an manual for glshim... after building them... what have i to do to use the file? Okay put in lib path and then?

For Background: My application is for showing the image of an thermografic camera. It has only 382x288px resolution but without hardware acceleration of the 2D Image i have only 5-6fps in fullscreen. With VC4 i have 30fps. But VC4 have no support for the composite video out. So i want to use the Video out at one time and on other time the hdmi out. Then i have to store the raw-data from the IR-CAM and so i need the cpu-power... there is no gap for rendering image by cpu. I have build the sources for the IR-CAM and the other way is to reprogram to use OpenGL ES instead of GLX.

Have you an idea?

I can show you the sources from the IR-CAM.

Regards,

lunixbochs commented 8 years ago

glshim is a drop-in replacement for desktop libGL. You should be able to just make install to use it, or put it in /usr/local/bin, then run your program. To test that glshim is working, try running glxgears.

nighteagle1974 commented 8 years ago

Hi,

so after build and make install successfully i have start glxgears -info and the GL-renderer is Mesa x11. Okay now i have to disable the installed mesa renderer?

lunixbochs commented 8 years ago

Yes. glshim does not depend on Mesa in any way. If you need the GL headers, you can copy the glshim/includes/GL folder to /usr/local/include

nighteagle1974 commented 8 years ago

Hi,

so after remove mesa i have glxgears -info an Error: couldn't get an RGB, Double buffered visual.

I have remove mesa-common-dev and libgl1-mesa-dri and libgl1-mesa-swx11.

Any ideas?

lunixbochs commented 8 years ago

Was that the only program output? Please paste the entire log.

nighteagle1974 commented 8 years ago

Hi,

so i begin straight forward an second time.

  1. Jessie Image fresh install
  2. raspi-config >> Only SSH and Language/Keyboard settings set
  3. Network set
  4. Mesa-Utils for glxgears install
  5. Update and Upgrade Jessie
  6. git clone glshim 6.1 install cmake 6.2 sudo apt-get install libx11-dev
  7. Build glshim
  8. make install
  9. startx
  10. glxgears -info >>
lunixbochs commented 8 years ago

No, I mean the program's output.

nighteagle1974 commented 8 years ago

Yes i know.. but i want an clean fresh install to prevent something mystic.. So after Step 6.1 install cmake i want to build with make GL and becomes following error:

pi@raspberrypi ~/glshim $ make GL [ 0%] Building C object src/CMakeFiles/GL.dir/gl/raster.c.o In file included from /home/pi/glshim/src/gl/wrap/../types.h:9:0, from /home/pi/glshim/src/gl/wrap/glpack.h:1, from /home/pi/glshim/src/gl/loader.h:10, from /home/pi/glshim/src/gl/raster.c:2: /home/pi/glshim/src/util/extypes.h:5:22: fatal error: X11/Xlib.h: No such file or directory

include <X11/Xlib.h>

                  ^

compilation terminated. src/CMakeFiles/GL.dir/build.make:54: recipe for target 'src/CMakeFiles/GL.dir/gl/raster.c.o' failed make[3]: * [src/CMakeFiles/GL.dir/gl/raster.c.o] Error 1 CMakeFiles/Makefile2:79: recipe for target 'src/CMakeFiles/GL.dir/all' failed make[2]: * [src/CMakeFiles/GL.dir/all] Error 2 CMakeFiles/Makefile2:91: recipe for target 'src/CMakeFiles/GL.dir/rule' failed make[1]: * [src/CMakeFiles/GL.dir/rule] Error 2 Makefile:151: recipe for target 'GL' failed make: * [GL] Error 2 pi@raspberrypi ~/glshim $

So have i install x11 seperatly... sudo apt-get install libx11-dev

nighteagle1974 commented 8 years ago

So glxgears Step 10 of my fresh installation give the same message: couldn't get an RGB, Double buffered visual.

Where can i have a look for programs output?

nighteagle1974 commented 8 years ago

I think the problem is dependig from jessie... something with the new systemd ?

lunixbochs commented 8 years ago

If the only message from glxgears whatsoever is "couldn't get an RGB, Double buffered visual" then glshim is not being used.

nighteagle1974 commented 8 years ago

Yes... and what can solve this? Many people talk about glxgears and this message appear with jessie image.

lunixbochs commented 8 years ago

Does es2gears work? If you're using glshim properly, "couldn't get an RGB, Double buffered visual" should not be the only message from glxgears. Does ldd /usr/bin/glxgears point to your installed glshim?

nighteagle1974 commented 8 years ago

Hi,

which package i have to install?

lunixbochs commented 8 years ago

mesa-utils-extra? learn to use apt-file or google "which debian package contains es2gears"

nighteagle1974 commented 8 years ago

Hi, i have used apt-cache search...

es2gears bring following:

libEGL warning: DRI2: failed to autheticate libIGL warning: DRI2: failed to open swrast (path) EGLUT: failed to initilalize EGL Display

lunixbochs commented 8 years ago

You don't have working OpenGL ES drivers, so this isn't a glshim problem.

If you do have drivers installed: are you running this over SSH? You need to at least export DISPLAY=:0 in that case, and maybe run xhost +local:

nighteagle1974 commented 8 years ago

Ah.. okay.. i thought jessie have the driver onboard. I use keyboard directly on the rpi.

nighteagle1974 commented 8 years ago

I don't find the OpenGL ES driver...

lunixbochs commented 8 years ago

Not a glshim problem :) Ask the raspberry pi folks.

nighteagle1974 commented 8 years ago

I have start it with: LD_LIBRARY_PATH=/home/pi/glshim/lib LIBGL_FB=1 glxgears -info

and become:

GL_Renderer = VideoCorre IV HW GL_Version = 1.4 glshim wrapper

nighteagle1974 commented 8 years ago

I have test it with my application and is running without the rpi folks they all write nonsense and have not test it yet. X11 is not support OpenGL ES on the RPI! The Mesa Driver for X11 only use Software renderer. The VC4 in future so i hope brings the problem absolete.

nighteagle1974 commented 8 years ago

So for the glshim.. Text ist not supported? I can see only some signs... but not readable.

lunixbochs commented 8 years ago

Text rendered using which method? If you call glXUseXFont, it might have some scaling issues. If you use glBitmap, due to performance reasons all of the text will be rendered on top of the entire scene, so there's no Z order.

If you're rendering fonts yourself, it's pretty trivial to rewrite that in a more ES-friendly way using a texture atlas.

nighteagle1974 commented 8 years ago

So the app use freeglut and in the sources i can see it use glBitmap. GLUT_BITMAP_8_BY_13 Font is set.

The Text is on the right down site.. not on the top? The window on the Top-Right side is for the text... looks like the text want not to be in place there?

nighteagle1974 commented 8 years ago

screen

lunixbochs commented 8 years ago

Which glshim branch are you using? unstable or master? Try the other branch.

nighteagle1974 commented 8 years ago

Which other? Unstable or Master? Or better the rpi ?

nighteagle1974 commented 8 years ago

After test master and rpi branch... they are not working. Message appears after start:

libGL warning, gles is NULL ERROR: EGL Error detected: EGL_NOT_INITIALIZED (0x3001) ERROR: EGL Error detected: EGL_NOT_INITIALIZED (0x3001) Segmentation fault

Only the one branch (actually working) unstable version ist starting

MagaTailor commented 8 years ago

You could also try https://github.com/ptitSeb/glshim which can be compiled for Rpi like this: cmake . -DBCMHOST=1; make GL

EDIT If you try it, you should obviously report any problems over there (meaning OpenPandora forum thread really)

nighteagle1974 commented 8 years ago

Hi,

many warnings during make... ? What are different to lunixbochs?

nighteagle1974 commented 8 years ago

So i have test out.... https://github.com/ptitSeb/glshim

I doesn't work.

undefined Symbol: gl11_client_state_init

Think is from the application an call which is not handled with this version.

nighteagle1974 commented 8 years ago

The one and oly that start is the unstable branch from lunixbochs. So good night i have enough for this day.

MagaTailor commented 8 years ago

@nighteagle1974 - it seems ptitSeb's heard you, please try again and post your results under the linked commit.

EDIT: Ah, yes - you were already active in the openpandora thread.

lunixbochs commented 8 years ago

@nighteagle1974

https://github.com/lunixbochs/glshim/blob/unstable/src/gl/raster.c#L49

Try replacing this glRasterPos3f function with this:

void glRasterPos3f(GLfloat x, GLfloat y, GLfloat z) {
    glWindowPos3f(x, y, z);
}

Otherwise, can you share your application binary so I can test it myself?

nighteagle1974 commented 8 years ago

Hi,

i can send you the sources of the app.. but without the IR-CAM you can not start the app. But you can have a look into the sources to see what going on. Give me your Mail-Adress then i can send you the sources.

nighteagle1974 commented 8 years ago

Okay.. delete the mail-adresse here! I send you the next minutes..

nighteagle1974 commented 8 years ago

I have replaced glRasterPos3f and build it looks like the same as before.. Nothing is changed...

lunixbochs commented 8 years ago

I'll test against your program's GL code sometime today and see what's up.

nighteagle1974 commented 8 years ago

Very Cool... :-) Where have i to donate?

lunixbochs commented 8 years ago

Thanks for the thought! I'm not accepting donations right now, but you could consider supporting the OpenPandora/Pyra project which helped make glshim possible: https://boards.openpandora.org/donate/