Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Turbine

Pages: [1] 2 3 ... 7
1
Network / Re: HTML setHost
« on: August 19, 2018, 04:33:42 am »
The next obvious step would be to Google "HTTP status code 301" and understand what it does and what it means and then you can handle it. ;)

Alright I got everything working lol, is there way to get a specific part of the html?

I tried messing around with setField and setBody. They dont seem to work. I know that getBody returns one big string, and one way I know is to read the string and get data from it. Is there a better way or should i just continue with my way?

The optimal method of retrieving such data is by sending a request to a REST API and then using a JSON parser to access the data.

For example:
Quote
https://samples.openweathermap.org/data/2.5/weather?lat=35&lon=139&appid=b6907d289e10d714a6e88b30761fae22

Returns:
Quote
{"coord":{"lon":139.01,"lat":35.02},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"base":"stations","main":{"temp":285.514,"pressure":1013.75,"humidity":100,"temp_min":285.514,"temp_max":285.514,"sea_level":1023.22,"grnd_level":1013.75},"wind":{"speed":5.52,"deg":311},"clouds":{"all":0},"dt":1485792967,"sys":{"message":0.0025,"country":"JP","sunrise":1485726240,"sunset":1485763863},"id":1907296,"name":"Tawarano","cod":200}

API Documentation:
https://openweathermap.org/current

JSON Parser (header library):
https://github.com/nlohmann/json

2
Feature requests / Re: Plattform independet File Open / File Save dialogs
« on: October 18, 2017, 06:32:43 am »
I'd like to revive this idea, due to the new direction of SFML dev.

A wrapper for something like:
https://github.com/mlabbe/nativefiledialog

Would make for a good addition, much like the clipboard improvements.

3
Please do, my character is half a millimetre on my Surface Pro 4. At least the DPI awareness part.

4
General / Re: SOLVED cannot fin -lsfml-graphics
« on: June 14, 2017, 09:36:20 am »
When you've got some time, I'd build SFML from source. It's quite easy to do. ;)

In my build system I automatically download SFML and have it automatically build for Windows/Linux/Android and all of the architectures supported - On my Linux box. (Cmake cli)

5
Graphics / Re: One Texture Shared to Multiple Sprites
« on: May 30, 2017, 05:09:40 pm »
Texture is a light object, any references will be just that. There's no need to reuse the same texture object. xD

6
Feature requests / Re: Vulkan Support
« on: May 23, 2017, 07:26:54 am »
This tutorial for Vulkan shows you how to create a window, display a graphic and a tonne of other cool stuff.

https://raw.githubusercontent.com/Overv/VulkanTutorial/master/ebook/Vulkan%20Tutorial.pdf

7
General / Re: SFML shader sample official not working.
« on: May 21, 2017, 06:40:44 am »
Which two examples are not working for you?

8
What's wrong with it in it's current form? Has something broken due to an update?

9
Graphics / Re: How to reduce two draw calls into one
« on: May 10, 2017, 07:55:34 pm »
Yeah sure, use a sf:RenderTexture: https://www.sfml-dev.org/documentation/2.4.2/classsf_1_1RenderTexture.php

As it's a sf:RenderTarget you may draw to the texture before drawing the texture to the window. You could draw a texture to another texture if you wanted even.

10
SFML development / Re: C++ standards
« on: May 10, 2017, 07:49:55 pm »
Could you consider also using r-value moving, using "Type&& val" and "std::move()".

It'd sure save a lot of useless copying for position/proportion/string constructors and setters.

11
Loop through your zombies and add entries for them into the vertex array - then draw the vertex array. Remember, it's not the long making it slow - it's the individual draw calls with their context switching overheads

12
Feature requests / Re: Vulkan Support
« on: April 28, 2017, 06:42:04 pm »
Vulkan is future.
Vulkan is future in applications when efficiency is really crucial. In case of SFML it's not. Same goes for CAD–like programs, simple GUI apps (aka file manager etc.) and pretty much anything that works in 2D.

Like mobile devices with underwhelming hardware and limited battery life?

I can't help but think it needs to be implemented sooner or later.. Better Vulkan than Windows exclusive Direct X.

13
I agree SFML's constructors can be a real pain. Just like when you want to copy one sort of vector to an SFML vector. They should just make it a template as the compiler will figure whether x and y exists. Not to mention data conversions.

Anyway, there's always initialiser lists if you want to construct one with the least amount of syntax.

14
General / Re: Application hanging up.
« on: April 16, 2017, 08:14:32 pm »
What the heck, that's an interestingly designed SFML program. Why not try and base it more on some of the more standard examples?

For instance, Window is being created on the stack, rather than in main.

15
Graphics / Re: Casting integers for setPosition() properly
« on: April 12, 2017, 08:08:17 am »
There's a few ways to go about this. Modern compilers generally support initialiser lists. So you could write:
Quote
sprite.setPosition({(float)x, (float)y});

There's also a compiler flag which lets the compiler automagically convert the int to float, although it's not recommended. (-fexceptions) Personally, I'd just keep the types native. Converting between the two comes at a cost.

The third way is to modify SFML's vector class and allow say - a template value.

Pages: [1] 2 3 ... 7