Adding blend mode to renderer.
This commit is contained in:
parent
449bf60160
commit
3e341a0cf4
|
|
@ -49,6 +49,12 @@ inline int display_init(void)
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if(!SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND))
|
||||
{
|
||||
error_printf("Failed to set renderer draw blend mode : %s", SDL_GetError());
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if(!SDL_SetDefaultTextureScaleMode(renderer, SDL_SCALEMODE_PIXELART))
|
||||
{
|
||||
error_printf("Failed to set default texture scale mode : %s", SDL_GetError());
|
||||
|
|
@ -70,7 +76,7 @@ inline void display_exit(void)
|
|||
|
||||
inline int display_clear(void)
|
||||
{
|
||||
if(!SDL_SetRenderDrawColor(renderer, C_WHITE))
|
||||
if(!SDL_SetRenderDrawColor(renderer, C_WHITE, 255))
|
||||
{
|
||||
error_printf("Failed to change renderer draw color : %s", SDL_GetError());
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
#include <stdlib.h>
|
||||
#include "asset_manager.h"
|
||||
|
||||
#define C_BLACK 0, 0, 0, 255
|
||||
#define C_RED 255, 0, 0, 255
|
||||
#define C_GREEN 0, 255, 0, 255
|
||||
#define C_BLUE 0, 0, 255, 255
|
||||
#define C_WHITE 255, 255, 255, 255
|
||||
#define C_BLACK 0, 0, 0
|
||||
#define C_RED 255, 0, 0
|
||||
#define C_GREEN 0, 255, 0
|
||||
#define C_BLUE 0, 0, 255
|
||||
#define C_WHITE 255, 255, 255
|
||||
|
||||
#define DISPLAY_WIDTH 396
|
||||
#define DISPLAY_HEIGHT 224
|
||||
|
|
|
|||
Loading…
Reference in New Issue