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

Pages: 1 ... 21 22 [23] 24 25 ... 40
331
Graphics / Re: sprites are white rectangles
« on: April 24, 2013, 09:07:36 pm »
Allocate textures after the window is open :)
Yeah there can be some issues with allocating the texture before the window creation, but I don't think I've ever had the problem with VS...

You can't create textures before a valid OpenGL context is active. I tought it was created along with the window, in the SFML case :)

332
Graphics / Re: sprites are white rectangles
« on: April 24, 2013, 09:00:05 pm »
Allocate textures after the window is open :)

333
SFML projects / Re: SFML CEF implementation
« on: April 16, 2013, 02:58:41 am »
O.o Your idea sounds pretty awesome! As well as the results! Congratulations on the effort so far!

Also, I think its on-topic to mention Awesomium? Isn't it for the same purposes?

334
Window / Re: Why does SFML with an Opengl 3.0 context draw twice?
« on: April 15, 2013, 12:45:38 pm »
If it worked in Glut but not in SFML, unless something is slipping under the hood its not a driver issue directly for OpenGL 3.0. Must be the compatibility profile that sfml always requests which doesn't work so good in your GPU.

I believe there is nothing you can do about it. SFML contexts were not designed to support latest OpenGL features if im not mistaken.

335
Window / Re: Why does SFML with an Opengl 3.0 context draw twice?
« on: April 14, 2013, 07:22:03 am »
Many things could be wrong but never the glClearColor()!!!

I was looking at your problem trying to come up with an idea about it.. try not rendering the triangle, only clear and display, and check if the background is red or not. Also try to move the clear color to the loop, just for paranoia.

Its very weird because you re doing it right i believe, at least the clear color should work out of the box, its the simplest thing you can do, and there is no other direct way of asking a "red" fill color i believe..

I bet my penny on that your graphics card is not updated or simply is bugged somehow..

336
General / Re: sf::Vector2f limit
« on: April 13, 2013, 08:32:52 pm »
There are no limits for an array size, virtually.

You re probably getting an exception of std::bad_alloc because you re allocating a huge array and you dont have enough contiguous memory free. Try again with less programs open, or check if you have enough RAM, or simply allocate smaller arrays.. you can also divide the particles among multiple smaller arrays instead of a big one.. Try and give us some feedback! :D

337
General discussions / Re: A book on SFML -- looking for author(s)!
« on: April 13, 2013, 02:18:08 pm »
I believe the ebook will be made available in the amazon network, there is a good chance it will be on the kindle. :)

338
General / Re: Loading fonts to a custom surface?
« on: April 10, 2013, 03:32:55 am »
That makes no sense.. Freetype will give you the raw pixel data, SFML uses freetype's raw data to draw text WITH OpenGL.

Take a look at SFML source, namely at Font.cpp and Glyph.cpp I believe.

339
General / Re: mouse click's
« on: April 01, 2013, 04:03:52 pm »
O.o

340
General discussions / Re: A new logo for SFML
« on: March 30, 2013, 11:42:46 pm »
I dont dislike the arrow idea and concept, but looking at that one i dont feel its the right one.. : )

341
SFML projects / Re: Mini Crown
« on: March 27, 2013, 02:53:20 pm »
dat ass!! xDDDDD

It looks ok but there isn't much to do yet xpp Keep up!

342
SFML projects / Re: Platform - The simple platformer game
« on: March 26, 2013, 04:34:40 am »
I also tried your game and it looks very good!! I found it polished enough to actually captivate my attention for a while!! Keep going because you re in the right track :D

343
Graphics / Re: Bug in sf::RenderTexture
« on: March 24, 2013, 03:03:39 am »
See? I'm on shrooms after all :p Sorry, I just didn't know that detail :D

344
Graphics / Bug in sf::RenderTexture
« on: March 24, 2013, 02:30:53 am »
I think i'm not on shrooms but I just found a sick bug in SFML's code.

RenderTexture::RenderTexture() :
m_impl(NULL){}

RenderTexture::~RenderTexture(){
    delete m_impl;
}
 

I think further explanations are not needed.. The fix is easy as well!
delete m_impl;      ->          if(m_impl) delete m_impl;

Since an object of type sf::RenderTexture is not valid until a call to create, whenever an instance of it is deallocated it will cause a crash unless create was called.

Thanks!

345
General / Re: Calculating direction
« on: March 20, 2013, 04:50:30 pm »
I am not sure I understood what you're trying to achieve correctly. If what you want is to know the direction between point A and point B, here are two solutions:

Let's say your point A is at (100,100) and the point B(mouse cursor) is at (200,200) and you want to know programatically what is the direction the point A has to follow to meet point B.

You can get the radian angle between the two with this plug and play function:
float computeAngle(float ax, float ay, float bx, float by){
        return atan2((by - ay), (bx - ax));
};
 

Then compute the direction vector as (cos(angle), sin(angle)).

Or simpler, whenever you have two points, A and B, (A - B) gives you the direction vector between the two. Of course you may need to normalize that resulting vector between using it for calculations!

Hope this helps..

Pages: 1 ... 21 22 [23] 24 25 ... 40
anything