by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 21 23:40
    sorenbug synchronize #6
  • May 21 20:28
    sorenbug synchronize #6
  • May 21 19:13
    sorenbug synchronize #6
  • May 18 23:04
    sorenbug synchronize #6
  • May 18 22:58
    sorenbug synchronize #6
  • May 18 22:53
    sorenbug synchronize #6
  • May 18 22:40
    sorenbug opened #6
  • Feb 22 18:02
    EskoJTH commented #3
  • Feb 22 18:00
    EskoJTH closed #3
  • Feb 22 18:00
    EskoJTH commented #3
  • Feb 22 17:47
    EskoJTH edited #3
  • Feb 22 17:47
    EskoJTH opened #3
  • Jan 27 07:30
    RiugaBachi edited #22
  • Jan 27 07:27
    RiugaBachi opened #22
  • Jan 27 07:20
    RiugaBachi opened #21
  • Aug 20 2019 16:17

    csabahruska on master

    add few type signatures (compare)

  • Jul 17 2019 17:30
    davidabernado closed #15
  • Jul 17 2019 17:30
    davidabernado commented #15
  • Jul 17 2019 17:27
    davidabernado commented #15
  • Jul 17 2019 17:26
    davidabernado reopened #15
image.png
Those four classes:
LambdaCube.GLES20.PipelineInput
LambdaCube.GLES20.GLObject
LambdaCube.GLES20.StreamMap
LambdaCube.GLES20.Stream
Have undefined references to:
V2I
V2B
V2F
V3I
V3B
V3F
V4I
V4B
V4F
M22F
M33F
M44F
However I am using master from both repositories
And generated-backends is significantly behind ir
Csaba Hruska
@csabahruska
that is bad news
the compiler generated IR is incompatible with generated-backends
Soren
@srnb_gitlab
I think the RT is behind in the Java generated backend
Csaba Hruska
@csabahruska
it needs and update, but I'm busy with other things
Soren
@srnb_gitlab
I'm willing to give it a shot, if it's not too hard
Csaba Hruska
@csabahruska
webgl 1.0 =~= gl es 2.0
it is also in par with compiler ir version
(afaik)
Soren
@srnb_gitlab
Would it be too terrible if I implemented it in Kotlin? Or should I stick to Java
Csaba Hruska
@csabahruska
if you prefer Kotlin then sure :)
Soren
@srnb_gitlab
I will see what I can do :grin:
Soren
@srnb_gitlab
I can't figure out where the code that generates the backends is
Csaba Hruska
@csabahruska
lambdacube-ir repo has a Haskell based EDSL solution for cross language data serialization, the repo also contains the lambdacube data type specs in that EDSL. Each language has a corresponding template file. Ede is a haskell library for text templates.
so lambdacube-ir covers only the graphics pipeline data type specs and serialization part
lambdacube-gl and purescript-lambdacube-webgl are handwritten backends and they rely on lambdacube-ir types
generated-backends was an experiment to generate gles 2.0 backend for multiple languages and platforms
Csaba Hruska
@csabahruska
if you plan to write the gles 2.0 kotlin android backend by hand (preferred way), then you'll need to add support for kotlin in lambdacube-ir
and you do not have to deal with the generated-backend repo because it is not for manually written backends
this is the main codegen module for the data serialization EDSL:
https://github.com/lambdacube3d/lambdacube-ir/blob/master/ddl/Generate.hs
the compiler and the backends rely strictly on the generated data types and their serializers
again: do not try to add kotlin support for the generated-backends repo, it is a complex task to make it right
Csaba Hruska
@csabahruska
it is not fun
write the backend part manually and add kotlin support for lambdacube-ir data serialzier EDSL
Soren
@srnb_gitlab
:+1:
So to summarize, and make sure I'm understanding it correctly: Add Kotlin to the IR/EDSL and write the GLES20 parts manually? @csabahruska
Csaba Hruska
@csabahruska
yep
Soren
@srnb_gitlab
sealed class StreamData ()

data class StreamData ( 
  val streamData : Map<String, ArrayValue>,

  val streamType : Map<String, InputType>,

  val streamPrimitive : FetchPrimitive,

  val streamPrograms : Array<ProgramName>,
 ): StreamData ()
It doesn't look too pretty, but it's working (a bit)
Csaba Hruska
@csabahruska
postprocess it with a kotlin code formatter
Soren
@srnb_gitlab
Ah, I've just fixed the EDE
So it's nice and tidy
Csaba Hruska
@csabahruska
good!
well done
Soren
@srnb_gitlab
https://mystb.in/pejijoqexa.kt Here's a sample of the first half of stuff right now
Still have to do the JSON and the RT stuff
Oops, I broke things with one field
Soren
@srnb_gitlab
Soren
@srnb_gitlab
The question now is how to implement the JSON stuff
Soren
@srnb_gitlab

What does "correct" JSON input/output look like? This looks pretty enticing, but the downfall of it is that optimizers like Proguard on Android are going to have to be configured specifically for it.

The Java backend uses org.json/JSON-java, which is the most portable, so I should probably just copy that

Csaba Hruska
@csabahruska
use the platform default json library
the json format is fixed in the EDSL though
the goal is to be platfom idiomatic as much as possible