Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: solvespace/solvespace
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2fe17a46c280
Choose a base ref
...
head repository: solvespace/solvespace
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e74137dc6716
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Nov 23, 2019

  1. Fix misuse of glTexImage2D (again).

    This was originally changed in 74aa80b, but the fix broke stipping
    because it incorrectly changed the logic. Revert that, and just make
    the textures smaller instead.
    whitequark committed Nov 23, 2019
    Copy the full SHA
    e74137d View commit details
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/render/gl3shader.cpp
7 changes: 4 additions & 3 deletions src/render/gl3shader.cpp
Original file line number Diff line number Diff line change
@@ -388,9 +388,10 @@ GLuint Generate(const std::vector<double> &pattern) {

GLint size;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size);
RgbaColor *textureData = new RgbaColor[size];
size /= 2;

int mipCount = (int)log2(size);
RgbaColor *textureData = new RgbaColor[size];
int mipCount = (int)log2(size) + 1;
for(int mip = 0; mip < mipCount; mip++) {
int dashI = 0;
double dashT = 0.0;
@@ -423,8 +424,8 @@ GLuint Generate(const std::vector<double> &pattern) {
textureData);
size /= 2;
}

delete []textureData;

return texture;
}