Questions tagged [winapi]

The tag has no usage guidance.

0
votes
0answers
20 views

How can I handle mouse input and cursor in a WinAPI window?

Hello I'm studying game engine programming, but I got stuck with mouse input. As for now I have only WinAPI window, which has a message pump and processing. For the mouse I used RAWINPUT, but there ...
0
votes
0answers
20 views

How to handle mouse to look around (Win API)?

I've made a command prompt game engine. It handles input using Windows Messages, but now I came up with idea of adding mouse input. Currently I wrote a 3D maze game and I'd like to make mouse look ...
1
vote
1answer
85 views

creating a process to run in c++ // i need to run a process in c++ [closed]

Hey I don't know why that when I compile this code that the fear.exe process is not running I am using visual studio for my coding ide choice the project is a win32 project // application method, that ...
1
vote
1answer
680 views

WinAPi OpenGL Borderless Fullscreen - Alt Tab problems

I'm implementing a borderless fullscreen functionality and managed to make something that almost works. Using: C++, Winapi, OpenGL 3.3. When in fullscreen borderless mode, if alt tab the game window ...
1
vote
0answers
92 views

How does one achieve a 'shimmering' effect similiar to the ones from the Pokemon games? [duplicate]

I have an assignment to make a game in C++ using Winapi. As such I've decided to recreate pieces of the Pokemon games. I'm pretty well underway with the project, but there's one effect I would like to ...
1
vote
1answer
657 views

How OpenGL works with Windows GDI in order to produce output image on computer screen?

I am curious how GDI integrates with OpengGL in order to create image for computer screen. I know that GDI provide Device Context which describes window properties and as far as I know it also offer ...
0
votes
3answers
187 views

Console (CMD like) in a DirectX application

I really need a console for the game i'm making. I am programming a first person camera right now and i want to see what is going on with the variables (to be more specific i need to know if i'm ...
2
votes
1answer
2k views

PlaySound() Lags opengl c++

I am new to OpenGL. I am making a game similar to this, shown in image below. The problem is when I detect collision, i.e cannon ball and ship collide, I play a sound using ...
2
votes
1answer
596 views

Monitor external window events with SDL2

I'm trying to render my game (SDL2, C++) in a Windows Form application (C#) using C++/CLI to interface with my underlying C++ code. The purpose of the form is to create an editor which can monitor/...
4
votes
1answer
401 views

Float-based screen coordinates, higher mouse precision

I wrote 2 weeks ago about problem with motion blur in my engine. When camera moves using keyboard, motion blur is smooth. But when I rotate camera using mouse motion blur is stepping (not sure if I ...
2
votes
3answers
7k views

how to detect same keyboard key press only once

I am designing a keyboard class that can detect the keyboard key press only one time but I still cannot figure out the way to do it. My goal is just check and perform the action only once when the ...
-3
votes
1answer
922 views

Is Microsoft killing OpenGL? [closed]

In an article I've read that Microsoft signed GDI/GDI+ as deprecated. I was a bit frightened, I won't be able to use OpenGL in future versions of Windows. Since you need GDI ( more likely the Device ...
1
vote
2answers
2k views

Exclusive mouse movement with WM_INPUT

Microsoft seems to recommend using WM_INPUT for input. I want to only get relative mouse input and hide the mouse cursor all together for a short while (For gesture ...
0
votes
2answers
2k views

WinAPI SwapBuffers and Threads

I'm trying to use a different Thread for the whole WinAPI-Message-Loop stuff, so the window always keeps being responsive. Of course I'm using the main thread as the "window thread", because I need a ...
1
vote
1answer
1k views

Moving the camera as in a first person shooter

I am trying to implement the movement of the camera with the mouse. The result I want to achieve is the same that you get when you move your aim in a first person shooter. Here is the code I wrote, ...
9
votes
2answers
3k views

D3D/DXGI handle fullscreen transition

I have a D3D11 application, and I want to add proper fullscreen suport. Now I can let DXGI switch my window to fullscreen for me, and I'm under the impression that DXGI will take care of everything ...
3
votes
3answers
676 views

Multithreaded game fails on SwapBuffers in render thread at exit

The render loop and windows message loop run on separate threads. The way the program exits is that after PostQuitMessage is called in WM_DESTROY the message loop thread signals the render loop thread ...
0
votes
1answer
259 views

Implementing a Turn-Based Game with Windows API Window Messages

I'm trying to make a 2-player Connect 4 game, but I'm having trouble wrapping my head around some of the concepts related to incorporating event handlers while progressing with the game. On the one ...
6
votes
2answers
13k views

How do I properly check if a particular OpenGL version is available?

I can't find any information on glCreateContextAttribsARB returning errors if a version is unsuported by the driver. So how do i check if it is? I don't want the program to hard crash because ...
4
votes
5answers
2k views

If I want to become a professional game developer, is learning Win32 API a must? [closed]

If I want to become a game developer, is learning Win32 API a must? Does X-BOX or PS based game developers need to know Win32 API? Is it possible for a professional game developer to develop games ...
3
votes
1answer
1k views

Game programming basics under Windows

I've been trying to learn some Windows programming using the Win32 API. Now, i'm used to working with the OS layer being abstracted away, mostly thanks to libraries like SFML or Allegro. Could you ...
1
vote
1answer
2k views

Multiple buffering in OpenGL on Windows

What is the most common way modern games perform triple buffering ? What does the SwapBuffers exactly do in terms of OpenGL states ? Is it possible to perform double and triple buffering independently ...
2
votes
1answer
317 views

Why does my game not update unless I'm moving the mouse?

I'm pretty confused by what's happening. Now that I've finally put something moving on my screen, I notice it doesn't update unless I move the mouse, or press a key, or trigger other events. Using ...
4
votes
3answers
1k views

Multi Threading In Update Loop

Okay so I am working on a game engine and this was my previous game loop: ...
2
votes
2answers
349 views

How to get and copy font bitmap from WinGDI to a IDirect3DTexture9?

I want to get the pixels (or other data) for any character of the available fonts and copy/build them into a D3D texture so I could make some cache of text rendering by mapping only the character ...
2
votes
1answer
5k views

3D rotation math/code for plane

I am making a simple 3D game with plane in space. With c++ (win32). But the plane rotation is not realistic. The code I am using for the rotation is the following: ...
1
vote
2answers
2k views

Creating a full-screen window in Windows API

I've got a Windows API Window. I've managed to make it windowed, and "fullscreen windowed". But I can't seem to make the window just full-screen- for example, even if I specify ...