Tag Info

Hot answers tagged

15

Yes. It involves a small amount of messing with XNA's internals. I've got a demonstration of a fix in the second half of this video. Background: The reason this happens is because XNA suspends its game clock when Game's underlying Form is resized (or moved, the events are the same). This, in turn, is because it is driving its game loop from ...


6

Your guess is basically correct, and it's being done as an optimization (most likely; I can only speculate of course as I did not write the code). While an application in Windows appears to have full access to the entire range of RAM in the machine (or at least the range reported to it by the OS), in practice the OS is virtualizing an application's access ...


6

OpenGL itself is platform-netrual. In order to maintain that neutrality however, OpenGL expunged anything platform specific. Like creating a window. Or managing a window. Or creating OpenGL itself. Yes, the API does not explain how to create it. Only how to use it once created. The creating of an OpenGL context is something that is done using ...


4

I'd like to know if the way i'm checking if the OpenGL version of choice (3.3) is availible. Allow me to state this more clearly: The only way to know if your OpenGL implementation supports a particular version is to attempt to create a context with that version and see if you get a valid context as a result. wglCreateContextAttribsARB will either ...


2

There is more than one one way to skin the cat. If I understand correctly, you want to be able to take input from keyboard and mouse and use that to control stuff in your engine. But to write such interface from scratch, by yourself, would not only be a classic case of reinventing the wheel, but also, a very tedious task (think about it... you want to be ...


1

Yes it is SDL 2 allows you to tie your window directly to a window handle of a parent window. You can also plug DirectX and/or OpenGL directly into an SDL window. (This is, I think, how SDL2's OpenGL layer does it) See SDL_CreateWindowFrom EDIT Below is the code for the SDL portion of the program. You would create the win32 window as normal and it looks ...


1

Is there any way to get the color resolution through Direct3D ? is it strictly related to the format? The color resolution (bits per pixel) of a surface is strictly bound to the format of that surface, yes. You can use CheckFormatSupport to determine what formats are available for what uses at runtime. Is my approach correct at all ? because I'm ...


1

You need to define the static variables explicit: static long* xc1; static long* yc1; static long* xc2; static long* yc2; In the implementation file (.cpp), try adding this code: long* Line::xc1 = NULL; long* Line::yc1 = NULL; long* Line::xc2 = NULL; long* Line::yc2 = NULL; More info at: http://www.learncpp.com/cpp-tutorial/811-static-member-variables/ ...


1

There are frameworks like FreeGLUT that give a basic input/output abilities with keyboard and mouse, but if you want more there are the Visual C++ APIs for Windows.


1

OpenGL is independent of Win32 API. OpenGL is compatible with other platforms (Linux, MacOSX, iOS, ...) where the Win32 API is not even present. You can use glut to manage your window and create your OpenGL context in a platform independent way, and learn OpenGL without any knowledge of Win32 API.



Only top voted, non community-wiki answers of a minimum length are eligible