I created my project in cpp from scratch, and here is the code I used in main.cpp
#include "Leadwerks.h"
#include "GameControl.h"
using namespace Leadwerks;
int main()
{
iVec2 gfxmode = System::GetGraphicsMode(System::CountGraphicsModes() - 1);
gfxmode.x = Math::Min(700, gfxmode.x);
gfxmode.y = Math::Round(gfxmode.x * 9 / 16);
Window* window = Window::Create("CSCDVMP cpp", 600, 600, gfxmode.x, gfxmode.y, Window::Titlebar);
Context* context = Context::Create(window, 0);
World* world = World::Create();
Pivot* gameControl = Pivot::Create();
GameControl* actor = new GameControl(); //this actor has PostRender() which I used to draw image
gameControl->SetActor(actor);
while (true)
{
if (window->Closed() || window->KeyDown(Key::Escape)) return false;
Time::Update();
world->Update();
world->Render();
context->Sync();
}
return 0;
}
In PostRender() function of my actor
Context::GetCurrent()->DrawImage(
myimage,
Window::GetCurrent()->GetWidth() - myimage->GetWidth(),
0,
myimage->GetWidth(),
myimage->GetHeight()
);
as my expectation, myimage will be displayed on the top right corner of screen, but this look like this instead
window size seems to be larger than actual game display. It is ok if I use Window::FullScreen in Window::Create()