Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Drawing grid 16x16 all over the window?
Print
Pages: [
1
]
Author
Topic: Drawing grid 16x16 all over the window? (Read 2938 times)
0 Members and 1 Guest are viewing this topic.
Fedcomp
Newbie
Posts: 4
Drawing grid 16x16 all over the window?
«
on:
November 08, 2013, 09:39:21 pm »
Searching a bit, i found discussions on this forums how to make a line.
I tryed to use new knowledge to make a grid 16x16 with the size of the main window but failed with segfault.
How to draw 16x16 grid of the size of main window?
Logged
Stauricus
Sr. Member
Posts: 369
Re: Drawing grid 16x16 all over the window?
«
Reply #1 on:
November 08, 2013, 09:50:43 pm »
it depends on what you mean by "16x16 with the size of the window"
do you want to fill the window with grids that have 16 pixels in height and width? or fill the window with grids that are of the size window/16 (and then you have 16 squares on X axis and 16 on the Y axis) ?
Logged
Visit my game site (and hopefully help funding it?
)
Website
|
IndieDB
eXpl0it3r
SFML Team
Hero Member
Posts: 11032
Re: Drawing grid 16x16 all over the window?
«
Reply #2 on:
November 08, 2013, 11:14:53 pm »
Most likely an overflow/bad indexing, but without code we can't help you.
Logged
Official FAQ:
https://www.sfml-dev.org/faq.php
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
BaneTrapper
Full Member
Posts: 213
Do you even see this, i dont need it.
Re: Drawing grid 16x16 all over the window?
«
Reply #3 on:
November 10, 2013, 12:56:19 am »
You can get data from sf::Window class and make your grid = window.width / 16.
Refer to documentation for window class.
Logged
BaneTrapperDev@hotmail.com Programing, Coding
Projects: Not in development(unfinished/playable):
http://en.sfml-dev.org/forums/index.php?topic=11073.msg76266#msg76266
UP and in Development: The Wanderer - Lost in time
http://en.sfml-dev.org/forums/index.php?topic=14563.0
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Drawing grid 16x16 all over the window?
anything