Skip to content

Commit 1d92e98

Browse files
committed
Adjust cpp
1 parent c47482f commit 1d92e98

File tree

9 files changed

+5
-22
lines changed

9 files changed

+5
-22
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ and additional browser-like interfaces.
4646
Those two are bundled into
4747
the [3d-core-raub](https://github.com/node-3d/3d-core-raub) in a following manner:
4848

49-
```
49+
```js
5050
const image = require('image-raub');
5151
const webgl = require('webgl-raub');
5252
const { Document } = require('glfw-raub');

core.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
'use strict';
22

33
require('segfault-raub');
4-
54
require('deps-opengl-raub');
5+
const { getBin, createLogger } = require('addon-tools-raub');
66

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

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

src/cpp/clear.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#include <cstring>
2-
#include <vector>
3-
41
#include "webgl.hpp"
52

63

src/cpp/draw.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#include <cstring>
2-
#include <vector>
3-
41
#include "webgl.hpp"
52

63

src/cpp/programs.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include "webgl.hpp"
2-
#include <vector>
32

43

54
namespace webgl {

src/cpp/sync.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <cstring>
2-
31
#include "webgl.hpp"
42

53
/**

src/cpp/transformfeedback.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <vector>
2-
31
#include "webgl.hpp"
42

53

src/cpp/vertexarrays.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#include <cstring>
2-
#include <vector>
3-
41
#include "webgl.hpp"
52

63

src/cpp/webgl.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
#include <cstring>
2-
#include <vector>
3-
#include <iostream>
4-
51
#include "webgl.hpp"
62

73

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

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

0 commit comments

Comments
 (0)