Skip to content

Commit

Permalink
fixed chapter 1 doxygen file
Browse files Browse the repository at this point in the history
  • Loading branch information
flight404 committed Jul 27, 2012
1 parent ed92147 commit 3d7e76a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/doxygen/docsrc/guides/tour/chapter1.dox
Expand Up @@ -106,7 +106,7 @@ As we mentioned before, including images directly in your app as resources is on
The following code will attempt to create an image from a file selected by means of a standard open dialog box. Once you select a file, assuming the file is a valid image, a texture is created. Otherwise, an exception is thrown and we print an error message (we'll discuss console() more in a bit). The following code will attempt to create an image from a file selected by means of a standard open dialog box. Once you select a file, assuming the file is a valid image, a texture is created. Otherwise, an exception is thrown and we print an error message (we'll discuss console() more in a bit).
\code \code
try { try {
std::string p = getOpenFilePath( "", ImageIo::getLoadExtensions() ); fs::path p = getOpenFilePath( "", ImageIo::getLoadExtensions() );
if( ! p.empty() ) { // an empty string means the user canceled if( ! p.empty() ) { // an empty string means the user canceled
myImage = gl::Texture( loadImage( p ) ); myImage = gl::Texture( loadImage( p ) );
} }
Expand Down Expand Up @@ -136,9 +136,9 @@ Drawing shapes is just as easy. If you want to draw a circle of a radius of x, y
gl::drawSolidCircle( Vec2f( 15.0f, 25.0f ), 50.0f ); gl::drawSolidCircle( Vec2f( 15.0f, 25.0f ), 50.0f );
\endcode \endcode
\n \n
The circle that is created is actually an OpenGL \c TRIANGLE_FAN. The number of triangles comprising the fan can be controlled by an optional third parameter. If left blank, the circle will be created with as much detail as is needed based on the circle's radius. For example, the following code will create a filled hexagon. Note that the detail parameter represents the number of vertices to draw. Since we are drawing a triangle fan, we need to include the center point which brings the total vertices to 7, not 6. The circle that is created is actually an OpenGL \c TRIANGLE_FAN. The number of triangles comprising the fan can be controlled by an optional third parameter. If left blank, the circle will be created with as much detail as is needed based on the circle's radius. For example, the following code will create a filled hexagon.
\code \code
gl::drawSolidCircle( Vec2f( 15.0f, 25.0f ), 50.0f, 7 ); gl::drawSolidCircle( Vec2f( 15.0f, 25.0f ), 50.0f, 6 );
\endcode \endcode
\n \n
There are similar methods for drawing all manner of basic geometry, both 2D and 3D. Check the reference for the full list.\n There are similar methods for drawing all manner of basic geometry, both 2D and 3D. Check the reference for the full list.\n
Expand Down

0 comments on commit 3d7e76a

Please sign in to comment.