-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding some docs for libprimis headers #24
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,6 +105,10 @@ struct Slot | |
} | ||
|
||
virtual const char *name() const; | ||
|
||
/** | ||
* @brief The directory where textures are stored | ||
*/ | ||
virtual const char *texturedir() const | ||
{ | ||
return "media/texture"; | ||
|
@@ -287,7 +291,20 @@ extern std::vector<Slot *> slots; | |
extern std::vector<VSlot *> vslots; | ||
extern std::vector<int *> editingvslots; | ||
|
||
/** | ||
* @brief Extract or replace the shader parameter name, inserting if it doesn't exist, in `shaderparams`. | ||
* | ||
* Extracts the name from a global `shaderparams` whose type is `std::unordered_set<std::string>`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically this global is called For some additional context, this global set of shaderparamnames is only used by this function, is not cleaned up at any point, and is used specifically to assign the |
||
* It performs the necessary "conversion" from `std::string` to `const char *`. | ||
* | ||
* If the name doesn't exist yet, it is inserted, then returned | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the name doesn't exist yet or It appears that due to the specific behavior of |
||
* | ||
* @param name The name to retrieve | ||
* @param insert A bool value representing wether or not to replace it in the global shaderparams global; default true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. whether* |
||
* @return The corresponding shader name parameter in the `shaderparams` global set | ||
*/ | ||
extern const char *getshaderparamname(const char *name, bool insert = true); | ||
|
||
extern void setldrnotexture(); | ||
|
||
extern VSlot *findvslot(const Slot &slot, const VSlot &src, const VSlot &delta); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The convention I've used for
@brief
statements is a complete sentence ending with a period. I also would generally phrase the@brief
for this as "returns the directory..." since that is more specifically what the function does, and then use the current phrase for the@return
.