emscripten-core / emscripten-core/emscripten

"null function or function signature mismatch" for `glClearDepth`

Open
#18,689 9 comments 0 reactions 0 assignees View on GitHub
Desktop OpenGL emulation help wanted
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

I believe this issue is the same as [Issue 14801](https://github.com/emscripten-core/emscripten/issues/14801) but for `glClearDepth`; that function is null. Other core functions (such as `glClear`) load just fine (the loader is [GLAD](https://github.com/Dav1dde/glad)), and the program works correctly under desktop.

Note that `glClearDepth` takes a `double` and has been available since OpenGL (not WebGL) 2.0, while `glClearDepthf` (which I found poking around the Emscripten source) takes a `float` and is available since OpenGL 4.1 ([see docs for both](https://registry.khronos.org/OpenGL-Refpages/gl4/html/glClearDepth.xhtml)). Note that `glClearDepthf` is null as well. The corresponding [WebGL call is `.clearDepth`](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/clearDepth).

**Version** (`emcc -v`)
```text
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.30 (cfe2bdfe2692457cb5f5770672f6e5ccb3ffc2f2)
clang version 16.0.0 (https://github.com/llvm/llvm-project 800f0f1546b2352ba42a4777149afb13cb874fcd)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.