Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
C++/SFML 2.1 CircleApp
SUBMITTED BY:
PlumpDolphin
DATE:
July 14, 2016, 10:27 p.m.
FORMAT:
C++
SIZE:
656 Bytes
Raw
Download
Tweet
HITS:
720
Go to comments
Report
//This is a c++/sfml 2.1 program that draws a circle.
#include
<iostream>
#include
<SFML/Graphics.hpp>
using
namespace
std
;
int
main
()
{
sf
::
RenderWindow
circleApp
(
sf
::
VideoMode
(
128
,
128
),
"Circle"
);
sf
::
Event
appEvent
;
sf
::
CircleShape
circleObj
(
64.f
);
circleObj
.
setFillColor
(
sf
::
Color
::
Red
);
while
(
circleApp
.
isOpen
())
{
while
(
circleApp
.
pollEvent
(
appEvent
))
{
if
(
appEvent
.
type
==
sf
::
Event
::
Closed
)
circleApp
.
close
();
}
circleApp
.
clear
();
circleApp
.
draw
(
circleObj
);
circleApp
.
display
();
}
return
(
0
);
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus