Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
55 user(s) are online (27 user(s) are browsing Forums)

Members: 2
Guests: 53

nbache, AlfredOne, more...

Support us!

Recent OS4 Files
OS4Depot.net

Report message:*
 

Re: Odyssey 1.23: AOS4 source code on GitHub

Subject: Re: Odyssey 1.23: AOS4 source code on GitHub
by kas1e on 2020/3/4 15:43:04

@Hans
Tried in meantime to compile an old version of Cairo used with odyssey (1.2.16), and it has GL and GLES2 backends. I only tried GL one, and at least able to compile libcairo.a with gl4es includes for GL backend.

Through in that version, they wrote that "gl backend is experimental" blabal, but what worries me most, is that all their gl-example (at least in that version) use Xwindow+glx and stuff. And Cairo have cairo_glx_device_create() function for.

Through I found some gl-SDL's Cairo examples, where GL-context created via SDL, and then create_cairo_context(): https://bazaar.launchpad.net/~macslow/gl-cairo-simple/trunk/files

I currently testing if it works at all, but, I not sure how it all will fit into an Odyssey. I mean, searching just in the whole Odysseys code, I didn't find any cairo_create_surface or cairo_device, but lots of cairo_image_surface_create(). This means that this "image surface" is used way in Odyssey. How to tell to WebKit (or to Cairo), to use by default "gl-surface over image-surface" if that possible at all, or how to tell to just use gl-surface is unknown for me, and probably all need rewriting.

See what is written on Cairo's site:

Quote:

Which steps should one usually take in order to get cairo-drawn vector-graphics into an OpenGL-rendered scene...

Setup your OpenGL-context, e.g. via SDL or gtk+/GtkGlExt.

Create your cairo-surface/context (maybe even glitz-based) you want to use as a source for later texture-map generation.

Render into the cairo-context with normal cairo-calls.

Copy the cairo-surface into an OpenGL-texture with glTexImage2D().

Use this texture to map your OpenGL-primitives with.

Rendering to the cairo-surface and copying that to the OpenGL-texture afterwards, can also be done in your rendering-loop, if you want to animate the cairo-graphics themselves from frame to frame.

For the time being disregard the idea of drawing into the same surface or texture with cairo- and OpenGL-calls. This is possible, but not in a very straight forward fashion. Also threadding-issues are not covered here at the moment. Everything happens in one thread right now.



So as far as i understand:

1). Additional code should be done inside of Odyssey
2). "copy surface into an OpenGL-texture" => fail because of no_DMA. Exactly the issues i have with any game and DosBox hitting 100% of cpu when texture uploading to the GPU and busy wait everything else.



Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project