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

Pages: [1] 2 3 ... 34
DotNet / Re: Error loading images/textures
« on: October 11, 2018, 08:08:53 pm »
stb_image (which SFML uses to load images) doesn't support a few kinds of jpeg images as I recall. You might want to check if this is the case.

//    - no 12-bit-per-channel JPEG
//    - no JPEGs with arithmetic coding

Not added to SFML, but you could get the desired behavior with an extension method. And if you're using C# 7 you actually don't need to use unsafe (if not, you'd return Vertex* instead of ref Vertex):
public static class VertexArrayExt
    public static ref Vertex getVertex(this VertexArray va, uint index)
        return ref sfVertexArray_getVertex(va.CPointer, index);

    [DllImport("csfml-graphics-2.dll", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
    private static extern ref Vertex sfVertexArray_getVertex(IntPtr CPointer, uint index);

DotNet / Re: Input detect once
« on: October 06, 2018, 09:17:19 pm »
Can you provide a minimal example?

Audio / Re: Strange Open AL Errors
« on: September 20, 2018, 04:59:25 am »
And how is "that other" class instantiated? Is it statically initialized?

SFML development / Re: C++ standards
« on: September 10, 2018, 12:39:11 am »
Oof, guess I'm blind. Thanks.

SFML development / Re: C++ standards
« on: September 09, 2018, 10:39:17 pm »
Writing unit tests first (which is what we're doing)
Is this on GitHub? I don't see a branch or anything that looks like it at a glance (In the interest of helping, if possible).

SFML development / Re: C++ standards
« on: September 07, 2018, 12:40:10 am »
Everyone talks about std::filesystem but it would be an internal detail, end users wouldn't see any difference. And anyone can already use std::filesystem or anything from C++17 in its own code with a C++03 SFML right now, of course.

std::string_view, how would it deal with sf::String?
Not directly with sf::String. One, although not very important (minor optimization, maybe), place it could be useful would be with sf::Shader::setUniform, which is using const std::string&.

And I don't think it's about C++17 or not, it's more about the features that we need.
Agreed! Plus, if desired, I know CMake has ways of specifying required language/library features which could be useful for identifying supported compilers and whatnot, based on a defined feature-set.

I imagine constexpr-if could be useful for platform specific code.
Not really. SFML has it neatly separated into different impl cpp files. And #ifdefs are still ok for platform specific stuff.

Yeah, as far as I know there's no std::filesystem on the latest XCode on Mac OS X... imagine that.
Oof. I keep hearing things that make me glad I don't have to work that, haha.

SFML development / Re: C++ standards
« on: September 05, 2018, 09:46:51 pm »
I imagine constexpr-if could be useful for platform specific code.

I know I'd find std::string_view and std::filesystem useful as well.

DotNet / Re: Error first project
« on: August 25, 2018, 06:33:02 pm »
Make sure you have all dlls SFML.NET depends on as well - CSFML, SFML, openal, etc.

Network / Re: UDP multiple ports
« on: August 22, 2018, 07:26:07 pm »
Of course, and is relatively common. For example, DNS uses both UDP and TCP (port 53).

Network / Re: UDP multiple ports
« on: August 21, 2018, 06:35:53 pm »
I recommend reading about the differences between both protocols.

But, in general, a (simplified) rule of thumb:

If you need perfect replication of the data (ie: a file), you use TCP.
If not, you can use UDP.

General / Re: Friends can't open my games
« on: August 10, 2018, 09:59:35 pm »
They need to download and install the Visual C++ Redistributable: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads (pick the one matching your version of Visual Studio)

Graphics / Re: Problems with Struct pointers that contain textures
« on: August 04, 2018, 12:04:01 am »
Pretty sure if new wasn't used to allocate for and construct an object, you need to use placement new - not just a call to the constructor.

General / Re: My poor SFML games don't run on a specific PC
« on: July 16, 2018, 08:44:24 pm »
Graphics card?

DotNet / Re: Inheritance question
« on: July 15, 2018, 12:12:21 am »
You've kind of half-answered your own question I think...

As you said, your SGameObject class has a Shape field. So you should be accessing the field's GetSize() method.

As in, box.Shape.GetSize(). Right?

Pages: [1] 2 3 ... 34