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

Pages: [1] 2
1
Graphics / Can Someone Help With Loading A sprite
« on: September 05, 2011, 02:26:47 am »
If he was missing the dlls then the program would crash when it first tried to create the window, and if his libraries are wrong the program wouldn't build at all. Considering everything else works except the image loading, I suspect there may be an issue with the implementation of libpng in the latest git version.

2
Network / TcpListener not working
« on: January 19, 2011, 01:43:56 am »
Quote from: "Laurent"
Quote
I'm guessing it's probably running the listener stuff in a thread

... and before main(). Man, when such errors happen, try to make your code more "normal" and see what makes it work ;)

They're actually in separate files. But technically, it shouldn't make any difference... or does it? I'll try starting the thread from inside the main function.

And... it works!
You should add this to a FAQ of some sort.
If you're using threads NEVER start them directly in a file. Always start them from within a function.

3
Network / TcpListener not working
« on: January 18, 2011, 10:44:39 pm »
The examples run fine oddly enough.

Code: [Select]
//SFML Networking Library
#include <SFML/Network.hpp>

//Boost
#include <boost/thread.hpp>

void Listener() {
sf::TcpListener listener;
//We don't want our listener to block everything else
if (listener.Listen(30273) != sf::Socket::Done) {
std::cout << "WE FAILED AT LISTENING! FUUUUUUUUUUUUUUUUUU!" << endl;
}
}
boost::thread ListenThread(Listener);

int main() {
while(true){
//Other stuff which doesn't involve networking at all
}
}


I'm guessing it's probably running the listener stuff in a thread which is causing issues. I'll try running it in an sf::Thread and see if that fixes it. Otherwise it looks like I'll have to put the console stuff into a thread and leave the networking as the main part.

4
Network / TcpListener not working
« on: January 18, 2011, 07:05:53 pm »
I have the following code:
Code: [Select]
sf::TcpListener listener;
if (listener.Listen(30273) != sf::Socket::Done) {
std::cout << "WE FAILED AT LISTENING! FUUUUUUUUUUUUUUUUUU!" << endl;
}

And I get the following error messages:
Code: [Select]
Failed to set socket option "TCP_NODELAY" ; all your TCP packets will be buffered
Failed to bind listener socket to port 30273
WE FAILED AT LISTENING! FUUUUUUUUUUUUUUUUUU!

I've tried all sorts of port numbers, and none of them worked.
I know they're open because I checked with netstat.
I'm on Windows 7 64 bit, behind a router that is port forwarded across every single port.
I have no firewalls.
I've never had issues with hosting servers.
I'm using the latest revision of sfml2, statically built.
I'm using Visual Studio 2010 Ultimate.
Any ideas?

5
Feature requests / Update glew
« on: December 18, 2010, 06:17:07 pm »
I remember before it would always give linker errors when I tried to use glew.
But now I just tried linking glew myself and it seems to be working fine.
Odd.
I guess it was fixed since the last time I actually tried linking in Glew myself.
You can ignore this then.

6
Feature requests / Update glew
« on: December 18, 2010, 06:01:14 pm »
Even if you don't need the latest functions, update glew.
SFML's usage of glew conflicts with mine so if I want to use the latest gl functions I have to modify sfml to use the latest glew.
It's a really simple modification to do, but it makes my project undistributable by source code unless I either include the modified sfml libraries or provide instructions on how to edit sfml.

