Browse Source

doc: updated Getting Started guide.

pull/34/head
Vladimír Vondruš 13 years ago
parent
commit
8be2293977
  1. BIN
      doc/getting-started-blue.png
  2. 20
      doc/getting-started.dox
  3. BIN
      doc/getting-started.png

BIN
doc/getting-started-blue.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

20
doc/getting-started.dox

@ -94,8 +94,7 @@ class MyApplication: public Platform::Application {
public:
explicit MyApplication(const Arguments& arguments);
protected:
void viewportEvent(const Vector2i& size) override;
private:
void drawEvent() override;
};
@ -103,10 +102,6 @@ MyApplication::MyApplication(const Arguments& arguments): Platform::Application(
// TODO: Add your initialization code here
}
void MyApplication::viewportEvent(const Vector2i& size) {
defaultFramebuffer.setViewport({{}, size});
}
void MyApplication::drawEvent() {
defaultFramebuffer.clear(FramebufferClear::Color);
@ -118,10 +113,10 @@ void MyApplication::drawEvent() {
MAGNUM_APPLICATION_MAIN(MyApplication)
@endcode
The application essentially does nothing, just clears properly sized screen
framebuffer to default (black) color and then does buffer swap to actually
display it on the screen. `CMakeLists.txt` finds %Magnum, sets up compiler
flags, creates the executable and links it to all needed libraries:
The application essentially does nothing, just clears screen framebuffer to
default (dark gray) color and then does buffer swap to actually display it on
the screen. `CMakeLists.txt` finds %Magnum, sets up compiler flags, creates the
executable and links it to all needed libraries:
@code
find_package(Magnum REQUIRED GlutApplication)
@ -181,9 +176,8 @@ Debug() << "Hello! This application is running on" << Context::current()->versio
After rebuilding and starting the application, the clear color changes to
blueish one and something like this would be printed to the console:
@code
Hello! This application is running on OpenGL 3.3 using Geforce GT 330M
@endcode
> Hello! This application is running on OpenGL 3.3 using Geforce GT 330M
@image html getting-started-blue.png
@image latex getting-started-blue.png

BIN
doc/getting-started.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Loading…
Cancel
Save