Skip to content

Commit

Permalink
work on isf editor
Browse files Browse the repository at this point in the history
added version to about window :: the source code editor now displays errors for malformed JSON blobs :: source code editor font size should respect the system zoom level for high-DPI displays on windows :: went through and removed last few remaining references to the 'Library' from the windows build (it referred to a path on macs for anyone who was curious) :: fixed a bug, converted shaders weren't being written correctly on windows :: fixed a bug, OpenSSL libraries werent being packaged up with the windows build, which resulted in an inability to contact shadertoy on many systems :: bumped version number to 2.9.8- due to a Qt bug, version numbers have to be truncated to three groups of numbers :: work on installer project, source tree should no longer get polluted with build files during a release build :: updated nlohmann json
  • Loading branch information
mrRay committed Jan 22, 2019
1 parent 798dcf4 commit 2787443
Show file tree
Hide file tree
Showing 26 changed files with 6,344 additions and 2,267 deletions.
17 changes: 16 additions & 1 deletion VVGL/src/GLBufferPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2126,8 +2126,21 @@ GLBufferRef CreateBufferForQImage(QImage * inImg, const bool & createInCurrentCo
desc.texClientStorageFlag = true;
desc.msAmount = 0;
desc.localSurfaceID = 0;

// this bit copies the image data to a manually-allocated block of memory. i'm not sure why, but if i don't do this, i get crashes under some circumstances
void *tmpData = malloc(desc.backingLengthForSize(gpuSize));
char *rPtr = static_cast<char*>(pixelData);
char *wPtr = static_cast<char*>(tmpData);
int rLineStride = inImg->bytesPerLine();
int rBytesPerLine = imgSize.width * 32 / 8;
for (int i=0; i<imgSize.height; ++i) {
memcpy(wPtr, rPtr, rBytesPerLine);
rPtr += rLineStride;
wPtr += rBytesPerLine;
}

GLBufferRef returnMe = inPoolRef->createBufferRef(desc, gpuSize, pixelData, repSize, createInCurrentContext);
//GLBufferRef returnMe = inPoolRef->createBufferRef(desc, gpuSize, pixelData, repSize, createInCurrentContext);
GLBufferRef returnMe = inPoolRef->createBufferRef(desc, gpuSize, tmpData, repSize, createInCurrentContext);
returnMe->parentBufferPool = inPoolRef;
returnMe->srcRect = VVGL::Rect(0,0,imgSize.width,imgSize.height);
returnMe->backingID = GLBuffer::BackingID_None;
Expand All @@ -2136,6 +2149,8 @@ GLBufferRef CreateBufferForQImage(QImage * inImg, const bool & createInCurrentCo
returnMe->flipped = true;

returnMe->preferDeletion = true;

free(tmpData);

return returnMe;
}
Expand Down
2 changes: 1 addition & 1 deletion VVISF/include/ISFScene.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class VVISF_EXPORT ISFScene : public VVGL::GLScene {
//! Unloads whatever ISF file is currently loaded.
void useFile() noexcept(false);
//! Loads the ISF file at the passed path.
void useFile(const string & inPath) noexcept(false);
void useFile(const string & inPath, const bool & inThrowExc=true) noexcept(false);
//! Starts using the ISF file represented by the passed ISFDoc.
void useDoc(ISFDocRef & inDoc);
//! Returns the ISFDoc currently being used by the scene. Interacting with this doc by setting the value of its inputs will directly affect rendering.
Expand Down
Loading

0 comments on commit 2787443

Please sign in to comment.