Skip to content

Commit

Permalink
fixing #8
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCrazyT committed Jul 14, 2018
1 parent e071e25 commit 8de17b7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .bintray.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},

"version": {
"name": "0.4"
"name": "0.5"
},

"files":
Expand Down
1 change: 1 addition & 0 deletions .travis_before_deploy
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ echo PATH: %PATH%
d:\Python36\python demo_race2.py
pause
EOL
cp roboschool/*.pyd build/
zip -r build/roboschool.zip rundemo.bat roboschool msysDLLs additionalDLLs agent_zoo -x ./roboschool/cpp-household/**\*
zip -ru build/roboschool.zip ./roboschool/cpp-household/glsl/*.glsl
if [ $? != 0 ]
Expand Down
24 changes: 16 additions & 8 deletions roboschool/cpp-household/render-simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,32 +337,40 @@ Texture::Texture() {
glFuncs->glGenTextures(1, &handle);
}
Texture::~Texture() {
QOpenGLExtraFunctions *glFuncs = QOpenGLContext::currentContext()->extraFunctions();
glFuncs->glDeleteTextures(1, &handle);
if(QOpenGLContext::currentContext() != NULL){
QOpenGLExtraFunctions *glFuncs = QOpenGLContext::currentContext()->extraFunctions();
glFuncs->glDeleteTextures(1, &handle);
}
}
Framebuffer::Framebuffer() {
QOpenGLExtraFunctions *glFuncs = QOpenGLContext::currentContext()->extraFunctions();
glFuncs->glGenFramebuffers(1, &handle);
}
Framebuffer::~Framebuffer() {
QOpenGLExtraFunctions *glFuncs = QOpenGLContext::currentContext()->extraFunctions();
glFuncs->glDeleteFramebuffers(1, &handle);
if(QOpenGLContext::currentContext() != NULL){
QOpenGLExtraFunctions *glFuncs = QOpenGLContext::currentContext()->extraFunctions();
glFuncs->glDeleteFramebuffers(1, &handle);
}
}
Buffer::Buffer() {
QOpenGLExtraFunctions *glFuncs = QOpenGLContext::currentContext()->extraFunctions();
glFuncs->glGenBuffers(1, &handle);
}
Buffer::~Buffer() {
QOpenGLExtraFunctions *glFuncs = QOpenGLContext::currentContext()->extraFunctions();
glFuncs->glDeleteBuffers(1, &handle);
if(QOpenGLContext::currentContext() != NULL){
QOpenGLExtraFunctions *glFuncs = QOpenGLContext::currentContext()->extraFunctions();
glFuncs->glDeleteBuffers(1, &handle);
}
}
VAO::VAO() {
QOpenGLExtraFunctions *glFuncs = QOpenGLContext::currentContext()->extraFunctions();
glFuncs->glGenVertexArrays(1, &handle);
}
VAO::~VAO() {
QOpenGLExtraFunctions *glFuncs = QOpenGLContext::currentContext()->extraFunctions();
glFuncs->glDeleteVertexArrays(1, &handle);
if(QOpenGLContext::currentContext() != NULL){
QOpenGLExtraFunctions *glFuncs = QOpenGLContext::currentContext()->extraFunctions();
glFuncs->glDeleteVertexArrays(1, &handle);
}
}

void ContextViewport::_render_single_object(const shared_ptr<Household::ShapeDetailLevels>& m, uint32_t options, int detail, const QMatrix4x4& at_pos)
Expand Down

0 comments on commit 8de17b7

Please sign in to comment.