🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Latest win32 Activity
You need to render your game viewport into a texture.
See https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples#rendering-your-game-scene-into-a-texture
@foxo You need to create a bitmap and temporary device context (DC) that's compatible with your window. You can get a pointer to the bitmap pixels using GetDIBits. All drawing should be done using the pointer. You then copy the pointer back to the bitmap/dc using SetDIBits. Last step is to blit the…
foxo said:
I also realised that gpu drivers and extremely low level gpu programming are some kind a ‘secret’ knoladge that nobody know how to do except the elit at vulkan and other specialised company that won't tell us there ‘secrets’. that's why I am asking : How to draw from gpu to the screen or …
not sure what do you mean get around, but if it happens that it is repeating event when you don't want that i suggest you make your own keyboard handler where you store pressed keys in a list
if key is pressed run void AddKey( key )
if there is a repeat and the key is already marked as pressed you do…
The way I register for raw input is
RAWINPUTDEVICE Rid[2];
// //rawinputdevice for mouse
Rid[0].usUsagePage = 0x01;
Rid[0].usUsage = 0x02;
Rid[0].dwFlags = RIDEV_NOLEGACY;
Rid[0].hwndTarget = 0;
//
// //rawinputdevice for keyboard
Rid[1].usUsagePage = 0x01;
Rid[1].usUsage…
When I started game engine development, many thought it was impossible for one person to build a game engine. But I proved that I could build a game engine with an old computer without a budget. Of course, there is still a lot of work to be done.
Vanda Engine is a free and open source game engine fo…
Doing some performance optimizations of our drawing framework, I had the need to speed putting pixels on the screen up a little. Our Windows window was stuttering on heavy resizing (something no-one would do on a day to day basis but users are strange) and had some impacts when switching between ma…
It is defined at the bottom of the code, and is called from WM_PAINT. This function blits the double buffer to the screen. The program fades a bitmap in and out using a loop. I'm reading a little more and found that 256 color bitmaps require an RGBQUAD struct to be initialized with a palette.
You can use those, but then you have to call ValidateRect manually.
I have tried XORing the flags and get different results. Probably a case of undefined behaviour? None of the docs really talk about XORing two modes together. Anyway, I finally understand how this effect is done, and it's pretty simple. I switched out one graphic for another, ran the…
Thanks Airbatz…
Ok i will try first to translate this program in Oxygen Basic ,and if there work then should work in C too..i hope!
I have taken a look at the links but it will take a while before I can make much sense of it as a whole. Currently I'm just modifying the program step by step to see how it affects the performance. Visibly nothing is different. Thanks for your input, I will read up on WM_PAINT…
It occured to me that that might be a problem if there are more graphical effects happening at once. I'm slowly improving the program little by little.
EDIT: sorry for double-post.
Hello,
My window code always seems to have a cyclic event issue which requires hacks to keep a consistent sync with Window and GraphicsDevice. Essentially when the user resizing (drags) the window you generate an event, then process it in the queue (Syphoned like SFML in my case). In one solution I …