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

Pages: [1]
1
General / Re: Cryptic error when trying to load texture from file
« on: February 14, 2018, 01:00:14 am »
Ooops... Sorry... Can't call non const qualified functions on const objects....

2
General / [Solved] Cryptic error when trying to load texture from file
« on: February 14, 2018, 12:04:09 am »
Hey there,
When trying to load a font, compiler tells me:
Code: [Select]
error: passing 'const sf::Texture' as 'this' argument of 'bool sf::Texture::loadFromFile(const string&, const IntRect&)' discards qualifiers [-fpermissive]Here's the offending code:
if(!this->Start_Button_Texture.loadFromFile("StartBTN200x100.png", sf::IntRect(0, 0, 200, 100))){
        //Err
    }

This is the first error the compiler spits out.

By the way, I'm compiling for Android armeabi (Target) on Windows 10 (Host).

3
General / Re: Error Compiling SFML for android with Visual Studio
« on: February 13, 2018, 11:57:24 pm »
Well you see.... I do have the community edition...   Guess I'll have to reinstall Visual Studio  >:(...

For the time being I got it to compile using the following steps:

Follow the Tutorial right up before the cmake step.

Follow the steps here just to compile cmake

Set the cmake path variable to the bin folder of the above step. If you want to use the examples then add the
Code: [Select]
SFML_COMPILE_EXAMPLES flag.

Run the cmake step in the SFML-for-Android tutorial

Use
Code: [Select]
nmake && nmake install
Go to [ndk-path-here]\source\sfml and add this line:
Code: [Select]
TARGET_ARCH_ABI := armeabi between
Code: [Select]
LOCAL_PATH := $(call my-dir) and
Code: [Select]
include $(CLEAR_VARS)
Now go to the android example folder and the example compilation steps on the tutorial page should work.

Result should be in android/bin/NativeActivity-debug.apk.

[PS. I did all of this in a separate partition, so I had to set a few environment variables myself.]

4
General / Re: SFML for Android
« on: February 12, 2018, 03:12:26 am »
I installed make for windows from here

Then I set my path and tried to run
Code: [Select]
make
but now I get:
Code: [Select]
makefile:37: *** missing separator.  Stop. which corresponds to this piece of code:
Code: [Select]
32 #=============================================================================
33 # Set environment variables for the build.
34
35 !IF "$(OS)" == "Windows_NT"
36 NULL=
37 !ELSE
38 NULL=nul
39 !ENDIF
40 SHELL = cmd.exe

I have looked around and it seems to be a problem with white space and tabs, but I'm unsure.




I then used
Code: [Select]
nmake -f Makefile  and
Code: [Select]
nmake install but now I'm unsure about how to use this... :-\  :(  :'(

5
General / Re: SFML for Android
« on: February 12, 2018, 02:22:16 am »
Hey there, I got past the step that requires 'Nsight Tegra VS Edition', by following the steps here: https://blogs.msdn.microsoft.com/vcblog/2015/12/15/support-for-android-cmake-projects-in-visual-studio/ and then setting my cmake path to the bin folder!

6
General / Error Compiling SFML for android with Visual Studio
« on: February 10, 2018, 03:44:30 pm »
Hi there, I was trying to compile SFML following this link: https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android

I installed all of the dependencies and then I rebooted my computer. I followed every step until I got to the cmake command.  In this case I get this error:
Code: [Select]
CMAKE_SYSTEM_NAME is 'Android' but 'NVIDIA Nsight Tegra Visual Studio Edition'I looked it up and found out I had to install 'NVIDIA Nsight Tegra Visual Studio Edition' at https://developer.nvidia.com/nvidia-nsight-tegra

But the problem is that this requires Visual studio Professional and I only have Express  :-\. What can I do? :'(

7
DotNet / Re: C# Port for Particle system example
« on: November 21, 2017, 12:55:16 am »
A Cleaned up and working version is available at https://pastebin.com/3bXMX8in

8
DotNet / Re: C# Port for Particle system example
« on: November 21, 2017, 12:47:48 am »
Oh goodness how stupid I am....
I use an unused variable named count, and not the iterator index...
Wow...

9
DotNet / Re: C# Port for Particle system example
« on: November 18, 2017, 11:10:37 pm »
Any Ideas? Anyone?  :'(

10
DotNet / Re: C# Port for Particle system example
« on: November 11, 2017, 10:04:07 pm »
I rewrote the update function to be more readable, here is the new code:
public void Update(Time Elapsed, Random R)
        {
            uint count = 0;
            foreach(var b in m_particles)
            {
                var temp = m_vertices[count];
                b.lifetime -= Elapsed;
                if (b.lifetime <= Time.FromSeconds(0))
                {
                    float Angle = ((R.Next() % 360) * 3.14159f) / 180;
                    float Speed = ((R.Next() % 50) + 50);
                    b.velocity = new Vector2f((float)Math.Cos(Angle) * Speed, (float)Math.Sin(Angle) * Speed);
                    b.lifetime = Time.FromMilliseconds((R.Next() % 2000) + 1000);
                    temp.Color = Color.White;
                    temp.Position = m_emitter;
                }
                temp.Position += b.velocity * Elapsed.AsSeconds();
                float ratio = b.lifetime.AsSeconds() / m_lifetime.AsSeconds();
                temp.Color.A =255;
                m_vertices[count] = temp;
            }
        }

11
DotNet / Re: Noob question
« on: November 10, 2017, 01:13:45 pm »
Try this:
    Make sure that the csfml binaries are included in your project and set to copy to output.
    Also make sure that the csfml libraries are the same architecture as your sfmlnet binaries.
   

12
DotNet / Re: C# Port for Particle system example
« on: November 09, 2017, 11:56:51 pm »
Ok, just tested, and found out that the alpha value goes from 255 to 0 in the first frame. Might it be because of the statement on line 97 because of ratio being to small?

13
DotNet / Re: C# Port for Particle system example
« on: November 09, 2017, 01:23:01 pm »
Not sure, will have to test later in the day. Thanks.

14
DotNet / C# Port for Particle system example
« on: November 09, 2017, 03:06:32 am »
I have taken the code from https://www.sfml-dev.org/tutorials/2.4/graphics-vertex-array.php at the bottom of the page and translated it into its C# equivalent, but I can't seem to find the error; it doesn't output anything to the screen, and it is just black (The screen clear is black). https://pastebin.com/pF40bKaA is where I have pasted my code. 
I am sorry for any stupid mistakes I made in the "translation" as though I know basically nothing about C++ in specific. Thanks!

Pages: [1]
anything