i joined HMH (pre order) a few days ago.... coming from android/libgdx... going a step further...
i have one problem: it seems like there are no textures displayed in my builds..what i have done:
- i tried various code-bases,
- i copied the assets in "data" (test, test2, test3, intro_art.hha, test.out)
- i packed the textures (after i built test_asset_builder.exe), evrything looks good
compiling works whithout errors, but there are no textures and if i take day-242 i only see a black-fullscreen
would be great if someone could point me in the right direction!?
If you rewind back to a day before hardware rendering, does it work then? Just wondering if you are having OpenGL problems or if you're having art pipeline problems...
To search the forums, use the link under "Your Account" on the right side of the screen.
I also get black screen with latest source (Windows 10 x64, Nvidia GTX 970, latest drivers).
Not sure exactly what is wrong. Pixel format is set successfully. Context created fine. And I verified that no OpenGL call generates error. Also tried turning sRGB off, didn't help.
What helped is to enable double buffering. If I set HANDMADE_STREAMING to 0, or add PFD_DOUBLEBUFFER flag to DesiredPixelFormat.dwFlags in line 476, then I get expected output with textures.
Not sure yet why screen is black without double buffering.
I don't know for sure, but it is probably very uncommon not to specify that flag... I have never made anything with OpenGL that didn't specify that flag. The only reason we aren't specifying it at the moment is because of the streaming issue. So I do wonder if there are (lots of?) drivers out there that don't cope well without that flag being specified?
When I put glFinish() just before SwapBuffers, then I get everything displayed correctly. Magic... SwapBuffers is optional at this point because of single buffering, but it's needed there for vsync.
I cannot get any textures from hha-files to display. I am running win32_handmade.exe from the same directory as intro_art.hha, but only rectangles are drawn.
If it is before day 324 then this can sometimes happen because of driver issues with multiple GL contexts. It was happening also on stream multiple times. Just closing & running application again helps.
Otherwise you probably are in wrong directory? How are you running exe from data folder?
It is day 335. I am running it through the command line within handmade\data with ..\..\build\win32_handmade.exe.
I have also tried to put intro_art.hha directly into \build and running from there.
Hmm, not sure what can be wrong...
Could you try doing following things?
1) Put a breakpoint in AllocateGameAssets function after call to GetAllFilesOfTypeBegin and check that it finds multiple hha files (FileGroup.FileCount is > 1)
2) Put a breakpoint in LoadAssetWorkDirectly function on FinalizeAsset_Bitmap case and check for multiple bitmaps that Bitmap structure is loaded and has reasonable values for width and height members.