Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing functions addition #148

Merged
merged 5 commits into from
Oct 27, 2022
Merged

Missing functions addition #148

merged 5 commits into from
Oct 27, 2022

Conversation

Luhrel
Copy link

@Luhrel Luhrel commented Nov 22, 2019

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

@LaurentGomila
Copy link
Member

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 😉

@Luhrel
Copy link
Author

Luhrel commented Dec 27, 2019

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

@LaurentGomila
Copy link
Member

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.

@Luhrel
Copy link
Author

Luhrel commented Dec 27, 2019

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.

@LaurentGomila
Copy link
Member

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

Nop.

@silverweed
Copy link

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

@LaurentGomila
Copy link
Member

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

@silverweed
Copy link

It's surely there in SFML 2.5 :D

@LaurentGomila
Copy link
Member

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

@silverweed
Copy link

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

@Luhrel
Copy link
Author

Luhrel commented May 7, 2020

@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 ?

@LaurentGomila
Copy link
Member

I'd say sfRenderTexture_drawVertexBufferRange.

@Luhrel
Copy link
Author

Luhrel commented May 8, 2020

@LaurentGomila Done. Maybe you can merge this now 😉

@silverweed
Copy link

@LaurentGomila any news on this?

Copy link
Member

@eXpl0it3r eXpl0it3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really sorry for the long wait on this 😓

Can you squash the two vertex buffer commits and fix the small style changes?

@eXpl0it3r
Copy link
Member

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

@eXpl0it3r eXpl0it3r merged commit 8d14b53 into SFML:master Oct 27, 2022
@eXpl0it3r
Copy link
Member

Thanks a lot for these fixes and the patience. 🥳

Sorry again it took so long 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants