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

Pages: [1]
1
Graphics / upside-down textures in OpenGL
« on: June 03, 2009, 11:33:53 am »
The most effective thing would be to create separate inherited sf::Image class like, sf::GLimage with changed function(s), but since that really isn't needed, you could rather provide argument option in existing function like GL_TEXTURE to put in Load...Image or wherever, default to be none, or new function like CreateGLTexture which won't be private, I would go for an argument, since you won't have to recreate texture
anyway, this should be simple and understandable, so now we wait ;)

2
Graphics / upside-down textures in OpenGL
« on: May 31, 2009, 08:35:46 pm »
Ok, I'll put it this way
I'm programming in opengl for about five years now and this is my "job", so I'm pretty sure that origin is at bottom left,
you can see it in superbible 1,2,3 and 4th editiion, in beginning opengl game programming on page 151, the offical guide to learning opengl version 2.1 6th edition on page 378, OpenGL Graphics
Through Applications page 171, 175

But actually don't mind that, my question is, where have you seen it as being applied to top left? This is first time that I hear about that, truly :)

The mapping process involves moving from the texture space to the Cartesian space, and origin is defined as bottom left in both scenarios

3
Graphics / My Text and All Scene Gone ...
« on: May 30, 2009, 08:48:25 pm »
I see it's not solved, I made this minimalist example witch should reproduce  the same behavior ( It works for me)

Code: [Select]


glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

glLoadIdentity();

sf::String sText("Text");
sText.SetPosition(100, 100);
GameApp.Window.Draw(sText);

gluLookAt(...);

GameApp.mdRoom.Draw(); //Draws a model...or not :)



but if we put it like this

Code: [Select]


glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

glLoadIdentity();

sf::String sText("Text");
sText.SetPosition(100, 100);
GameApp.Window.Draw(sText);

gluPerspective(45.0f,(GLfloat)SCREEN_WIDTH/(GLfloat)SCREEN_HEIGHT,0.1f,1000000.0f);

gluLookAt(...);

GameApp.mdRoom.Draw(); //Draws a model...or not :)



It works almost correctly (everything what is drawn is in front of text but we haven't pushed stack so just forget it), so it can be problem in zFar parameter of gluPerspective function, but sometimes I had something drawn no matter where it was so it could be also zNear, anyway, you could investigate and see where the problem lies, and then fix it

preserveopenglstate doesn't have any effect on this

Peter

4
Graphics / upside-down textures in OpenGL
« on: May 30, 2009, 02:05:54 pm »
Yes, this should be fixed in sfml
I came across it few weeks ago when I was porting part of my framework for another project to sfml, but, because I have my own implementations for every operation I need, I fixed it as easy as changing variable v to -v, better explained

Code: [Select]

glTexCoord2f(pVertex->u,pVertex->v);

(obviously, I use triangles in my rendering code)

I found a number of "misunderstandings" but they hardly make me any problem, because I don't depend on sfml functions, but I'll post all of them when I find time for it,
anyway, it's a really good library, and I'm impressed, I hardly ever used another library than my knowledge for writing portable applications and "universal" functions but I could use half of them from sfml to change mine  

great work, keep up ;)

5
General / Problems with the Debug libraries
« on: April 19, 2009, 12:06:32 pm »
You're probably using wrong version with wrong settings
If you want to use debug libraries you have to set your compiler to debug (then it will automatically make needed changes)

For instance,

Project->Properties->Configuration Manager -> Configuration >> Debug
and then down in Linker -> Input you should get

sfml-main-d.lib
sfml-window-s-d.lib
sfml-system-s-d.lib

and if you change it to Release you should get

sfml-main.lib
sfml-system-s.lib
sfml-window-s.lib

Hope it help,

Cheers

Pages: [1]
anything