Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Loading Shaders #12

Open
tepGithub opened this issue Apr 19, 2013 · 4 comments
Open

Loading Shaders #12

tepGithub opened this issue Apr 19, 2013 · 4 comments

Comments

@tepGithub
Copy link
Contributor

Hi Alex,
I'm currently working on loading the shaders with GLS3D. In theory GLS3D should take GLSL and convert it to AGAL under the hood.

I just want to confirm with you the steps I needed to do:

  1. Run glsl2agal to get JSON output file (done offline, through glsl2agal)
  2. Load JSON file
  3. Extract information regarding uniforms
  4. Extract agal asm code
  5. Run AGALMiniAssembler on agal asm code
  6. Create Program3D and upload the AGAL asm code

In your todo list, you wrote about integrating glsl2agal, were you thinking to run the conversion process at run-time? How easy is it to integrate it (how many files I need to integrate)? I can try doing it if it's not that hard.

-tep

@tepGithub
Copy link
Contributor Author

Another question is, do you already have a code that actually loads and parse the JSON file (output from glsl2agal)?

@tepGithub
Copy link
Contributor Author

Ok, I just found AS3 has json's package/lib, let me check that out

@gpekofsky
Copy link

How about instead of loading it offline, we load GLSL from a string, convert it to AGAL, create a shader and a program with it glCreateShader/glCreateProgram?

@tepGithub
Copy link
Contributor Author

Yeah, in theory, we can do that and probably it's good to do that since we are actually emulating open gl layer, so it should accept GLSL and we can convert it dynamically to AGAL under the hood. However, I am currently busy with other things.. and we need to integrate glsl2agal project...

If you are free, you are welcome to do so :)

Note: I have implemented some functionality for shaders but it's not complete yet; so I haven't checked it in.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants