void RenderManagerGL2D::init(int xResolution, int yResolution, bool fullscreen) { glDisable(GL_DEPTH_TEST); mCurrentFlags.insert(GL_MULTISAMPLE); SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); // Set modesetting Uint32 screenFlags = SDL_WINDOW_OPENGL; if (fullscreen) screenFlags |= SDL_WINDOW_FULLSCREEN; // Create window mWindow = SDL_CreateWindow(AppTitle, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, xResolution, yResolution, screenFlags); // Set icon SDL_Surface* icon = loadSurface("Icon.bmp"); SDL_SetColorKey(icon, SDL_TRUE, SDL_MapRGB(icon->format, 0, 0, 0)); SDL_SetWindowIcon(mWindow, icon); SDL_FreeSurface(icon); // Create gl context mGlContext = SDL_GL_CreateContext(mWindow); SDL_ShowCursor(0); glDisable(GL_MULTISAMPLE); mLeftBlobColor = Color(255, 0, 0); mRightBlobColor = Color(0, 255, 0); glEnable(GL_TEXTURE_2D); // Load background SDL_Surface* bgSurface = loadSurface("backgrounds/strand2.bmp"); BufferedImage* bgBufImage = new BufferedImage; bgBufImage->w = getNextPOT(bgSurface->w); bgBufImage->h = getNextPOT(bgSurface->h); bgBufImage->glHandle = loadTexture(bgSurface, false); mBackground = bgBufImage->glHandle; mImageMap["background"] = bgBufImage; mBallShadow = loadTexture(loadSurface("gfx/schball.bmp"), false); for (int i = 1; i <= 16; ++i) { char filename[64]; sprintf(filename, "gfx/ball%02d.bmp", i); GLuint ballImage = loadTexture(loadSurface(filename), false); mBall.push_back(ballImage); } for (int i = 1; i <= 5; ++i) { char filename[64]; sprintf(filename, "gfx/blobbym%d.bmp", i); GLuint blobImage = loadTexture(loadSurface(filename), false); mBlob.push_back(blobImage); sprintf(filename, "gfx/blobbym%d.bmp", i); GLuint blobSpecular = loadTexture(loadSurface(filename), true); mBlobSpecular.push_back(blobSpecular); sprintf(filename, "gfx/sch1%d.bmp", i); GLuint blobShadow = loadTexture(loadSurface(filename), false); mBlobShadow.push_back(blobShadow); } // create text base textures SDL_Surface* textbase = createEmptySurface(2048, 32); SDL_Surface* hltextbase = createEmptySurface(2048, 32); int x = 0; int sx = 0; for (int i = 0; i <= 54; ++i) { char filename[64]; sprintf(filename, "gfx/font%02d.bmp", i); SDL_Surface* fontSurface = loadSurface(filename); SDL_Surface* highlight = highlightSurface(fontSurface, 60); SDL_Rect r = {(Uint16)x, 0, (Uint16)fontSurface->w, (Uint16)fontSurface->h}; SDL_BlitSurface(fontSurface, 0, textbase, &r); SDL_BlitSurface(highlight, 0, hltextbase, &r); r.x = sx; r.y = 0; Texture s = Texture(0, x, 0, fontSurface->w, fontSurface->h, 2048, 32); mFont.push_back(s); mHighlightFont.push_back(s); x += fontSurface->w; SDL_FreeSurface(fontSurface); } GLuint texture = loadTexture(textbase, false); GLuint hltexture = loadTexture(hltextbase, false); for (unsigned int i = 0; i < mFont.size(); ++i) { mFont[i].texture = texture; mHighlightFont[i].texture = hltexture; } mParticle = loadTexture(loadSurface("gfx/blood.bmp"), false); glViewport(0, 0, xResolution, yResolution); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0, 800, 600, 0, -1.0, 1.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glEnable(GL_TEXTURE_2D); glAlphaFunc(GL_GREATER, 0.5); glEnable(GL_ALPHA_TEST); }
void RenderManagerGP2X::init(int xResolution, int yResolution, bool fullscreen) { Uint32 screenFlags = SDL_HWSURFACE | SDL_HWACCEL | SDL_DOUBLEBUF; // screenFlags |= SDL_FULLSCREEN; mScreen = SDL_SetVideoMode(320, 240, 0, screenFlags); SDL_ShowCursor(0); SDL_Surface* tempBackground = loadSurface("backgrounds/strand2.bmp"); mBackground = SDL_DisplayFormat(tempBackground); SDL_FreeSurface(tempBackground); for (int i = 1; i <= 16; ++i) { char filename[64]; sprintf(filename, "gf2x/ball%02d.bmp", i); SDL_Surface* ballImage = loadSurface(filename); SDL_SetColorKey(ballImage, SDL_SRCCOLORKEY, SDL_MapRGB(ballImage->format, 0, 0, 0)); SDL_Surface *convertedBallImage = SDL_DisplayFormat(ballImage); SDL_FreeSurface(ballImage); mBall.push_back(convertedBallImage); } SDL_Surface *tempBallShadow = loadSurface("gf2x/schball.bmp"); SDL_SetColorKey(tempBallShadow, SDL_SRCCOLORKEY, SDL_MapRGB(tempBallShadow->format, 0, 0, 0)); SDL_SetAlpha(tempBallShadow, SDL_SRCALPHA, 127); mBallShadow = SDL_DisplayFormat(tempBallShadow); SDL_FreeSurface(tempBallShadow); for (int i = 1; i <= 5; ++i) { char filename[64]; sprintf(filename, "gf2x/blobbym%d.bmp", i); SDL_Surface* blobImage = loadSurface(filename); mStandardBlob.push_back(blobImage); mLeftBlob.push_back(colorSurface(blobImage, Color(255, 0, 0))); mRightBlob.push_back(colorSurface(blobImage, Color(0, 255, 0))); sprintf(filename, "gf2x/sch1%d.bmp", i); SDL_Surface* blobShadow = loadSurface(filename); SDL_SetColorKey(blobShadow, SDL_SRCCOLORKEY, SDL_MapRGB(blobShadow->format, 0, 0, 0)); SDL_SetAlpha(blobShadow, SDL_SRCALPHA, 127); mStandardBlobShadow.push_back(blobShadow); mLeftBlobShadow.push_back( colorSurface(blobShadow, Color(255, 0, 0))); mRightBlobShadow.push_back( colorSurface(blobShadow, Color(0, 255, 0))); } for (int i = 0; i <= 54; ++i) { char filename[64], filename2[64]; sprintf(filename, "gf2x/font%02d.bmp", i); sprintf(filename2, "gf2x/font_small/font%02d.bmp", i); SDL_Surface *tempFont = loadSurface(filename); SDL_Surface *tempFont2 = loadSurface(filename2); SDL_SetColorKey(tempFont, SDL_SRCCOLORKEY, SDL_MapRGB(tempFont->format, 0, 0, 0)); SDL_SetColorKey(tempFont2, SDL_SRCCOLORKEY, SDL_MapRGB(tempFont2->format, 0, 0, 0)); SDL_Surface *newFont = SDL_DisplayFormat(tempFont); SDL_Surface *newFont2 = SDL_DisplayFormat(tempFont2); SDL_FreeSurface(tempFont); SDL_FreeSurface(tempFont2); mFont.push_back(newFont); mHighlightFont.push_back(highlightSurface(newFont, 60)); mSmallFont.push_back(newFont2); mHighlightSmallFont.push_back(highlightSurface(newFont2, 60)); } }
void RenderManagerGL2D::init(int xResolution, int yResolution, bool fullscreen) { mCurrentFlags.insert(GL_DEPTH_TEST); mCurrentFlags.insert(GL_MULTISAMPLE); SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); Uint32 screenFlags = SDL_OPENGL; if (fullscreen) screenFlags |= SDL_FULLSCREEN; SDL_WM_SetCaption(AppTitle, ""); SDL_WM_SetIcon(SDL_LoadBMP("data/Icon.bmp"), NULL); SDL_SetVideoMode(xResolution, yResolution, 0, screenFlags); SDL_ShowCursor(0); glDisable(GL_MULTISAMPLE); mLeftBlobColor = Color(255, 0, 0); mRightBlobColor = Color(0, 255, 0); SDL_Surface* bgSurface = loadSurface("backgrounds/strand2.bmp"); BufferedImage* bgBufImage = new BufferedImage; bgBufImage->w = getNextPOT(bgSurface->w); bgBufImage->h = getNextPOT(bgSurface->h); bgBufImage->glHandle = loadTexture(bgSurface, false); mBackground = bgBufImage->glHandle; mImageMap["background"] = bgBufImage; mBallShadow = loadTexture(loadSurface("gfx/schball.bmp"), false); mScroll = loadTexture(loadSurface("gfx/scrollbar.bmp"), false); for (int i = 1; i <= 16; ++i) { char filename[64]; sprintf(filename, "gfx/ball%02d.bmp", i); GLuint ballImage = loadTexture(loadSurface(filename), false); mBall.push_back(ballImage); } for (int i = 1; i <= 5; ++i) { char filename[64]; sprintf(filename, "gfx/blobbym%d.bmp", i); GLuint blobImage = loadTexture(loadSurface(filename), false); mBlob.push_back(blobImage); sprintf(filename, "gfx/blobbym%d.bmp", i); GLuint blobSpecular = loadTexture(loadSurface(filename), true); mBlobSpecular.push_back(blobSpecular); sprintf(filename, "gfx/sch1%d.bmp", i); GLuint blobShadow = loadTexture(loadSurface(filename), false); mBlobShadow.push_back(blobShadow); } // create text base textures SDL_Surface* textbase = createEmptySurface(2048, 32); SDL_Surface* hltextbase = createEmptySurface(2048, 32); SDL_Surface* smalltextbase = createEmptySurface(1024, 16); SDL_Surface* hlsmalltextbase = createEmptySurface(1024, 16); int x = 0; int sx = 0; for (int i = 0; i <= 53; ++i) { char filename[64], filename2[64]; sprintf(filename, "gfx/font%02d.bmp", i); sprintf(filename2, "gfx/font_small/font%02d.bmp", i); SDL_Surface* fontSurface = loadSurface(filename); SDL_Surface* fontSurface2 = loadSurface(filename2); GLuint newFont = loadTexture(loadSurface(filename), false); GLuint newFont2 = loadTexture(loadSurface(filename2), false); SDL_Surface* highlight = highlightSurface(fontSurface, 60); SDL_Surface* highlight2 = highlightSurface(fontSurface2, 60); SDL_FreeSurface(fontSurface); SDL_FreeSurface(fontSurface2); fontSurface = loadSurface(filename); fontSurface2 = loadSurface(filename2); SDL_Rect r = {x, 0, fontSurface->w, fontSurface->h}; SDL_BlitSurface(fontSurface, 0, textbase, &r); SDL_BlitSurface(highlight, 0, hltextbase, &r); r = {sx, 0, fontSurface2->w, fontSurface2->h}; SDL_BlitSurface(fontSurface2, 0, smalltextbase, &r); SDL_BlitSurface(highlight2, 0, hlsmalltextbase, &r); //GLuint ballImage = loadTexture(sf, false); //mBall.push_back(ballImage); Texture s = Texture(0, x, 0, fontSurface->w, fontSurface->h, 2048, 32); mFont.push_back(s); mHighlightFont.push_back(s); s = Texture(0, sx, 0, fontSurface2->w, fontSurface2->h, 1024, 16); //mFont.push_back(newFont); //mHighlightFont.push_back(loadTexture(highlight, false)); mSmallFont.push_back( s ); mHighlightSmallFont.push_back( s ); x += fontSurface->w; sx += fontSurface2->w; SDL_FreeSurface(fontSurface); SDL_FreeSurface(fontSurface2); } GLuint texture = loadTexture(textbase, false); GLuint hltexture = loadTexture(hltextbase, false); GLuint smalltexture = loadTexture(smalltextbase, false); GLuint hlsmalltexture = loadTexture(hlsmalltextbase, false); for (int i = 0; i < mFont.size(); ++i) { mFont[i].texture = texture; mHighlightFont[i].texture = hltexture; mSmallFont[i].texture = smalltexture; mHighlightSmallFont[i].texture = hlsmalltexture; } mParticle = loadTexture(loadSurface("gfx/blood.bmp"), false); glViewport(0, 0, xResolution, yResolution); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0, 800, 600, 0, -1.0, 1.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glClearDepth(1.0); glDepthFunc(GL_LEQUAL); glDisable(GL_DEPTH_TEST); glEnable(GL_TEXTURE_2D); glAlphaFunc(GL_GREATER, 0.5); glEnable(GL_ALPHA_TEST); }
void RenderManagerSDL::init(int xResolution, int yResolution, bool fullscreen) { SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1"); // Set modesetting Uint32 screenFlags = 0; if (fullscreen) { screenFlags |= SDL_WINDOW_FULLSCREEN; } else { screenFlags |= SDL_WINDOW_RESIZABLE; } // Create window mWindow = SDL_CreateWindow(AppTitle, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, xResolution, yResolution, screenFlags); // Set icon #if !defined(MAC_OS_X) SDL_Surface* icon = loadSurface("Icon.bmp"); SDL_SetColorKey(icon, SDL_TRUE, SDL_MapRGB(icon->format, 0, 0, 0)); SDL_SetWindowIcon(mWindow, icon); SDL_FreeSurface(icon); #endif // Create renderer to draw in window mRenderer = SDL_CreateRenderer(mWindow, -1, 0); // Hide mousecursor SDL_ShowCursor(0); // Create rendertarget to make window resizeable mRenderTarget = SDL_CreateTexture(mRenderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, xResolution, yResolution); // Load all textures and surfaces to render the game SDL_Surface* tmpSurface; // Create a 1x1 black surface which will be scaled to draw an overlay tmpSurface = SDL_CreateRGBSurface(0, 1, 1, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000); // Because of SDL bug we can't check at the moment if color mod is available... no risk no fun ;) SDL_FillRect(tmpSurface, NULL, SDL_MapRGB(tmpSurface->format, 255, 255, 255)); mOverlayTexture = SDL_CreateTextureFromSurface(mRenderer, tmpSurface); SDL_FreeSurface(tmpSurface); // Create marker texture for mouse and ball tmpSurface = SDL_CreateRGBSurface(0, 5, 5, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000); SDL_FillRect(tmpSurface, NULL, SDL_MapRGB(tmpSurface->format, 255, 255, 255)); mMarker[0] = SDL_CreateTextureFromSurface(mRenderer, tmpSurface); SDL_FillRect(tmpSurface, NULL, SDL_MapRGB(tmpSurface->format, 0, 0, 0)); mMarker[1] = SDL_CreateTextureFromSurface(mRenderer, tmpSurface); SDL_FreeSurface(tmpSurface); // Load background tmpSurface = loadSurface("backgrounds/strand2.bmp"); mBackground = SDL_CreateTextureFromSurface(mRenderer, tmpSurface); BufferedImage* bgImage = new BufferedImage; bgImage->w = tmpSurface->w; bgImage->h = tmpSurface->h; bgImage->sdlImage = mBackground; SDL_FreeSurface(tmpSurface); mImageMap["background"] = bgImage; // Load ball for (int i = 1; i <= 16; ++i) { char filename[64]; sprintf(filename, "gfx/ball%02d.bmp", i); tmpSurface = loadSurface(filename); SDL_SetColorKey(tmpSurface, SDL_TRUE, SDL_MapRGB(tmpSurface->format, 0, 0, 0)); SDL_Texture *ballTexture = SDL_CreateTextureFromSurface(mRenderer, tmpSurface); SDL_FreeSurface(tmpSurface); mBall.push_back(ballTexture); } // Load ball shadow tmpSurface = loadSurface("gfx/schball.bmp"); SDL_SetColorKey(tmpSurface, SDL_TRUE, SDL_MapRGB(tmpSurface->format, 0, 0, 0)); SDL_SetSurfaceAlphaMod(tmpSurface, 127); mBallShadow = SDL_CreateTextureFromSurface(mRenderer, tmpSurface); SDL_FreeSurface(tmpSurface); // Load blobby and shadows surface // Load streamed textures for coloring for (int i = 1; i <= 5; ++i) { // Load blobby surface char filename[64]; sprintf(filename, "gfx/blobbym%d.bmp", i); SDL_Surface* blobImage = loadSurface(filename); SDL_Surface* formatedBlobImage = SDL_ConvertSurfaceFormat(blobImage, SDL_PIXELFORMAT_ABGR8888, 0); SDL_FreeSurface(blobImage); SDL_SetColorKey(formatedBlobImage, SDL_TRUE, SDL_MapRGB(formatedBlobImage->format, 0, 0, 0)); for(int j = 0; j < formatedBlobImage->w * formatedBlobImage->h; j++) { SDL_Color* pixel = &(((SDL_Color*)formatedBlobImage->pixels)[j]); if (!(pixel->r | pixel->g | pixel->b)) { pixel->a = 0; } } mStandardBlob.push_back(formatedBlobImage); // Load blobby shadow surface sprintf(filename, "gfx/sch1%d.bmp", i); SDL_Surface* blobShadow = loadSurface(filename); SDL_Surface* formatedBlobShadowImage = SDL_ConvertSurfaceFormat(blobShadow, SDL_PIXELFORMAT_ABGR8888, 0); SDL_FreeSurface(blobShadow); SDL_SetSurfaceAlphaMod(formatedBlobShadowImage, 127); SDL_SetColorKey(formatedBlobShadowImage, SDL_TRUE, SDL_MapRGB(formatedBlobShadowImage->format, 0, 0, 0)); for(int j = 0; j < formatedBlobShadowImage->w * formatedBlobShadowImage->h; j++) { SDL_Color* pixel = &(((SDL_Color*)formatedBlobShadowImage->pixels)[j]); if (!(pixel->r | pixel->g | pixel->b)) { pixel->a = 0; } else { pixel->a = 127; } } mStandardBlobShadow.push_back(formatedBlobShadowImage); // Prepare blobby textures SDL_Texture* leftBlobTex = SDL_CreateTexture(mRenderer, SDL_PIXELFORMAT_ABGR8888, SDL_TEXTUREACCESS_STREAMING, formatedBlobImage->w, formatedBlobImage->h); SDL_SetTextureBlendMode(leftBlobTex, SDL_BLENDMODE_BLEND); SDL_UpdateTexture(leftBlobTex, NULL, formatedBlobImage->pixels, formatedBlobImage->pitch); mLeftBlob.push_back(DynamicColoredTexture( leftBlobTex, Color(255, 255, 255))); SDL_Texture* rightBlobTex = SDL_CreateTexture(mRenderer, SDL_PIXELFORMAT_ABGR8888, SDL_TEXTUREACCESS_STREAMING, formatedBlobImage->w, formatedBlobImage->h); SDL_SetTextureBlendMode(rightBlobTex, SDL_BLENDMODE_BLEND); SDL_UpdateTexture(rightBlobTex, NULL, formatedBlobImage->pixels, formatedBlobImage->pitch); mRightBlob.push_back(DynamicColoredTexture( rightBlobTex, Color(255, 255, 255))); // Prepare blobby shadow textures SDL_Texture* leftBlobShadowTex = SDL_CreateTexture(mRenderer, SDL_PIXELFORMAT_ABGR8888, SDL_TEXTUREACCESS_STREAMING, formatedBlobShadowImage->w, formatedBlobShadowImage->h); SDL_SetTextureBlendMode(leftBlobShadowTex, SDL_BLENDMODE_BLEND); mLeftBlobShadow.push_back(DynamicColoredTexture( leftBlobShadowTex, Color(255, 255, 255))); SDL_UpdateTexture(leftBlobShadowTex, NULL, formatedBlobShadowImage->pixels, formatedBlobShadowImage->pitch); SDL_Texture* rightBlobShadowTex = SDL_CreateTexture(mRenderer, SDL_PIXELFORMAT_ABGR8888, SDL_TEXTUREACCESS_STREAMING, formatedBlobShadowImage->w, formatedBlobShadowImage->h); SDL_SetTextureBlendMode(rightBlobShadowTex, SDL_BLENDMODE_BLEND); mRightBlobShadow.push_back(DynamicColoredTexture( rightBlobShadowTex, Color(255, 255, 255))); SDL_UpdateTexture(rightBlobShadowTex, NULL, formatedBlobShadowImage->pixels, formatedBlobShadowImage->pitch); // Load iOS specific icon (because we have no backbutton) #ifdef __APPLE__ #if !MAC_OS_X tmpSurface = loadSurface("gfx/flag.bmp"); SDL_SetColorKey(tmpSurface, SDL_TRUE, SDL_MapRGB(tmpSurface->format, 0, 0, 0)); mBackFlag = SDL_CreateTextureFromSurface(mRenderer, tmpSurface); SDL_FreeSurface(tmpSurface); #endif #endif } // Load font for (int i = 0; i <= 54; ++i) { char filename[64]; sprintf(filename, "gfx/font%02d.bmp", i); SDL_Surface* tempFont = loadSurface(filename); SDL_SetColorKey(tempFont, SDL_TRUE, SDL_MapRGB(tempFont->format, 0, 0, 0)); mFont.push_back(SDL_CreateTextureFromSurface(mRenderer, tempFont)); SDL_Surface* tempFont2 = highlightSurface(tempFont, 60); mHighlightFont.push_back(SDL_CreateTextureFromSurface(mRenderer, tempFont2)); SDL_FreeSurface(tempFont); SDL_FreeSurface(tempFont2); } // Load blood surface SDL_Surface* blobStandardBlood = loadSurface("gfx/blood.bmp"); SDL_Surface* formatedBlobStandardBlood = SDL_ConvertSurfaceFormat(blobStandardBlood, SDL_PIXELFORMAT_ABGR8888, 0); SDL_FreeSurface(blobStandardBlood); SDL_SetColorKey(formatedBlobStandardBlood, SDL_TRUE, SDL_MapRGB(formatedBlobStandardBlood->format, 0, 0, 0)); for(int j = 0; j < formatedBlobStandardBlood->w * formatedBlobStandardBlood->h; j++) { SDL_Color* pixel = &(((SDL_Color*)formatedBlobStandardBlood->pixels)[j]); if (!(pixel->r | pixel->g | pixel->b)) { pixel->a = 0; } else { pixel->a = 255; } } mStandardBlobBlood = formatedBlobStandardBlood; // Create streamed textures for blood SDL_Texture* leftBlobBlood = SDL_CreateTexture(mRenderer, SDL_PIXELFORMAT_ABGR8888, SDL_TEXTUREACCESS_STREAMING, formatedBlobStandardBlood->w, formatedBlobStandardBlood->h); SDL_SetTextureBlendMode(leftBlobBlood, SDL_BLENDMODE_BLEND); mLeftBlobBlood = DynamicColoredTexture( leftBlobBlood, Color(255, 0, 0)); SDL_UpdateTexture(leftBlobBlood, NULL, formatedBlobStandardBlood->pixels, formatedBlobStandardBlood->pitch); SDL_Texture* rightBlobBlood = SDL_CreateTexture(mRenderer, SDL_PIXELFORMAT_ABGR8888, SDL_TEXTUREACCESS_STREAMING, formatedBlobStandardBlood->w, formatedBlobStandardBlood->h); SDL_SetTextureBlendMode(rightBlobBlood, SDL_BLENDMODE_BLEND); mRightBlobBlood = DynamicColoredTexture( rightBlobBlood, Color(255, 0, 0)); SDL_UpdateTexture(rightBlobBlood, NULL, formatedBlobStandardBlood->pixels, formatedBlobStandardBlood->pitch); SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1"); }