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.


Topics - KRMisha

Pages: [1]
1
Feature requests / iOS: Keyboard functions not implemented
« on: August 13, 2017, 04:53:41 am »
For iOS, Window/iOS/InputImpl.mm's isKeyPressed function always returns false, with a "not applicable" comment. However, since the iOS Simulator in Xcode lets you use the hardware keyboard that's plugged in to your Mac, it would be useful if this function worked properly for testing purposes. Most people programming with SFML for iOS are likely to be using the simulator to test, and it's very useful to test things by simply binding them to a keyboard key instead of setting an action to a temporary gui button or touch movement. On top of this, the simulator natively has an option that enables the hardware keyboard, which makes it confusing if SFML's just doesn't seem to be working for keyboard input when testing for iOS. On top of this, if I'm not mistaken, these are the functions we would want to use if an external keyboard was plugged in to an actual iOS device (like a wireless keyboard with an iPad). I think it would be a good idea to enable the hardware keyboard for iOS.

2
SFML wiki / Tutorial: SFML for iOS
« on: August 08, 2017, 09:28:11 pm »
I've made a very lengthy and in-depth step by step tutorial on how to build SFML for iOS which should address every single one of the little issues people could have with CMake, SFML, or Xcode when trying to compile for iOS. Hopefully this should attract more people who want to use SFML for mobile development!

Link here: https://github.com/SFML/SFML/wiki/Tutorial:-SFML-for-iOS

-Misha

3
SFML website / Typo in "SFML and Xcode (Mac OS X) tutorial
« on: August 08, 2017, 04:25:24 pm »
In the "System Requirements" section of the tutorial, one of the bullet points is "An 64-bit Intel Mac with Lion or later (10.7+)" instead of "A 64-bit Intel Mac with Lion or later (10.7+)". It probably creeped in there when someone must have added the "64-bit" precision.

4
Audio / #include bug in ALCheck.hpp for iOS
« on: August 08, 2017, 12:43:15 am »
I believe there is a problem with Audio/ALCheck.hpp when compiling the libs for iOS after building with CMake. Xcode complains that there is no OpenAl/al.h that can be found, at line 33. The only way I got it to work was to rename as follows:
Code: [Select]
#ifdef SFML_SYSTEM_IOS
    #include <OpenAl/al.h>
    #include <OpenAl/alc.h>
#else
Renamed to:
Code: [Select]
#ifdef SFML_SYSTEM_IOS
    #include <AL/al.h>
    #include <AL/alc.h>
#else

By doing this, Xcode was able to successfully compile the libraries. I later used them in an iOS project and I can confirm that audio worked fine. This is only a change that affects ALCheck.hpp for iOS, as it is nested inside the #ifdef SFML_SYSTEM_IOS.

5
Graphics / Using map.emplace with sf::Shader
« on: May 03, 2017, 09:48:44 pm »
Hello,

I'm currently making a resource manager with which I can load, unload, or get a reference to a textures/fonts/soundbuffers/shaders. The problem is with the shaders: I can't seem to add them to an STL container (in my case, an std::unordered_map) because of the sf::NonCopyable. Even if I use .emplace(key, shader), my compiler doesn't accept it. How should I go about this?

Here is my current code:

const sf::Shader& ResourceManager::LoadShader(const std::string &rName, const std::string &rFilename, sf::Shader::Type type)
{
    // If a Shader is already loaded at the specified key, return the existing Shader
    std::unordered_map<std::string, sf::Shader>::const_iterator it = m_shaders.find(rName);
    if (it != m_shaders.cend())
    {
        return it->second;
    }
    // Otherwise, load the Shader
    sf::Shader shader;
    if (!shader.loadFromFile(rFilename, type))
    {
        std::cout << "ResourceManager error: Could not load Shader: \"" << rName << "\".\n";
        return m_shaders.at("ADDDEFAULTSHADER");
    }
    m_shaders.emplace(rName, shader); // Compiler error here because of deleted copy constructor
    return m_shaders.at(rName);
}
 

Thanks in advance!

Pages: [1]
anything