Skip to content

Commit

Permalink
Adjust cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
raub committed Nov 3, 2024
1 parent c47482f commit 1d92e98
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ and additional browser-like interfaces.
Those two are bundled into
the [3d-core-raub](https://github.com/node-3d/3d-core-raub) in a following manner:

```
```js
const image = require('image-raub');
const webgl = require('webgl-raub');
const { Document } = require('glfw-raub');
Expand Down
4 changes: 2 additions & 2 deletions core.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

require('segfault-raub');

require('deps-opengl-raub');
const { getBin, createLogger } = require('addon-tools-raub');

const { getBin } = require('addon-tools-raub');
createLogger({ name: 'webgl' });

const core = require(`./${getBin()}/webgl`);

Expand Down
3 changes: 0 additions & 3 deletions src/cpp/clear.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#include <cstring>
#include <vector>

#include "webgl.hpp"


Expand Down
3 changes: 0 additions & 3 deletions src/cpp/draw.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#include <cstring>
#include <vector>

#include "webgl.hpp"


Expand Down
1 change: 0 additions & 1 deletion src/cpp/programs.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "webgl.hpp"
#include <vector>


namespace webgl {
Expand Down
2 changes: 0 additions & 2 deletions src/cpp/sync.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include <cstring>

#include "webgl.hpp"

/**
Expand Down
2 changes: 0 additions & 2 deletions src/cpp/transformfeedback.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include <vector>

#include "webgl.hpp"


Expand Down
3 changes: 0 additions & 3 deletions src/cpp/vertexarrays.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#include <cstring>
#include <vector>

#include "webgl.hpp"


Expand Down
7 changes: 2 additions & 5 deletions src/cpp/webgl.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#include <cstring>
#include <vector>
#include <iostream>

#include "webgl.hpp"


Expand All @@ -14,7 +10,8 @@ DBG_EXPORT JS_METHOD(init) { NAPI_ENV;
GLenum err = glewInit();

if (GLEW_OK != err) {
std::cerr << "Error: " << glewGetErrorString(err) << std::endl;
const GLubyte *text = glewGetErrorString(err);
globalLog(env, "webgl", "error", reinterpret_cast<const char*>(text));
JS_THROW("Can't initialize GLEW.");
}

Expand Down

0 comments on commit 1d92e98

Please sign in to comment.