7
General / Quick Question about OpenGL
« on: December 18, 2010, 05:21:39 pm »
Make sure you flipped the texture coordinates, not the vertex coordinates.
If you flip the vertex coordinates the whole primitive faces the other direction and if you have culling enabled (you probably do because you're having this issue), then the texture never gets drawn and you see whatever crap is behind it.

8
General / Quick Question about OpenGL
« on: December 17, 2010, 11:15:44 am »
Don't bother using cube maps.
Load all you sf::Images and then you can do
someimage.Bind();
glBegin(GL_QUADS);
your vertices
glEnd();
anotherimage.Bind();
glBegin(GL_QUADS);
your vertices
glEnd();
and so on

9
General / Quick Question about OpenGL
« on: December 15, 2010, 07:03:43 am »
Okay, first of all, use newlines to separate your questions. A solid chunk of text is hard to read and follow.
Now then...
"Well I am trying to create a class called Block. The blocks are all the same but with different textures."
So they basically have a member variable specifying the texture.
"With the texture is there anyway I can use just sfml to put an image on the block and have it pretty much glued on."
No, sfml does not do that for you. You should give your block class a draw function which binds whatever texture is specified by the texture member variable and then draws your block.
"Also here is my real question, how do i manipulate one shape? The constructor of this class will call all of the verts but if I want to call glrotate3f or gltranslate3f. How would I go about manipulating just that shape? Would I need my own matrix? Or would I just call glMatrixMode(MODEL_VIEW) or whatever it is and then translate."
glPushMatrix
Do your manipulations
Draw the shape
glPopMatrix
"And it would know what shape I am talking about or not?"
OpenGL has no idea what you want. It just does as its told. So you have to make sure you draw the shape after you do the manipulations but before you pop the matrix again.

10
General / SFML failing to initialize in debug mode
« on: December 13, 2010, 09:37:58 am »
I never did the dynamic build before, and I made sure I completely cleared all the old files.
Call stack for release mode
Code: [Select]
ntdll.dll!77ccf861()
  [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
  ntdll.dll!77ccf861()
  KernelBase.dll!75ce0816()
  aticfx32.dll!622c38f9()
  aticfx32.dll!622bf4b3()
  aticfx32.dll!622ca847()
  aticfx32.dll!622b833c()
  aticfx32.dll!622b64bd()
  atigktxx.dll!59361f43()
  atioglxx.dll!6907a4cb()
  atioglxx.dll!69d1db9e()
  atioglxx.dll!69b3aa2a()
  atioglxx.dll!69ba2745()
  atioglxx.dll!69ba2c90()
  atioglxx.dll!69ba2c90()
  atioglxx.dll!69047c65()
  opengl32.dll!57a7b1fb()
  opengl32.dll!57a7b6cd()
  opengl32.dll!57a7b83c()
  opengl32.dll!57a7b8ef()
  sfml-window-2.dll!5a6d4079()
  user32.dll!759e6a8b()
  user32.dll!759ddb47()
  user32.dll!759da619()
  sfml-window-2.dll!5a6d41c0()
  sfml-window-2.dll!5a6d6e8c()
> msvcr100.dll!_initterm(void (void)* * pfbegin, void (void)* * pfend)  Line 873 C
  sfml-window-2.dll!5a6d64de()
  sfml-window-2.dll!5a6d667e()
  sfml-window-2.dll!5a6d674b()
  ntdll.dll!77ce97a0()
  ntdll.dll!77ced749()
  ntdll.dll!77cede27()
  ntdll.dll!77cf6a3e()
  ntdll.dll!77cf5947()
  ntdll.dll!77ce9cc9()


And for debug mode
Code: [Select]
ntdll.dll!77ccf861()
  [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
  ntdll.dll!77ccf861()
  KernelBase.dll!75ce0816()
  aticfx32.dll!622c38f9()
  aticfx32.dll!622bf4b3()
  aticfx32.dll!622ca847()
  aticfx32.dll!622b833c()
  aticfx32.dll!622b64bd()
  atigktxx.dll!588e1f43()
  atioglxx.dll!6907a4cb()
  atioglxx.dll!69d1db9e()
  atioglxx.dll!69b3aa2a()
  atioglxx.dll!69ba2745()
  atioglxx.dll!69ba2c90()
  atioglxx.dll!69ba2c90()
  atioglxx.dll!69047c65()
  opengl32.dll!577eb6cd()
  opengl32.dll!577eb83c()
  opengl32.dll!577eb8ef()
> sfml-window-d-2.dll!sf::priv::WglContext::CreateContext(sf::priv::WglContext * shared, unsigned int bitsPerPixel, const sf::ContextSettings & settings)  Line 291 + 0xf bytes C++
  sfml-window-d-2.dll!sf::priv::WglContext::WglContext(sf::priv::WglContext * shared)  Line 62 C++
  sfml-window-d-2.dll!`anonymous namespace'::`dynamic initializer for 'referenceContext''()  Line 66 + 0xf bytes C++
  msvcr100d.dll!_initterm(void (void)* * pfbegin, void (void)* * pfend)  Line 873 C
  sfml-window-d-2.dll!_CRT_INIT(void * hDllHandle, unsigned long dwReason, void * lpreserved)  Line 284 + 0xf bytes C
  sfml-window-d-2.dll!__DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved)  Line 506 + 0x11 bytes C
  sfml-window-d-2.dll!_DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved)  Line 476 + 0x11 bytes C
  ntdll.dll!77ce97a0()
  ntdll.dll!77ced749()
  ntdll.dll!77cede27()
  ntdll.dll!77cf6a3e()
  ntdll.dll!77cf5947()
  ntdll.dll!77ce9cc9()

11
General / SFML failing to initialize in debug mode
« on: December 13, 2010, 08:47:09 am »
I followed the SFML 2 tutorial exactly for building using visual studio 2010 with cmake.
It built perfectly.
Then I opened a new project, and linked the following libraries
sfml-window.lib
sfml-system.lib
sfml-graphics.lib
sfml-audio.lib
sfml-network.lib
With -d for debug mode
I didn't define any preprocessor directives or mess with anything.
I had all the dlls included in the project directory like I do with dll's in other projects.
I created my main.cpp with my main function and included
#include <SFML/OpenGL.hpp>
#include <SFML/Graphics.hpp>
Then when I tried to make a simple window, whether its a renderwindow, or just a plain old window, with all sorts of various settings, the program would get stuck without even executing the main function.
I tried both console and non-console and neither worked.
I added in sfml-main.lib and also glu32.lib and opengl32.lib, and it still didn't work.
But switching to static libraries like I use normally, instantly fixed everything.
I have absolutely no idea what's going on wrong.
Also, I'm on an AMD64 computer, but I'm building everything in 32 bit.
As far as I can tell, the ONLY differences are that I unchecked the box for shared stuff in cmake, I added -s to the library names, and I added the SFML_STATIC macro.

12
General / SFML failing to initialize in debug mode
« on: December 13, 2010, 06:30:56 am »
Got the latest version of sfml2 from the svn just this night.
Everything built properly for vc++ 2010
Made a project, included headers and linked libraries as usual.
When I run it, the console window opens, but nothing happens.
I paused the program and noticed it hadn't even reached the main function yet.
It was stuck at
myContext = wglCreateContext(myDeviceContext);
on line 291 of WglContext.cpp
Strangely, release mode still works fine. Only debug mode fails.
My program doesn't do anything yet, its just a main function that returns.
I have an ATI Radeon 3200 with the latest drivers.
Until this gets fixed, it looks like I'm stuck with release mode. It'd be nice to be able to debug my program though...

EDIT: Now when I try to add a window, the program fails again, even in release mode.
It gets stuck at
++pfbegin;
on line 873 of crt0dat.c
Now I'm stuck, unable to do anything.

EDIT: I switched to using static libraries and it seems all my problems have vanished. Still, you should probably investigate why dynamic is causing issues.

13
Feature requests / OpenEXR Support?
« on: October 10, 2010, 06:22:34 pm »
I already have all the special processing stuff setup and ready to use. All I need is to be able to load .exr images and my system is good to go.
Since it doesn't seem like you're interested in expanding sfml beyond basic 2d stuff I'll implement it myself...

14
Feature requests / OpenEXR Support?
« on: October 10, 2010, 07:00:42 am »
I'd love to have support for loading .exr images
http://www.openexr.com/index.html
Basically, with a .exr image you can have 16 bits per color or even 32 bits per color, in both integer and floating point, thereby allowing a HUGE range of colors.

15
Graphics / Shaders?
« on: January 17, 2010, 07:39:38 am »
I've been messing around with shaders a little and it seems that fragment shaders don't work per fragment of the primitives I draw like in normal OpenGl, but rather apply to the fragments of the framebuffer.
If I want a shader to apply only to a specific primitive, does this mean I have to utilize OpenGL to create shaders?
If so, I have a further question...
Since OpenGL textures are not the same data type as SFML images, how would I get an OpenGL texture out of an image I load?

Pages: [1] 2
anything