Quote:Original post by DarkBalls
@dmail
If I understand what you said correctly, I can create a window using only int main() and subsystem in console?
You have me confused now. Are you wanting to create a console window or win32 window? You can create a console window from WinMain using
AllocConsole but this does not seem to be what you are asking. Yes you can create a win32 window using the entry point main.
GetModuleHandle can give you the HINSTANCE to the process.
Quote:
I'm just using SDL's windowing and input and using OpenGL to render 3d graphics. So I think making my own for that will not really a big job, I think.
Ok lets quickly think this through, here is what you need
Cross platform window creation.
Cross platform window events.
Cross platform joystick handling.
Cross platform OpenGL and window binding.
Cross platform OpenGL extension loading.
This is only a very small fraction of what SDL provides.
Quote:
I know how to create a win32 window but not yet in linux. But I have a linux installed on my virtual machine.
This just confuses me more :) By the way you will not be able to have graphic acceleration in a virtual machine.
Quote:
Quote:
@Erik Rufelt
I'm pretty sure SDL does as I wrote in the example, they probably have something like that in a header. At least that's how many libraries do it.
If I didn't find any way on how to create a window using int main() and subsystem console, I'll just leave to that for now.
I do not know how helpful this will be but in a nutshell this is how SDL does it on windows.
*It uses the preprocessor to rename entry point
*Defines its own entry point
*Sets up global states
*Then calls your entry point which it renamed.