Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: OpenGL Bind() deprecated?  (Read 2135 times)

0 Members and 1 Guest are viewing this topic.

Brendon

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
    • http://blendogames.com
OpenGL Bind() deprecated?
« on: May 10, 2013, 01:59:45 am »
I'm trying out dotnet SFML2, and am running into an OpenGL issue. Do Textures no longer have a "bind()" call? I'm attempting to call "myTexture.bind();", but "bind()" seems to no longer exist.

Is this a change in the API, or is the dotnet binding perhaps missing this call?

FRex

  • Hero Member
  • *****
  • Posts: 1841
  • Not doing gamedev/using SFML lately
    • View Profile
    • Email
Re: OpenGL Bind() deprecated?
« Reply #1 on: May 10, 2013, 02:22:21 am »
Yes, there was a change:
http://www.sfml-dev.org/documentation/2.0/classsf_1_1Texture.php#ae9a4274e7b95ebf7244d09c7445833b0
DotNet has something similar now because there was release of 2.0 recently.
There's a static method that takes null or texture:
public static void Bind(Texture texture)
{
        sfTexture_bind(texture != null ? texture.CPointer : IntPtr.Zero);
}
« Last Edit: May 10, 2013, 02:28:20 am by FRex »
I'm not using SFML nor doing any gamedev lately.

Brendon

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
    • http://blendogames.com
Re: OpenGL Bind() deprecated?
« Reply #2 on: May 10, 2013, 03:38:02 am »
Thanks for the help, FRex. It works great now.

Here's how the code ended up looking:
Texture.Bind(myTexture);

 

anything