Simplified example and resources sizes
|
@ -114,23 +114,23 @@ int main(void)
|
||||||
// Draw framebuffer texture (Ahrs Display)
|
// Draw framebuffer texture (Ahrs Display)
|
||||||
int centerX = framebuffer.texture.width/2;
|
int centerX = framebuffer.texture.width/2;
|
||||||
int centerY = framebuffer.texture.height/2;
|
int centerY = framebuffer.texture.height/2;
|
||||||
float scaleFactor = 0.5f;
|
|
||||||
|
|
||||||
BeginTextureMode(framebuffer);
|
BeginTextureMode(framebuffer);
|
||||||
|
|
||||||
|
ClearBackground(RAYWHITE);
|
||||||
BeginBlendMode(BLEND_ALPHA);
|
BeginBlendMode(BLEND_ALPHA);
|
||||||
|
|
||||||
DrawTexturePro(texBackground, (Rectangle){ 0, 0, texBackground.width, texBackground.height },
|
DrawTexturePro(texBackground, (Rectangle){ 0, 0, texBackground.width, texBackground.height },
|
||||||
(Rectangle){ centerX, centerY, texBackground.width*scaleFactor, texBackground.height*scaleFactor},
|
(Rectangle){ centerX, centerY, texBackground.width, texBackground.height},
|
||||||
(Vector2){ texBackground.width/2*scaleFactor, texBackground.height/2*scaleFactor + pitchOffset*scaleFactor }, roll, WHITE);
|
(Vector2){ texBackground.width/2, texBackground.height/2 + pitchOffset }, roll, WHITE);
|
||||||
|
|
||||||
DrawTexturePro(texPitch, (Rectangle){ 0, 0, texPitch.width, texPitch.height },
|
DrawTexturePro(texPitch, (Rectangle){ 0, 0, texPitch.width, texPitch.height },
|
||||||
(Rectangle){ centerX, centerY, texPitch.width*scaleFactor, texPitch.height*scaleFactor },
|
(Rectangle){ centerX, centerY, texPitch.width, texPitch.height },
|
||||||
(Vector2){ texPitch.width/2*scaleFactor, texPitch.height/2*scaleFactor + pitchOffset*scaleFactor }, roll, WHITE);
|
(Vector2){ texPitch.width/2, texPitch.height/2 + pitchOffset }, roll, WHITE);
|
||||||
|
|
||||||
DrawTexturePro(texPlane, (Rectangle){ 0, 0, texPlane.width, texPlane.height },
|
DrawTexturePro(texPlane, (Rectangle){ 0, 0, texPlane.width, texPlane.height },
|
||||||
(Rectangle){ centerX, centerY, texPlane.width*scaleFactor, texPlane.height*scaleFactor },
|
(Rectangle){ centerX, centerY, texPlane.width, texPlane.height },
|
||||||
(Vector2){ texPlane.width/2*scaleFactor, texPlane.height/2*scaleFactor }, 0, WHITE);
|
(Vector2){ texPlane.width/2, texPlane.height/2 }, 0, WHITE);
|
||||||
|
|
||||||
EndBlendMode();
|
EndBlendMode();
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 295 KiB After Width: | Height: | Size: 295 KiB |