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.


Topics - bananu7

Pages: [1]
1
Graphics / sf::Image private member "myTexture"
« on: December 01, 2011, 05:24:08 pm »
I am using sf::Image as a texture class. However, my implementation of resource manager makes calls to Bind() very unefficient.

I wanted to remember the texture number in some of my drawing calls, but got an unpassable problem - private.

I am not using sf::Image directly; I created my own wrapper class.
However, I wasn't able to access this field because I can't get access to it.

I used following code as a workaround, I'd however be very happy to see some of the private variables changed to protected or be given accessors in new API.

Code: [Select]
#define private protected
#include <SFML/Graphics/Image.hpp>
#define private private


//EDIT : this code, surprisingly, didn't work. I just edited the Image.hpp file and changed this.

2
Graphics / [SOLVED] sf::Text messed up with OpenGL calls.
« on: October 13, 2011, 11:09:09 am »
First of all : if there is topic already covering this problem, please PM me a link and delete the thread.

If not :
Laurent, you wrote someday that in order to keep this working, one needs to
"(...) call SaveGLStates/RestoreGLStates around SFML code."

I am using many OpenGL functions beside SFML, and was wondering, what does sf::Text actually need to be displayed properly?

I'm pretty certain that GL_TEXTURE_2D must be enabled, but what else? I'd like to skip all the unnecessary state preserves, since they would be used probably only in this one particular point of my code.

I won't be sending my code examples, since it changes so much in OpenGL states (i'm using native 4.0 shaders, for example) that it won't give much help anyway.

3
Network / SFML-Network and Visual Studio 2010 (Win 7 x64)
« on: October 05, 2010, 05:24:21 pm »
Hi!
I've been trying to integrate SFML with my code. It worked perfectly, but only in Debug mode. When I switched to release (and played with libs for a while) it compiled successfully, but the program breaks at SocketTCP::Connect. My guess is that there's something wrong with Release SFML code. I've compiled the libs and dlls again from provided .sln, but it did't change a thing. Maybe someone has already encountered this error?
Bajtek.

Pages: [1]
anything