소스 검색

Remade documentation into plain HTML pages with links to each other.

David Piuva 5 년 전
부모
커밋
b4a47e2ec8

+ 0 - 31
Doc/C++Guide.txt

@@ -1,31 +0,0 @@
-A general C++ debugging guide for anyone who might need it.
-
-Cannot find method in namespace:
-	* Check that the header is included from where it is called.
-	* Check that the correct namespace is being used.
-	* Check input arguments.
-		Having the wrong input is like using another method name because of overloading.
-
-Linker error:
-	* Check that the cpp file is compiled by looking at the cpp files being mentioned in the terminal.
-		If not compiled:
-			* Check that the file's name doesn't contain spaces by mistake.
-			* Check that it's in a folder being compiled.
-	* Check that the definition in the cpp file has the identifier declared explicitly in the namespace.
-		flags returnType namespace::methodName( ... ) flags { ... }
-
-Multiple definitions of method in header:
-	* Move to cpp implementation which is only compiled once or declare as inline.
-
-Cannot move variable to base class without getting weird behaviour:
-	* Did the construction of the variable in the list depend on a variable given to the class that it moved to?
-		Calling a base constructor will not set any of the variables before all of them are complete.
-
-Calls to a class crashes when done from another source file.
-	* Make sure that each method is implemented in the corresponding source file.
-		A class fully defined in the header may have contradicting implementations between the sources that include the header.
-
-General rules:
-	* If a class isn't supposed to be instanciated, make it abstract by letting at least one virtual method be pure.
-		This reveals if any polymorph argument is passed as a template type to overloading, which ignores the child type and its v-table.
-

+ 0 - 43
Doc/GettingStarted.txt

@@ -1,43 +0,0 @@
-Place the library's root folder inside of a new folder.
-This allow keeping your own projects and the "temporary" folder that's
-used for compiling quickly outside of the library's version history.
-
-If using Linux, you might need to install the X11 headers.
-If it doesn't work, your Linux distro might not have an X11 server.
-On debian based distributions:
-	sudo apt-get install libx11-dev
-
-If using a Raspberry Pi, you can use Raspbian (Buster or newer for X11 support) or Ubuntu Mate.
-
-Build and run an example program on Linux:
-	* Select an SDK example and open its folder in a terminal.
-	* Give permission to execute the build script.
-		chmod +x build.sh
-	* Run the build script.
-		./build.sh
-
-Run regression tests on Linux:
-	* Open the source folder in a terminal and run the test script:
-		chmod +x test.sh
-		./test.sh
-
-Create your own Linux project
-	* Copy one of the SDK examples.
-	* Change ROOT_PATH and TEMP_DIR in your build script
-	  to refer to the same locations from a new source path.
-	* Add your own external dependencies to LINKER_FLAGS within a quote
-	  with -l in front of each library name.
-
-Creating a terminal application
-	If your application doesn't create any window, you can make it more portable
-	by replacing "WINDOW_MANAGER=X11" with "WINDOW_MANAGER=NONE".
-	This will compile with NoWindow.cpp instead of X11Window.cpp in windowManagers.
-
-Create your own cross-platform CodeBlocks project:
-	* Select C++ 14 with G++ from the GCC toolchain.
-	* Link with "-lm -pthread" to get standard C++ math and threading.
-	* Include all source files in the DFPSR folder or just the ones you need.
-	* Include the window wrapper and its dependencies for each target build.
-	  Most platforms will be targeted using NoWindow.cpp for text only.
-	This should work with most other IDEs that support the GCC toolchain.
-

+ 17 - 0
Doc/Manual.html

@@ -0,0 +1,17 @@
+<HTML>
+	<HEAD>
+		<TITLE>David Piuva's software renderer</TITLE>
+	</HEAD>
+	<BODY>
+		<link rel="stylesheet" type="text/css" href="Pages/PageStyle.css">
+		<B>David Piuva's software renderer</B>
+<P>	<IMG SRC="Pages/Images/Border.png">
+<P>		<B>Technical details</B>
+<P>		<IMG SRC="Pages/Images/SmallDot.png"> <A href="Pages/License.html">License</A>
+<P>		<IMG SRC="Pages/Images/SmallDot.png"> <A href="Pages/Security.html">Security</A>
+<P>	<IMG SRC="Pages/Images/Border.png">
+<P>		<B>Modifying the library</B>
+<P>		<IMG SRC="Pages/Images/SmallDot.png"> <A href="Pages/StyleGuide.html">Style guide</A>
+<P>	<IMG SRC="Pages/Images/Border.png">
+	</BODY>
+</HTML>

BIN
Doc/Pages/Images/Border.png


BIN
Doc/Pages/Images/SmallDot.png


