indielib.com Forum Index indielib.com
IndieLib Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

IndieLib 1.03 - Report bugs here!
Goto page 1, 2  Next
 
Post new topic   Reply to topic    indielib.com Forum Index -> Latest Release - Report bugs here!
View previous topic :: View next topic  
Author Message
Javier López
Site Admin


Joined: 26 Dec 2007
Posts: 515
Location: Murcia, Spain

PostPosted: Fri Jan 02, 2009 5:07 pm    Post subject: IndieLib 1.03 - Report bugs here! Reply with quote

IndieLib 1.03 SDK

Fairly innocuous but helpful bug fix release.


Fairly innocuous but helpful bug fix release.

[ features ]

+ Added Render::BlitColoredTriangle () method, for rendering triangles with differen color for each of the faces.

[ bug fixes ]

+ Fixed some color glitches on Primitives.

+ Fixed wrong name in GetPosZ().

+ Fixed return value on IND_Entity2dManager::Delete ().
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Javier López
Site Admin


Joined: 26 Dec 2007
Posts: 515
Location: Murcia, Spain

PostPosted: Sat Jan 03, 2009 12:42 pm    Post subject: Reply with quote

Hi people!

Render->BlitColoredTriangle ()

Was a method really easy to implement. I don't now why it wasn't already on the engine. It just draws a triangle, and let you choose the color of each of its corners. You can also set a level of transparency for the whole triangle.

TODO:

1. Add it to the primitives tutorial
2. Add it to Entity2d, you can't add it to an entity yet (in the documentation it is wrong)

I want to ask you:

1. Do you think it would be helpful to be able to choose the amount of transparency per corner (for having gradients of transparency). Currently the transparency affects to the whole triangle.
2. Do you think should we create a wrapper for letting use vertex arrays, etc? I think it is not neccesary because you can directly get the pointer to direct3d and use it as you wish. But maybe, thinking in future portability it would be neccesary...
3. Do you need something else in primitives?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Metadon



Joined: 20 Dec 2008
Posts: 137
Location: Sweden

PostPosted: Sat Jan 03, 2009 4:53 pm    Post subject: Reply with quote

Disregard this, i didnt know what i was talking about.

Last edited by Metadon on Sun Jan 04, 2009 4:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
Javier López
Site Admin


Joined: 26 Dec 2007
Posts: 515
Location: Murcia, Spain

PostPosted: Sun Jan 04, 2009 12:15 pm    Post subject: Reply with quote

Quote:
While i dont really see the need for BlitColoredTriangle as you could already do the same thing with three blitline, i guess it might by useful for some.


In fact, is a filled triangle.

Quote:
I really want a filled polygon function.


This is what it is Smile

Maybe I should change the name of this method?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Metadon



Joined: 20 Dec 2008
Posts: 137
Location: Sweden

PostPosted: Sun Jan 04, 2009 12:34 pm    Post subject: Reply with quote

Oh, whoops. Disregard what i said then. Embarassed

In that case, yes, separate transparencies for corners would be neat.

If you could add a filled triangle with only one colour instead of three, that would also be neat.
Back to top
View user's profile Send private message
Javier López
Site Admin


Joined: 26 Dec 2007
Posts: 515
Location: Murcia, Spain

PostPosted: Sun Jan 04, 2009 12:42 pm    Post subject: Reply with quote

Quote:
separate transparencies for corners would be neat.


That not complex, but I bit tricky because I'll have to change some details. But don't worry, I'll add it Smile

Quote:
If you could add a filled triangle with only one colour instead of three, that would also be neat.


Easy and helpful method, yes, I'll add it too.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Metadon



Joined: 20 Dec 2008
Posts: 137
Location: Sweden

PostPosted: Sun Jan 04, 2009 3:49 pm    Post subject: Reply with quote

The alpha value in blitcoloredtriangle doesnt seem to affect anything.

This;
Code:
mI->Render->BlitColoredTriangle(0,0,80,40,-80,40,100,100,100,100,100,100,100,100,100,255);

and this;
Code:
mI->Render->BlitColoredTriangle(0,0,80,40,-80,40,100,100,100,100,100,100,100,100,100,0);

looks exactly the same, am i doing something wrong or is it a bug?
Back to top
View user's profile Send private message
Javier López
Site Admin


Joined: 26 Dec 2007
Posts: 515
Location: Murcia, Spain

PostPosted: Sun Jan 04, 2009 3:53 pm    Post subject: Reply with quote

There is something wrong, yes. It seems like alpha is not affecting primitives any more.

I'll take a look. I think I know what it is.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Metadon



Joined: 20 Dec 2008
Posts: 137
Location: Sweden

PostPosted: Sun Jan 04, 2009 4:27 pm    Post subject: Reply with quote

Great, that bug is pretty annoying.

A question, is it possible to use blendmodes with primitives? If it is, support for using that would be awesome for some particular uses.
Back to top
View user's profile Send private message
Javier López
Site Admin


Joined: 26 Dec 2007
Posts: 515
Location: Murcia, Spain

PostPosted: Thu Jan 08, 2009 8:31 am    Post subject: Reply with quote

TODO:

