Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    17
  • comments
    37
  • views
    8994

Our first Main.cpp

Sign in to follow this  
Kerkhoff

255 views

Hi everyone, I'm a little hurried, so I will just write here our first main.cpp =D

We can already create some windows and show...

If you are following the previous days, check how simple is the code:


#include "PStructs.h"
#include "PDevice.h"

int main()
{
PDevice* MainApplication= new PDevice(vdOpenGL);

MainApplication->CreateNewWindow("MyWindow", new SRect(0, 100, 500, 500));
MainApplication->Show("MyWindow");

while (MainApplication->Running())
{
MainApplication->Refresh();
}

delete(MainApplication);

return 0;
}



When we create a PDevice instance, we pass by parameter, the type of API we want to use. In this case, is OpenGL..

Well...tomorrow I'll show the first "visual" version of our engine, with what we have until now..

See ya..
Sign in to follow this  


2 Comments


Recommended Comments

Nice. Sorry if you mentioned it prior already, but what APIs will the engine support aside from OpenGL? I've yet to see a 2D engine that makes use of a bunch of different renderers (OpenGL, Direct3D, SDL, etc) for more flexibility.

Also, are you planning to go open-source with this? Or release the engine? :)

Share this comment


Link to comment
Hi...

for while...I pretend implement just the OpenGL and DirectX support...

and...about free source...I think that I'm quite novice in game programming to make something that deserve to be paid...=D

And more...I count with everyone to help me in build this engine :)

Thanx...

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!