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

Uncaught TypeError: Cannot convert object to primitive value #8

Open
AngelGamer29JA opened this issue May 17, 2023 · 3 comments
Open
Assignees

Comments

@AngelGamer29JA
Copy link

error: Uncaught TypeError: Cannot convert object to primitive value
new BigUint64Array([BigInt(Deno.UnsafePointer.of(buf))]).buffer,
^
at BigInt ()
at WebGLRenderingContext.shaderSource (https://deno.land/x/[email protected]/src/webgl/renderingContext.ts:737:29)
at loadShader (https://deno.land/x/[email protected]/src/renderers/webgl/util.ts:41:8)
at initShaderProgram (https://deno.land/x/[email protected]/src/renderers/webgl/util.ts:15:24)
at new WebGLRenderer2D (https://deno.land/x/[email protected]/src/renderers/webgl/2d.ts:40:21)
at new World (https://deno.land/x/[email protected]/src/World.ts:29:21)
at file:///C:/Users/popit/workspace/deno/kekotest/main.ts:8:14

@load1n9 load1n9 self-assigned this May 17, 2023
@load1n9
Copy link
Owner

load1n9 commented May 17, 2023

Will look into seems like a gluten issue

@load1n9
Copy link
Owner

load1n9 commented May 18, 2023

can you send me the code used

@AngelGamer29JA
Copy link
Author

AngelGamer29JA commented May 20, 2023

What happens is that I set the "gless" option to false because it doesn't let me start the OpenGL context, throwing the error:

GlfwError: 65542 WGL: OpenGL ES requested but WGL_ARB_create_context_es2_profile is unavailable
error: Uncaught Error: Failed to create window
      throw new Error("Failed to create window");
            ^
    at new WindowGlfw (https://deno.land/x/[email protected]/src/platform/glfw/window.ts:659:13)
    at createWindow (https://deno.land/x/[email protected]/src/platform/mod.ts:32:10)
    at new WebGLCanvas (https://deno.land/x/[email protected]/src/webgl/canvas.ts:18:19)
    at new World (https://deno.land/x/[email protected]/src/World.ts:23:5)
    at file:///C:/Users/popit/workspace/deno/kekotest/main.ts:16:15

And then the code I used is:

import { Rectangle, Scene, World } from "https://deno.land/x/caviar/mod.ts";

class Game extends Scene {
  test = new Rectangle(0, 0, 100, 100, "#00ff00");
  test2 = new Rectangle(0, 0, 100, 100, "#00ff00");

  setup() {
    this.addChild([this.test, this.test2]);
  }
  update() {
    this.test.x += 5;
    this.test2.x += 2;
  }
}

const world = new World({
  title: "",
  width: 800,
  height: 600,
  resizable: true,
  gles: false
}, [Game]);

await world.start();

Sorry for my english, i used translator

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

No branches or pull requests

2 participants