Intel HD 3000 on Windows 10 64 Bit.
I have a 3D Model (object) with an JPEG as Texture. I want to colorize the texture and make a new object or instance with a colored texture on it.
I was using:
renimg = CreateRenderImage(1024,1024,0,0 ) // this would be black
And my WindowSize of the App is 1280 x 720
Virtual Screen Size is 1920 x 1080
I draw a box on the RenderTarget
DrawBox(0,0,GetImageWidth(renimg),GetImageHeight(renimg),MakeColor(255,255,255),MakeColor(255,255,255),MakeColor(255,255,255),MakeColor(255,255,255),1)
and I put this image on the 3D-Object, but it had black holes. I thought it would be easy, to colorchange or manipulate a texture.
With DrawSprite, CreateSprite(img) and LoadSprite etc.
The problem was, that the RenderThings will not depend on the RenderTarget-Image-Size, but on the ScreenResulution. Maybe this is only a problem with IntelHD 3000.
But I also don't want to write all 2D-Drawing functions for MemBlocks new.
When my RenderTarget is bigger than my screen-resolution, some space of the rendertarget-image will be black. How would I be able to generate an image for print?
In the help-page for CreateRenderImage is no advice for this issue, so it toke me about half this day, to figure this problem out.
Also "SetResolutionMode( 0)" does not effect the Windows 10 program. How can I get nativ 720p but scaled to 1080p? The performance will shrink in full resulution.
Okay, I read again "SetRenderToImage"-help.
It only seems to work if:
Window-Size, VirtualResolution and CreateRenderImage are the exact same size. 128 x 128, 256 x 256, 512 x 512, 1024 x 1024
But this is not, what I want. The problem here is, that I have to switch also the native resolution for getting it to work.
I testet:
Window-Size 512x512, Virtual-Resolution 256x256, RenderTarget 1024x1024 and it worked, but if RenderTarget and VirtualResolution not the same, keep in mind, to scale the Sprite before using DrawSprite()
Maybe this is also the problem when I am using 1280 x 720 as Window Size and my Virtual Resolution is not the same, that I have to Scale something, but I thought, that DrawBox would draw from 0 ... to ImageWidth, but maybe I have to not think of it like another image in memory, but a second screen,
where all is the same like my Window-Resolution. So I have maybe to scale also the Sprite, if it is 1024 x 1024, by xScale = 1.25 and yScale = 0.703125
Solution:
The Virtual Resolution has to be not bigger than the "Real"-Resolution. Maybe that was my mistake.