1. Add BlitColoredTriangle to the primitives tutorial
2. Add it to Entity2d, you can't add it to an entity yet (in the documentation it is wrong)
3. Change the names of collision system methods.
4. Splines
5. Check out if there is a problem the second time of calling an animation
6. Resizable window
7. Map editor tutorial
8. Possibility of checking focus lost.
9. SetMousePos
10. Currently, entities can not share animations. Well, they can share it, but if you make a "SetSequence" it will be done in all the entities that share that animation. I have to add a "Clone Animation" method for that. This is going to be in the very next release. It's really important.

Hey! No one here knows OpenGl / Direct3d? I'm starting to have too much work Smile

An english speaker would be also really welcome. He / she only would have to read the sourcecode, fix English errors, and press "commit" Smile


Last edited by Javier López on Thu Jan 22, 2009 6:48 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Metadon



Joined: 20 Dec 2008
Posts: 137
Location: Sweden

PostPosted: Thu Jan 08, 2009 6:15 pm    Post subject: Reply with quote

English isnt my first language, obviously, but i could proof-read the sourcecode every once in a while if it would help. Im afraid i cant help you with Direct3d/OpenGL since i have close to zero experience with them.
Back to top
View user's profile Send private message
Javier López
Site Admin


Joined: 26 Dec 2007
Posts: 515
Location: Murcia, Spain

PostPosted: Thu Jan 08, 2009 6:50 pm    Post subject: Reply with quote

Quote:
English isnt my first language, obviously, but i could proof-read the sourcecode every once in a while if it would help.


This would be great if you have some time. You can access de Assembla repository: http://www.indielib.com/forum/viewtopic.php?t=48

But don't worry, I think you are making the BEST thing that this community needs now: rapid game development Smile

So keep doing what you are just doing Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
smjones_gi



Joined: 21 Jan 2009
Posts: 209
Location: San Diego, CA

PostPosted: Thu Jan 22, 2009 4:30 am    Post subject: Reply with quote

I hope I'm not way off here and outstepping my bounds because I just downloaded the library today but I've found memory leaks.


In the End function of the main class that the game creates I did this to clean things up.

void CIndieLib::End()
{
// ----- Freeing objects -----

Math ->End();
MeshManager ->End();
Input ->End();
Entity2dManager ->End();
Entity3dManager ->End();
FontManager ->End();
AnimationManager ->End();
SurfaceManager ->End();
ImageManager ->End();
LightManager ->End();
Render ->End();
Window ->End();

delete Math;
delete MeshManager;
delete Input;
delete Entity2dManager;
delete Entity3dManager;
delete FontManager;
delete AnimationManager;
delete SurfaceManager;
delete ImageManager;
delete LightManager;
delete Render;
delete Window;

IndieLib::End ();

delete pinstance;
pinstance = NULL;
}

I used the CRT to find them. Now some people may disagree with me and point out that since we are shutting down the app that the OS will clean up the memory for us. I guess you can consider me a purist but I hate to leave memory hanging around for the OS to catch. I like to close apps all nice and tidy. Smile

Put this at the beginning of your "main" or IndieLib function.

// Enable run-time memory check for debug builds.
#if defined(DEBUG) | defined(_DEBUG)
// Always perform a leak check just before app exits.
int nDbgFlags = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
nDbgFlags |= _CRTDBG_LEAK_CHECK_DF;
nDbgFlags |= _CRTDBG_ALLOC_MEM_DF;
_CrtSetDbgFlag(nDbgFlags);
#endif

and you'll see "Dumping Objects..." in the output window after the app shuts down.

Regards,
Steve


Last edited by smjones_gi on Thu Jan 22, 2009 9:18 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Javier López
Site Admin


Joined: 26 Dec 2007
Posts: 515
Location: Murcia, Spain

PostPosted: Thu Jan 22, 2009 6:50 pm    Post subject: Reply with quote

Thank you very much for finding this. This is similar to what Black Bird found.

I have updated the TODO list for the new bug fixing release:

1. Add BlitColoredTriangle to the primitives tutorial
2. Add it to Entity2d, you can't add it to an entity yet (in the documentation it is wrong)
3. Change the names of collision system methods.
4. Splines
5. Check out if there is a problem the second time of calling an animation
6. Resizable window
7. Map editor tutorial
8. Possibility of checking focus lost.
9. SetMousePos
10. Currently, entities can not share animations. Well, they can share it, but if you make a "SetSequence" it will be done in all the entities that share that animation. I have to add a "Clone Animation" method for that. This is going to be in the very next release. It's really important.
11. Fix memory leaks when ending IndieLib.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
smjones_gi



Joined: 21 Jan 2009
Posts: 209
Location: San Diego, CA

PostPosted: Fri Jan 23, 2009 11:22 pm    Post subject: Reply with quote

IND_Render::GetFpsString () { char *mString = new char [128]; itoa (mLastFps, mString, 10); return mString; }

Gives memory leaks! Lots of them. Smile See that 'new' operator?

I saw this occur when my memory leak dump was huge. Is there anywhere where this is cleaned up that I missed?

Regards,
Steve
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    indielib.com Forum Index -> Latest Release - Report bugs here! All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group