Advertisement

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

4,373 views
Advertisement
scott8
August 08, 2022 05:31 PM

@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…

13,443 views

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 …

12,333 views
_WeirdCat_
December 12, 2021 03:20 PM

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…

5,520 views
sarahm
December 05, 2021 05:45 PM

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…
10,197 views
Vanda Engine is a free open source game engine for 3D game and realtime interactive 3D

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…

5,869 views

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…

3,279 views

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.

5,489 views

You can use those, but then you have to call ValidateRect manually.

10,273 views
Airbatz
March 05, 2021 10:37 AM

@endurion 

Thanks for pointing that out. It has since been fixed.  ?

8,362 views

I bought a book for Vulkan because the books for DirectX were always by the same author.  I wanted something that might be more open source too.  So thank you for the help but I'm giving up DirectX like the second poster said to.

7,250 views
Airbatz
April 20, 2020 10:39 PM
Win32 - How to merge a pattern brush with a bitmap?

@endurion 

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…

5,826 views
aston2
April 13, 2020 07:27 AM

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!

35,825 views
Airbatz
March 21, 2020 02:12 AM

@Shaarigan 

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…

4,667 views
Airbatz
March 15, 2020 04:40 AM

@rafaelsantana 

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.

18,607 views

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 …

2,572 views

You could create a child window with its own message loop and new thread.

It should work. Maybe easier way to create such renderer is development of DirectX functionality in the raw Windows API, but the parent could still be the MFC type.

4,542 views
Advertisement
Advertisement