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 - Strelok

Pages: 1 [2] 3 4 ... 10
16
General / Re: Re: clion and sfml?
« on: September 14, 2014, 10:11:57 am »
Hi,

I cant see the clion option on cmake.

Can you teach me step by step if not too much?
There's no need to generate project files for Clion. CLion use CMakeLists.txt as project file (and stores other stuff in .clion if I recall correctly). You only need to "open project" from the IDE and select the CMakeLists.txt file I wrote in a previous post.

17
In case anyone's willing to understand what's going on I've attached a diff for master : 2.1

18
General discussions / Re: Re: SFML 3 - What is your vision?
« on: September 13, 2014, 11:16:11 am »
cLion support :D
Support an IDE? SFML works with CLion as I've already shown you here

19
General / Re: Processing User Input
« on: September 11, 2014, 06:44:16 pm »
Well, nothing comes in mind yet but

20
General / Re: Re: clion and sfml?
« on: September 10, 2014, 02:57:41 pm »
Yeah, heard of clion too, I wonder how good it is.

I'm tempted to use it, as I use both MSVC and xcode for the same code. XCode's autocomplete is slow (and I don't like XCode in general), and MSVC2012 doesn't support variadic templates. Since jetbrains support both clang and GCC and gdb, I guess it would be nice. I hope the debugger is as good as MSVC's.

I guess I'll try some day. Although I'm not sure if I'd pay for an IDE. If it's over 30 euros or 30 dollars I don't think I would buy it.

Any C++ jet brain user ?

First question, do you have to recompile SFML ? I guess not, since the SFML libs use stdlib++
I've tried it this morning and it is still lacking a lot of features, I had hoped there would be a stronger CMake integration but you can't even tell the IDE to search for libraries as far as I can tell. You still have to write the CMake file yourself.

21
Graphics / Re: Sprite has unreadable memory (__vfptr)
« on: September 10, 2014, 12:29:47 pm »

22
General / Re: clion and sfml?
« on: September 10, 2014, 10:19:57 am »
Well, it's a powerful tool that lets you set up your project in most of the popular IDEs and helps you a lot when building crossplatform applications.
Here's an example to work with SFML and CLion:

CMakeLists.txt (Documentation)
cmake_minimum_required(VERSION 2.8)
project(forum CXX)
if(WIN32)
    set(SFML_ROOT "$ENV{PROGRAMFILES(x86)}/SFML") # You will probably have to change this
endif(WIN32)
set(CMAKE_BUILD_TYPE Release) #If you have problems check if you have SFML debug libraries or release libraries
find_package(SFML 2.1 COMPONENTS system window graphics REQUIRED)
include_directories(${SFML_INCLUDE_DIR} ${PROJECT_SOURCE_DIR})
set(SOURCE_FILES main.cpp   )
set(HEADER_FILES            )
add_executable(forum ${SOURCE_FILES} ${HEADER_FILES})
target_link_libraries(forum ${SFML_LIBRARIES})
Your main.cpp
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode::getDesktopMode(), "Test");
    while(window.isOpen())
    {
        sf::Event event;
        while(window.pollEvent(event))
        {
            if(event.type == sf::Event::Closed)
                window.close();
        }
    }
    return 0;
}
YOU NEED THE DLLs TO RUN THE PROGRAM AFTER COMPILING IT!

23
General / Re: clion and sfml?
« on: September 10, 2014, 07:36:51 am »
One good thing to do would be learning how to configure projects with CMake as CLion uses it too :D

24
General / Re: Error Handling
« on: September 10, 2014, 07:27:18 am »
If I recall correctly SFML 3 may use exceptions.

25
General / Re: List iterator not incrementable for published event
« on: September 09, 2014, 09:47:28 pm »
void EventBus::unsubscribe(EventSubscriber* eventSubscriber)
{
    std::list<EventSubscriber*>::iterator iterator;
    for (iterator = subscribers.begin(); iterator != subscribers.end(); ++iterator)
    {
        if (*iterator == eventSubscriber)
        {
            subscribers.erase(iterator);
            break;
        }
    }
This should work
void EventBus::unsubscribe(EventSubscriber& eventSubscriber)
{
        subscribers.remove_if([&](EventSubscriber* value){return value == &eventSubscriber; });
}

26
Window / Re: SFML and WXWIDGETS integration
« on: September 09, 2014, 08:11:45 pm »
Sfml 1.6 is like 4 years old don't expect a fix now :D

27
General / Re: undefined reference to ' '
« on: September 08, 2014, 07:59:15 am »
Simply put, YouTube tutorials are to be avoided.

28
Graphics / Re: How do I use Spite Sheets to animate something in C# SFML
« on: September 05, 2014, 07:42:21 am »
You can either learn that a different language shouldn't be an obstacle for a programmer or you can use Thor

29
General / Re: Help on Game Peformance
« on: September 04, 2014, 04:59:09 pm »
Thanks for the tips, I'll try to implement them all  :D

30
General / Re: Help on Game Peformance
« on: September 04, 2014, 08:40:49 am »
I'm interested, do you recommend any algorithm (of the list) in particular?

Pages: 1 [2] 3 4 ... 10