first time posting here. hello.
i have run into a strange issue when creating my pixel graphics engine,
for some strange reason I'm getting a Segmentation fault when i comment out drawFilledRect, and try to draw a character.
but when its not commented out it works? what.
image of what i should be getting: renderer
i don't know if i am explaining this correctly since i don't even know why this is happening.
i have run into a strange issue when creating my pixel graphics engine,
for some strange reason I'm getting a Segmentation fault when i comment out drawFilledRect, and try to draw a character.
C:
//Gives me a Segmentation fault (core dumped)
void draw()
{
Color green = {0,255,0};
Color blue = {0,0,255};
Color red = {255,0,0};
Color something = {40,10,30};
Vector2 pos = {0,0};
Vector2 dim = {25,25};
//drawFilledRect(pos, dim, red);
drawCharacter(65,20,0,green);
}
but when its not commented out it works? what.
Code:
void draw()
{
Color green = {0,255,0};
Color blue = {0,0,255};
Color red = {255,0,0};
Color something = {40,10,30};
Vector2 pos = {0,0};
Vector2 dim = {25,25};
drawFilledRect(pos, dim, red);
drawCharacter(65,20,0,green);
}
image of what i should be getting: renderer
i don't know if i am explaining this correctly since i don't even know why this is happening.