Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Bug in ''DarkGDK Open Source'' r113 -- stencil shadows does not work now

Author
Message
s_i
14
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 17th Jan 2014 15:07 Edited at: 18th Jan 2014 12:22
Now something broken and stencil shadows do not work. Old (october 2010) downloaded from this site official compiled libraries work well. And this is a problem, because author of all the recent changes of the original code left our forum, and I do not know what he had changed so that stencil shadows are not working.
The Tall Man
10
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 19th Jan 2014 04:10 Edited at: 20th Jan 2014 02:46
I guess they're just not gonna close my account! But I'm glad I have the opportunity to respond here before they get around to it... if they ever do...

As I said before, you already have everything you need. No one is being left stuck. I will clarify...

If something stopped working since the 2010 release, it was most likely not my doing. To clarify, I only authored r102 - r113. There were about 100 revisions before that, which I had nothing to do with. Most of the real changes from the 2010 release were done by others. I just showed up on the scene recently, and dove in and tracked things down, like you're doing.

Basically what I did was to roll back a few faulty revisions and corrected some errors that I found. In the repository, you can look at the revision logs and see exactly what was done for each revision, as well as who authored that revision (each author will have their own style). Stencil shadows is a feature that I'm not familiar with and have never used. So I never tested it. See, I made the fixes to the source code for my own use, and then figured why not share those changes with everyone since anyone wishing to use the source code would be in the same boat.

The earliest revision I rolled back from was r55. So try checking out r54 (which does build and function for DarkGDK) and see if the stencil shadows work there. If they do, then I probably missed something - another later revision that should have been fixed or rolled back.

In any case, to find the revision that "broke" the stencil shadows... well here is what I did to track down a revision that broke something:

1. I determined which module the fault was in (camera, Basic3D, music, etc).

2. I looked in the revision logs to find which revisions made changes to the relevant files.

3. I checked out and built the revision just before to see if it was functional in that area. And if it was, then I checked out and built the one that updated those files to see if that was the one that broke it.

And that's all a lot easier to do from the SVN on your computer, rather than the repository website (browsing the logs, seeing what files were effected, etc). If you wish to track down where in the effected files the bugs were created, you can view differences, which gives you a side-by-side comparison with changes highlighted. The SVN documentation can help further with that.

When you figure out how to fix it or where the problem is, you can add an Issue to the repository with the specifics of that information, like you did in the other tread in this forum. Adding an Issue in the repository is what I did before Lee gave me account access there (which I have since removed myself from). Anyone who can sign in to Google can add an Issue there. But without Lee adding you specifically as a "Person" on the project, you can't delete or modify an Issue, not even one that you created. So keep that in mind. But you can add and delete your own comments within an Issue.

Take care, and good luck!!!
Patrick
s_i
14
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 20th Jan 2014 01:04 Edited at: 20th Jan 2014 01:11
I found the problem area in the code on SVN, leading to a breakdown of the stencil shadows. This is revision 86.
In attachment is a simple project to test the stencil shadows.

I added new issue here: http://code.google.com/p/darkbasicpro/issues/list
Now I can only wait for code changes in SVN repository.

Attachments

Login to view attachments
s_i
14
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 20th Jan 2014 01:11 Edited at: 20th Jan 2014 01:20
Screenshots from this test are in attachment:

Attachments

Login to view attachments
The Tall Man
10
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 20th Jan 2014 02:52 Edited at: 20th Jan 2014 03:43
Why would you want to wait for it to be fixed in the repository? You don't have to use r113 out of the box. Just swap the culprit file or files with those of r85. As I said above, do a differences first between r85 and r113 versions of those files. If there aren't any, a simple swap-in of r85 versions will suffice. Otherwise, you'll have to merge the differences manually. But you can do all that on your local copy of the source code, you don't need to wait for anyone else. That's the magic of having access to the source code
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 20th Jan 2014 05:03 Edited at: 20th Jan 2014 05:18
s_i

There is only minor changes between v113 and v85 to get this working. Extract the attached files to The Tall Man\'s; DarkGDK - Open Source r111 - Compiled Release Libraries. This will fix the problem.

Attachments

Login to view attachments
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 20th Jan 2014 05:12 Edited at: 20th Jan 2014 05:15
I made changes to DBOData.h and DBOFormat.cpp. I have attached these files for you.

Attachments

Login to view attachments
s_i
14
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 20th Jan 2014 15:04 Edited at: 20th Jan 2014 15:16
OK, now shadows work. But friends, do not misunderstand me. I can do (and did) changes in my local copy of SVN, but I CAN NOT make changes to the official version of the SVN on the code.google.com. Too many important changes that should be made to the new revision 114. Otherwise soon our community will be entangled in these changes and additions. The Tall Man, can you make this?

Project of r114
1) Treatment of shadows, broken in r86.
change: /Dark Basic Pro SDK/Shared/DBOFormat/DBOData.h
change: /Dark Basic Pro SDK/Shared/DBOFormat/DBOFormat.cpp
Question: why Lee Bamber did r86, maybe it affects something? Why Lee Bamber changed also CSpritesC.cpp ?
2) Make the functions of working with ImageBlock. (dbOpenImageBlock and dbCloseImageBlock tested by me, they work correctly.)
CImageC.cpp :

DarkSDKImage.h :

Also: make similarly last two ImageBlock-functions "PerformChecklistForImageBlockFiles" and "GetImageFileExist".
The Tall Man
10
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 20th Jan 2014 21:26 Edited at: 20th Jan 2014 22:54
That's awesome! You guys have worked together to track it down and fix it!

Like I said, my role was very temporary, and its done, and I've already removed myself from having access to the repository. I'm moving on to other projects now. So why don't you guys do it?

Email Lee, let him know of your interest. Give him a link to this thread and to the one I started where you guys made posts - so he can get a feel for your involvement and skills. Keep in mind that Lee is very busy with FPSC Reloaded - that's his main priority right now, so he will not have much time to deal with this. So let him have the time to reply as it's convenient for him, and give him time to get to know you a bit as well.

This is open source, it's a collaboration. It shouldn't be dependent on any one person (like me, or either of you). Once you guys have access, encourage others to join in as well. Start gathering an open team and get a momentum going.

P.S. Something that most authors and revisions did was to add a revision signature as a comment within the modified source code files, at each major modification to point out what was changed, when, why, and by whom. I found these incredibly helpful in tracking things down from within Visual Studio. So be sure to do the same before you check in your modifications to the repository. You can see for yourself. But here's the more common and recent signature format, and one I used as well:

firstName - DDMMYY r# - description

The DDMMYY is of course the date in the format of [day month year].

Here is an example of one I added:
s_i
14
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 20th Jan 2014 21:55
The Tall Man, why DarkGDK does not play .ogg files? (I see the corresponding code in SVN of DarkGDK.)
The Tall Man
10
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 20th Jan 2014 22:11 Edited at: 20th Jan 2014 22:35
See #3 here:
https://code.google.com/p/darkbasicpro/wiki/VisionAndGoals

.ogg functionality is just one example.

Edit:
By the way, it's a good idea to modularize your revisions. So it looks like you're already working on r116.

Login to post a reply

Server time is: 2024-04-19 02:08:40
Your offset time is: 2024-04-19 02:08:40