CSFML icon indicating copy to clipboard operation
CSFML copied to clipboard

Missing functions addition

Open Luhrel opened this issue 5 years ago • 14 comments

I added some functions that were not implemented in CSFML. I also modified sfTexture_bind, with an sfTextureCoordinateType arg.

Modified: sfTexture_bind (Added sfTextureCoordinateType arg)

Added: sfTextureCoordinateType sfContext_isExtensionAvailable sfContext_getFunction sfRenderWindow_drawVertexBufferRange sfRenderTexture_drawVertexBufferRange sfTcpListener_close

Luhrel avatar Nov 22 '19 21:11 Luhrel

There's a reason why some of these functions are not implemented. They are either for internal use (when it's the case, they are clearly documented as such) or not needed in C because of the API differences.

Of course, some functions may also simply be missing, most likely those that were added recently 😉

LaurentGomila avatar Dec 27 '19 08:12 LaurentGomila

Yup I know and I didn't implemented those, did I ? Which funcs (in this PR) aren't needed in C ?

Luhrel avatar Dec 27 '19 08:12 Luhrel

sfTcpListener_close is not needed since you just free (sfTcpListener_destroy) the instance when you're done with it.

sfTextureCoordinateType and where it's used, were initially meant for internal use only. I'm not sure if that changed since then.

LaurentGomila avatar Dec 27 '19 15:12 LaurentGomila

sfTcpListener_close is not needed since you just free (sfTcpListener_destroy) the instance when you're done with it.

Ok, but should we add it anyway for the other SFML bindings (which are based on CSFML) ?

sfTextureCoordinateType and where it's used, were initially meant for internal use only. I'm not sure if that changed since then.

The doc just says :

[...] [sf::CoordinateType::Pixels] is used internally by the graphics classes of SFML, it makes the definition of texture coordinates more intuitive for the high-level API, users don't need to compute normalized values.

So it may be used.

Luhrel avatar Dec 27 '19 22:12 Luhrel

Ok, but should we add it anyway for the other SFML bindings (which are based on CSFML) ?

Nop.

LaurentGomila avatar Dec 28 '19 06:12 LaurentGomila

@LaurentGomila how about the VertexBuffer functions? Would they be accepted if they were isolated in their own PR?

silverweed avatar May 07 '20 16:05 silverweed

Is sf::VertexBuffer part of the latest version, or does it have to be released yet (I really don't remember 😁)?

LaurentGomila avatar May 07 '20 16:05 LaurentGomila

It's surely there in SFML 2.5 :D

silverweed avatar May 07 '20 17:05 silverweed

Then OK, it should be in CSFML and SFML.Net too.

LaurentGomila avatar May 07 '20 19:05 LaurentGomila

Ok, cool :) @Luhrel, would you rather split your PR or let me reopen mine (#153)?

silverweed avatar May 07 '20 19:05 silverweed

@silverweed There's no need to split/reopen. All the functions in this PR are for the 2.5.

@LaurentGomila Which name do you prefer sfRenderTexture_drawVertexBufferWithIndex or sfRenderTexture_drawVertexBufferRange ?

Luhrel avatar May 07 '20 20:05 Luhrel

I'd say sfRenderTexture_drawVertexBufferRange.

LaurentGomila avatar May 08 '20 06:05 LaurentGomila

@LaurentGomila Done. Maybe you can merge this now :wink:

Luhrel avatar May 08 '20 09:05 Luhrel

@LaurentGomila any news on this?

silverweed avatar Jul 27 '20 13:07 silverweed

Allowed myself to integrate the last commit in the relevant commits and rebase, as the pipeline was slightly outdated 😅

eXpl0it3r avatar Oct 27 '22 20:10 eXpl0it3r

Thanks a lot for these fixes and the patience. 🥳

Sorry again it took so long 😞

eXpl0it3r avatar Oct 27 '22 20:10 eXpl0it3r