|
| 06 Jul 2011 10:04 AM |
I wanna make a program thingie using C++
i have a kinda base already, i had a window class dat makes window using SFML (and everything else will use SFML cuz installing all the fancy libraries was nearly impossible o.e)
But i need motivation to try get openGL working or something... I already have glew set up and i made a test where it draws some cubes using few lines of copypasted code.
I think the main reason i cant get a thing done is that i cant figure out a good design for the framework...
So how i make good framework?
mah framework naimspace is named "mv" and i dont remember what that stand for.
currently i got
mv::Window mv::Number (fixed point number) mv::i8-64 (signed ints) mv::ui8-64 (unsigned ints) ^^^^ Those so that i dont have to try remember how many bits each has, though im sure my typedefs fail and have wrong amount of bits (How do i get them so they has right amount of bits???) mv::Vector2D (2d vector) mv::Somerandomtemplatedmathfunctions
How do i stick the rendering in there? o.e
I was thinkin something liek this: (i use OpenGL)
mv::Draw (cuz draw is only 4 letters so it takes less time to type it everywhere! x3)
You can give it info about states, lets say clear color and other random stuff.
Then you can create base obiwects, lets say a cube.
Then you can give it data that contains the shape/watever (=cube in this case), some color stuff and a rotation and parent object/rotation/watever (so its own rotation is just an offset)
and it returns you a pointer/index or sumtin to this object so you can edit its data.
then joo can call render() and it draws it all.
liek u maik cube prototype object, then you make an actual object and make its vertices out of the prototypes vertices and rotation and then u gets index that u give the renderer to edit the data liek color or transformation.
nao questions:
1) Does that deisng sux? 2) How i read/write to files without using some ugly windows only outdated text file editing functions 3) Gimme motivation |
|
|
| Report Abuse |
|
|
|
| 06 Jul 2011 12:02 PM |
| 3) You can code it; All night long! |
|
|
| Report Abuse |
|
|
|
| 06 Jul 2011 12:52 PM |
That might work... Ill try today
I must make thing that supports 9001 fluid particles with negative lag and 4D rendering. |
|
|
| Report Abuse |
|
|
|
| 06 Jul 2011 02:06 PM |
You should try something like this:
while(mv::Running()) { mv::Clear(mv::Color4 ClearColor); mv::Color(mv::Color4 DrawColor); mv::Draw(mv::Shape::Rectangle(mv::Vector2(int x, int y ), mv::Vector2(int x, int y)); mv::Render(); } |
|
|
| Report Abuse |
|
|
|
| 06 Jul 2011 02:36 PM |
@Charls
u nuts? ur creating the shape and the vectors and all every frame! Dat wont work with 1 million rectangles! D: |
|
|
| Report Abuse |
|
|