Here https://github.com/luce80/PureBasic_gles-egl you can find PureBasic bindings for the libGLES and libEGL shared libraries. There are also a few utility functions. There is also a test program.
ATTENTION: to successfully run the example code you will have to edit the libpath and libname variable ...
Search found 5 matches
- Sat Jul 03, 2021 3:57 pm
- Forum: Applications - Feedback and Discussion
- Topic: [Library Module] libGLES and libEGL bindings
- Replies: 0
- Views: 3997
- Sat Jun 26, 2021 1:56 pm
- Forum: 3D Programming
- Topic: How to use glReadPixels with CanvasGadget ?
- Replies: 3
- Views: 5278
[Solved] Re: How to use glReadPixels with CanvasGadget ?
I got it !
CanvasGadget(#Canvas,20,20,500,200)
CreateImage(#Image, GadgetWidth(#Canvas), GadgetHeight(#Canvas), 32) ; <<-- Note that 32 bits are necessary
If StartDrawing(ImageOutput(#Image))
; Note the use of #GL_BGRA
glReadPixels (0, 0, GadgetWidth(#Canvas), GadgetHeight(#Canvas), #GL ...
CanvasGadget(#Canvas,20,20,500,200)
CreateImage(#Image, GadgetWidth(#Canvas), GadgetHeight(#Canvas), 32) ; <<-- Note that 32 bits are necessary
If StartDrawing(ImageOutput(#Image))
; Note the use of #GL_BGRA
glReadPixels (0, 0, GadgetWidth(#Canvas), GadgetHeight(#Canvas), #GL ...
- Thu Jun 24, 2021 6:55 pm
- Forum: 3D Programming
- Topic: How to use glReadPixels with CanvasGadget ?
- Replies: 3
- Views: 5278
How to use glReadPixels with CanvasGadget ?
I'd like to use glReadPizels to draw the contents of the gl framebuffer to a CanvasGadget. I have tried DraingBuffer(), CanvasOutput() and DrawImage() in various combinations ;) but with no luck. Any suggestions ? This does not work:
CanvasGadget(#Canvas,20,20,500,200)
CreateImage(#Image ...
CanvasGadget(#Canvas,20,20,500,200)
CreateImage(#Image ...
- Wed Jun 02, 2021 3:30 pm
- Forum: Coding Questions
- Topic: Declare or not Declare a prototype ?
- Replies: 3
- Views: 929
Re: Declare or not Declare a prototype ?
Thanks a lot! Not so obvious for a novice like me. EnableExplicit is not explicitly mentioned in Prototype part of the manual but it works!
- Tue Jun 01, 2021 6:06 pm
- Forum: Coding Questions
- Topic: Declare or not Declare a prototype ?
- Replies: 3
- Views: 929
Declare or not Declare a prototype ?
How can I prototype a dll function and then use it inside a procedure ? This gives me error:
If 0 = OpenLibrary(0, "USER32.DLL") : End : EndIf
Prototype.i ProtoMessageBox(Window.i, Body$, Title$, Flags.i = 0)
; 'MsgBox' is a variable with a 'ProtoMessageBox' type
;
MsgBox.ProtoMessageBox ...
If 0 = OpenLibrary(0, "USER32.DLL") : End : EndIf
Prototype.i ProtoMessageBox(Window.i, Body$, Title$, Flags.i = 0)
; 'MsgBox' is a variable with a 'ProtoMessageBox' type
;
MsgBox.ProtoMessageBox ...