New bmp fixed it???
This commit is contained in:
parent
b6fb433457
commit
328fd40a55
3 changed files with 5 additions and 4 deletions
|
@ -12,4 +12,5 @@ void main() {
|
|||
if (col.rgb == vec3(1.0, 0.0, 1.0))
|
||||
discard;
|
||||
color = col * colortint;
|
||||
//color = colortint;
|
||||
}
|
||||
|
|
|
@ -24,8 +24,7 @@ int main(int argc, char* argv[]) {
|
|||
Renderer* renderer;
|
||||
Input* input;
|
||||
|
||||
setenv("MESA_DEBUG", "", 0);
|
||||
SDL_LogSetAllPriority(SDL_LOG_PRIORITY_VERBOSE);
|
||||
//setenv("MESA_DEBUG", "", 0);
|
||||
|
||||
Config cfg = Config("dungeon.cfg");
|
||||
cfg.load();
|
||||
|
@ -39,13 +38,14 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
int err = 0;
|
||||
err = SDL_Init(SDL_INIT_TIMER | SDL_INIT_VIDEO);
|
||||
SDL_LogSetAllPriority(SDL_LOG_PRIORITY_DEBUG);
|
||||
if (err != 0) {
|
||||
const char* error = SDL_GetError();
|
||||
SDL_LogCritical(SDL_LOG_CATEGORY_SYSTEM, "%s", error);
|
||||
SDL_Quit();
|
||||
return 1;
|
||||
}
|
||||
SDL_Log("SDL initialized.\n");
|
||||
SDL_LogVerbose(SDL_LOG_CATEGORY_SYSTEM,"SDL initialized.\n");
|
||||
|
||||
renderer = new Renderer();
|
||||
if (!renderer->Init("Dungeon", windowWidth, windowHeight)) {
|
||||
|
|
|
@ -253,7 +253,7 @@ Texture * Renderer::LoadTexture(std::string path) {
|
|||
mode = GL_RGBA;
|
||||
}
|
||||
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
||||
glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
|
||||
glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
|
||||
|
|
Loading…
Reference in a new issue