BIN
Doc/Pages/License.html


+ 1 - 0
Doc/Pages/PageStyle.css

@@ -0,0 +1 @@
+body         { background-color: #FFFFFF; font-size: 14px; font-family: Arial; color: #000000; 

               margin: 0; padding-left: 10; padding-right: 10; padding-top: 30; 

               padding-bottom: 10px }

a            { font-size: 18px; font-family: Arial; color: #0000A0; 

               text-decoration: none }

a:visited { color: #0000A0}

a:hover { color: #000070;background: #AAffAA}

a:active { color: #00A0A0 }

.normal {font-size: 14px; color: #00A0A0}

.sub {font-size: 14px;color: #ffffdf;}


BIN
Doc/Pages/Security.html


BIN
Doc/Pages/Starting.html


BIN
Doc/Pages/StyleGuide.html


+ 0 - 69
Doc/StyleGuide.txt

@@ -1,69 +0,0 @@
-Code convention:
-1. Use common sense!
-	If it looks wrong to humans then it's wrong.
-	Don't defeat the purpose of the rule by taking it too far.
-2. Don't use iterators when there is any other way to accomplish the task.
-	You can't write efficient algorithms without knowing the data structures.
-3. Tabs for indentation then spaces for alignment.
-	It's the best of both worlds by both having variable length tabs
-	and correct alignment that works between lines of the same indentation.
-	3.1. Do not use multiple spaces as a replacement for tabs in indentation.
-	     I don't care if you set your editor to 2, 4 or 8 columns per tab
-	     and neither should you care about my preferences.
-	3.2. Do not use a tab as a replacement for multiple spaces in alignment.
-	     The number of leading tabs should be equal to the indentation depth.
-	     This way we can prove mathematically that blocks of code in the same
-	     indentation will always keep the same relative alignment.
-	3.3. Do not use tabs after spaces.
-	     First tabs for indentation, then spaces for alignment.
-	3.4. Do not try to align between different indentation depths.
-	     Only align within the same depth so that it works for all tab lengths.
-	Example using "--->" for tabs and "." for spaces:
-		int foo(int x, int y) [
-		--->if (superLongExpression(x) &&
-		--->....superLongExpression(y)) {
-		--->--->bar(x + y);
-		--->}
-		}
-	If a reader uses 8 spaces per tab then superLongExpression is still aligned:
-		int foo(int x, int y) [
-		------->if (superLongExpression(x) &&
-		------->....superLongExpression(y)) {
-		------->------->bar(x + y);
-		------->}
-		}
-4. No dangling else, use explicit {} for safety.
-	Otherwise someone might add an extra statement and get random crashes.
-5. No hpp extensions, use h for all headers.
-	Could be either way, but this library uses *.h for compact naming, so keep it consistent.
-6. C-style casting for raw data manipulation and C++-style for high-level classes.
-	When using assembly intrinsics and raw pointer manipulation to alter the state of bits,
-	verbose high-level abstractions only make it harder to count CPU cycles in your head.
-	Always use the tool that makes sense for the problem you're trying to solve.
-	C++ style is for things that are abstracted on a higher level.
-	C style is for when a byte is just a byte and you just want to manipulate it in a specific way.
-7. Don't call member methods with "this" set to nullptr.
-	This would be undefined behaviour and may randomly crash.
-	Use global functions instead. They allow checking pointers for null
-	because they are explicit arguments declared by the programmer.
-8. Avoid using STD/STL directly in SDK examples.
-	Exposing types from the standard library should be done using an alias or wrapper in the dsr namespace.
-	This allow replacing the standard library without breaking backward compatibility.
-	The C++ standard have broken backward compatibility before and it can happen again.
-9. Don't abuse the auto keyword everywhere just to make it look more "modern".
-	Explicit type safety is what makes compiled languages safer than scripting.
-10. No new line for opening brackets.
-	Makes the code more compact and decreases the risk of copy-paste errors.
-11. Don't fix the style of someone else's code if you can easily read it.
-	Being pedantic can become an addiction consuming all your time.
-	Fixing actual bugs and port to new systems is much more appreciated than
-	causing version conflicts with others.
-12. Don't change things that you don't know how to test.
-	* Not doing enough regression tests will eventually create a mine-field of untested functions.
-	  Regression testing will only slow down the amount of new bugs, unless you keep adding more regression tests.
-	* Manual testing only finds bugs in code that's actually called by the program.
-	  Two bugs may cancel each other out, which is common with negation and coordinate systems.
-	* The larger the input is relative to the output, the lower coverage you will get from each test.
-	  If your input is a video and the result is a boolean, any implementation has a 50% chance to pass the test on pure luck.
-	  If your input is a boolean and the result is a video, you just try both cases and have full coverage.
-