more logging on texture ops, mockito fix
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
06a1f2dbbc
commit
5a99fb387a
@ -214,7 +214,10 @@ public class Texture {
|
|||||||
this.datatype = GL_UNSIGNED_BYTE;
|
this.datatype = GL_UNSIGNED_BYTE;
|
||||||
this.glTexImage2D(openGlState, width, height, GL_RGB, GL_UNSIGNED_BYTE, data);
|
this.glTexImage2D(openGlState, width, height, GL_RGB, GL_UNSIGNED_BYTE, data);
|
||||||
}
|
}
|
||||||
glGenerateMipmap(GL_TEXTURE_2D);
|
|
||||||
|
LoggerInterface.loggerRenderer.DEBUG("Generate Mipmap");
|
||||||
|
GL40.glGenerateMipmap(GL_TEXTURE_2D);
|
||||||
|
Globals.renderingEngine.checkError();
|
||||||
//OPTIONAL free the original image data now that it's on the gpu
|
//OPTIONAL free the original image data now that it's on the gpu
|
||||||
// System.gc();
|
// System.gc();
|
||||||
//check build status
|
//check build status
|
||||||
@ -323,7 +326,9 @@ public class Texture {
|
|||||||
public void setWrap(OpenGLState openGlState, int wrapDir, int wrapType){
|
public void setWrap(OpenGLState openGlState, int wrapDir, int wrapType){
|
||||||
//TODO: store wrap type for the direction in this object
|
//TODO: store wrap type for the direction in this object
|
||||||
openGlState.glBindTexture(GL_TEXTURE_2D,texturePointer);
|
openGlState.glBindTexture(GL_TEXTURE_2D,texturePointer);
|
||||||
|
Globals.renderingEngine.checkError();
|
||||||
glTexParameteri(GL_TEXTURE_2D, wrapDir, wrapType);
|
glTexParameteri(GL_TEXTURE_2D, wrapDir, wrapType);
|
||||||
|
Globals.renderingEngine.checkError();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -333,7 +338,9 @@ public class Texture {
|
|||||||
public void setBorderColor(OpenGLState openGlState, float borderColor[]){
|
public void setBorderColor(OpenGLState openGlState, float borderColor[]){
|
||||||
this.borderColor = borderColor;
|
this.borderColor = borderColor;
|
||||||
openGlState.glBindTexture(GL_TEXTURE_2D,texturePointer);
|
openGlState.glBindTexture(GL_TEXTURE_2D,texturePointer);
|
||||||
|
Globals.renderingEngine.checkError();
|
||||||
glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor);
|
glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor);
|
||||||
|
Globals.renderingEngine.checkError();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -343,7 +350,9 @@ public class Texture {
|
|||||||
public void setMinFilter(OpenGLState openGlState, int minFilter){
|
public void setMinFilter(OpenGLState openGlState, int minFilter){
|
||||||
this.minFilter = minFilter;
|
this.minFilter = minFilter;
|
||||||
openGlState.glBindTexture(GL_TEXTURE_2D,texturePointer);
|
openGlState.glBindTexture(GL_TEXTURE_2D,texturePointer);
|
||||||
|
Globals.renderingEngine.checkError();
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minFilter);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minFilter);
|
||||||
|
Globals.renderingEngine.checkError();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -353,7 +362,9 @@ public class Texture {
|
|||||||
public void setMagFilter(OpenGLState openGlState, int maxFilter){
|
public void setMagFilter(OpenGLState openGlState, int maxFilter){
|
||||||
this.maxFilter = maxFilter;
|
this.maxFilter = maxFilter;
|
||||||
openGlState.glBindTexture(GL_TEXTURE_2D,texturePointer);
|
openGlState.glBindTexture(GL_TEXTURE_2D,texturePointer);
|
||||||
|
Globals.renderingEngine.checkError();
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, maxFilter);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, maxFilter);
|
||||||
|
Globals.renderingEngine.checkError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -374,7 +385,9 @@ public class Texture {
|
|||||||
int level = 0;
|
int level = 0;
|
||||||
int border = 0; //this must be 0 according to docs
|
int border = 0; //this must be 0 according to docs
|
||||||
openGLState.glBindTexture(GL_TEXTURE_2D,texturePointer);
|
openGLState.glBindTexture(GL_TEXTURE_2D,texturePointer);
|
||||||
|
Globals.renderingEngine.checkError();
|
||||||
GL40.glTexImage2D(GL_TEXTURE_2D, level, format, width, height, border, format, datatype, MemoryUtil.NULL);
|
GL40.glTexImage2D(GL_TEXTURE_2D, level, format, width, height, border, format, datatype, MemoryUtil.NULL);
|
||||||
|
Globals.renderingEngine.checkError();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -395,7 +408,9 @@ public class Texture {
|
|||||||
int level = 0;
|
int level = 0;
|
||||||
int border = 0; //this must be 0 according to docs
|
int border = 0; //this must be 0 according to docs
|
||||||
openGLState.glBindTexture(GL_TEXTURE_2D,texturePointer);
|
openGLState.glBindTexture(GL_TEXTURE_2D,texturePointer);
|
||||||
|
Globals.renderingEngine.checkError();
|
||||||
GL40.glTexImage2D(GL_TEXTURE_2D, level, format, width, height, border, format, datatype, data);
|
GL40.glTexImage2D(GL_TEXTURE_2D, level, format, width, height, border, format, datatype, data);
|
||||||
|
Globals.renderingEngine.checkError();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -73,7 +73,7 @@ public class ServiceManagerTests {
|
|||||||
serviceManager.instantiate();
|
serviceManager.instantiate();
|
||||||
|
|
||||||
//verify init was called
|
//verify init was called
|
||||||
Mockito.verify(service1Mock, Mockito.calls(1)).init();
|
Mockito.verify(service1Mock, Mockito.times(1)).init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@FastTest
|
@FastTest
|
||||||
@ -90,13 +90,13 @@ public class ServiceManagerTests {
|
|||||||
serviceManager.instantiate();
|
serviceManager.instantiate();
|
||||||
|
|
||||||
//verify init was called
|
//verify init was called
|
||||||
Mockito.verify(service1Mock, Mockito.calls(1)).init();
|
Mockito.verify(service1Mock, Mockito.times(1)).init();
|
||||||
|
|
||||||
//destroy
|
//destroy
|
||||||
serviceManager.destroy();
|
serviceManager.destroy();
|
||||||
|
|
||||||
//verify destroy was called
|
//verify destroy was called
|
||||||
Mockito.verify(service1Mock, Mockito.calls(1)).destroy();
|
Mockito.verify(service1Mock, Mockito.times(1)).destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user