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

Pages: [1]
1
Graphics / Cannot draw text, linker errors in debug mode, other in rls
« on: January 16, 2012, 03:06:01 pm »
The graphics card and OS are Asus GTX470 and Windows 7, but i don't think thats relevant. I'm using the latest static sfml 2.0. I'm not showing all the relevant code, but i think that might be the problem ( sorry ). If i call the CTextRenderer::Draw from main, it will work, however if i call it from another class' instance, the following will happen.

2
Graphics / Cannot draw text, linker errors in debug mode, other in rls
« on: January 16, 2012, 02:38:31 pm »
I cannot happen to draw text in my class. I have the following function:
Code: [Select]

void CTextRenderer::Draw(sf::RenderWindow* window){
std::map<std::string, sf::Text*>::iterator it;
for(it=members.begin(); it != members.end(); it++){
window->Draw(*(it->second));
}
}

If i run this code in debug configuration, i get the following error:
Code: [Select]

CTextRenderer.obj : error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)

If i run it in release configuration, i get the following:
Code: [Select]

Unhandled exception at 0x59e04412 in SpaceCraft.exe: 0xC0000005: Access violation reading location 0x00000004.

I'v been banging my head against this and can't figure out what's the problem.

3
General / Drawing text
« on: November 04, 2011, 12:20:03 pm »
Oh, okay. Thanks for the quick response by the way!

4
General / Drawing text
« on: November 04, 2011, 12:07:11 pm »
Hey guys,

i am wondering whether creating text element every frame is a viable option, this is what i mean:

Code: [Select]

void OnDraw(){
sf::Text text("The quick brown fox jumps over the lazy dog.", font, 72);
text.SetPosition(30.0f, 40.0f);
window->Draw(text);
}



Pages: [1]