Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add back gladGetProcAddressPtr declarations #1

Merged
merged 1 commit into from
Mar 29, 2018

Conversation

zploskey
Copy link

These declarations were removed from glad.h when glad was
regenerated in 8b75c25.

typedef void* (APIENTRYP PFNWGLGETPROCADDRESSPROC_PRIVATE)(const char*);
static PFNWGLGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;

This broke the build on Linux, as this is used in SOIL.c.

These changes also remove duplicate lines in the Windows ifdefs in
glad.c, as they are already present in the header.

These declarations were removed from glad.h when glad was
regenerated in 8b75c25.

typedef void* (APIENTRYP PFNWGLGETPROCADDRESSPROC_PRIVATE)(const char*);
static PFNWGLGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;

This broke the build on Linux, as this is used in SOIL.c.

These changes also remove duplicate lines in the Windows ifdefs in
glad.c, as they are already present in the header.
@zploskey
Copy link
Author

See discussion here: Schmavery/reprocessing#74

By the way, this only builds with bsb-native 2.1.1, not master. Should we set that explicitly for now?

@Schmavery
Copy link

I'll let @bsansouci double-check my memory here and answer the question about bsb-native version when he gets the chance. Thanks!

@bsansouci
Copy link
Owner

@zploskey great find. This looks good. I gotta stop doing shit patches like these ones.

Any logs on what makes it not build at master? It might be an unrelated problem.

@bsansouci bsansouci merged commit 45c490d into bsansouci:master Mar 29, 2018
@zploskey zploskey deleted the gladGetProcAddressPtr branch March 30, 2018 00:33
@zploskey
Copy link
Author

They key bit is this:

Error: Command failed: /home/zach/src/tgls/node_modules/bs-platform/scripts/buildocaml.sh
File "_none_", line 1:
Error: I/O error: compilerlibs/ocamlbytecomp.cma: No such file or directory
make[4]: *** [Makefile:408: compilerlibs/ocamlbytecomp.cma] Error 2

Should I file an issue on bsb-native?

@bsansouci
Copy link
Owner

Are you using npm5 by any chance? If so, can you try yarn or npm4. Here's how you can (safely, temporarily) downgrade to npm4: npm install -g npm@latest-4

@zploskey
Copy link
Author

zploskey commented Mar 30, 2018

Yes, npm 5. My npm is version 5.6.0. It came bundled with the nodesource rpms / repository I installed node 8 with. It seems since my local npm directory comes first in my path and that command let me override it. Build seems to work on latest npm 4.

@zploskey
Copy link
Author

For the heck of it I tried latest npm5 (5.8.0) and it gives the same error.

@bsansouci
Copy link
Owner

Ok great, that's a known issue! So with npm4 everything works as expected on master?
Would you mind trying the new API we pushed:

open Reprocessing;

let setup = env => {
  Env.size(~width=600, ~height=600, env);
  Draw.createImage(600, 600, env);
};

let draw = (image, env) => {
  Draw.background(Utils.color(~r=199, ~g=217, ~b=229, ~a=255), env);
  Draw.fill(Utils.color(~r=255, ~g=0, ~b=0, ~a=255), env);    
  Draw.rect(~pos=(5, 150), ~width=300, ~height=300, env);
  Draw.withImage(
    image,
    env,
    env => {
      Draw.background(Utils.color(~r=255, ~g=217, ~b=229, ~a=100), env);
      /*Draw.fill(Utils.color(~r=199, ~g=217, ~b=229, ~a=255), env);*/
      Draw.fill(Utils.color(~r=41, ~g=166, ~b=244, ~a=255), env);
      
      Draw.rect(~pos=(150, 150), ~width=300, ~height=300, env);
      Draw.fill(Utils.color(~r=255, ~g=217, ~b=229, ~a=150), env);
      Draw.rect(~pos=(0, 150), ~width=20, ~height=20, env);
    }
  );
  Draw.image(image, ~pos=(100, 0), env);
  image;
};

run(~setup, ~draw, ());

Can you screenshot what you get (if it doesn't segfault lol).

Thanks for keeping up the good work man, this is so helpful.

@zploskey
Copy link
Author

zploskey commented Apr 1, 2018

I'm still getting segfaults when running on native/bytecode. I doubt it behaves any differently on the web target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants