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

Pages: 1 ... 4 5 [6] 7 8 ... 13
76
Graphics / GL_INVALID_VALUE, when using SaveGLStates
« on: November 17, 2011, 07:17:32 pm »
Im using SFML 2.0 and im trying to use pure OpenGL with SFML stuff
however when I draw stuff and then use SaveGLStatess I get an error:
Quote

An internal OpenGL call failed in Renderer.cpp (77) : GL_INVALID_VALUE, a numeric argument is out of range


Renderer.cpp 77 is(first line in SaveGLStates):

Code: [Select]
GLCheck(glPushAttrib(GL_ALL_ATTRIB_BITS));

The last thing I do before calling saveStates is:

Code: [Select]
void d3Sprite::Draw()
{

    glEnableVertexAttribArray(positionID);
glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
glVertexAttribPointer(
  positionID,                  
  3,                  // size
  GL_FLOAT,           // type
  GL_FALSE,           // normalized?
  0,                  // stride
  (void*)0            // array buffer offset
);
 
glUseProgram(shader.shaderID);

    glUniformMatrix4fv(MatrixID, 1, GL_FALSE, &MVP[0][0]);
// Draw the triangle !
    glDrawArrays(GL_TRIANGLES, 0, 6); // Starting from vertex 0; 6 vertices total -> 2 triangles

    glDisableVertexAttribArray(positionID);

}

77
SFML projects / [Released] libMy - Datapackaging library
« on: November 14, 2011, 03:33:00 am »
What exactly are its dependencies on boost?
Would it be possible to make it use zlib?

78
Graphics / Green lines around text
« on: November 09, 2011, 04:11:46 pm »
Just a minor update, I was doing some testing on my desktop today and i just noticed the lines dont show up.
Now given the amount of threads there are saying the graphics system is buggy on intel cards I think this could be the problem

79
General / OpenGL / GLSL versions in SFML 2.0 ?
« on: November 07, 2011, 05:13:53 pm »
Using this table
Code: [Select]

GLSL Version              OpenGL Version
1.10.59                     2.0
1.20.8                      2.1
1.30.10                     3.0
1.40.08                     3.1
1.50.11                     3.2
3.30.6                      3.3
4.00.9                      4.0
4.10.6                      4.1
4.20.6                      4.2

You can get the current OpenGL version used with:

Code: [Select]
std::cout << "Using OpenGL " << App.GetSettings().MajorVersion << "." << App.GetSettings().MinorVersion << std::endl;

And write the shader code that is supported by the openGL version

80
Graphics / Green lines around text
« on: November 06, 2011, 07:37:20 am »
I tried it with 2 custom fonts as well as the default font, and they all have the same problem once the size gets big enought (by that I mean >50

81
Graphics / Green lines around text
« on: November 05, 2011, 11:29:36 pm »
Using the sf::Text I am getting weird lines around the text, this happens when I use big font sizes



I tried setting it to a small size and then scaling it but it just makes the text fuzzy and there is no option to set smoothing on.


82
Graphics / sf::Image heap corruption
« on: November 05, 2011, 06:23:09 pm »
I have tried my application on my desktop with an ATI card and I didnt get any errors so it seems its due to intel drives, which is very anoying :/

83
Graphics / sf::Image heap corruption
« on: November 05, 2011, 02:28:32 pm »
Managed to trim it down to this and still get the error:


Code: [Select]
#include <SFML/Graphics.hpp>
#include <iostream>

int main()
{

sf::RenderWindow App;
sf::Sprite backGroundSprite;
sf::Image backgroundTexture;

App.Create(sf::VideoMode(800, 600, 32), "Window");

App.PreserveOpenGLStates(true);

backgroundTexture.LoadFromFile("./Data/MenuBackground.png");
backGroundSprite =  sf::Sprite();
backGroundSprite.SetImage(backgroundTexture);

while(App.IsOpened())
{
sf::Event Event;
while (App.GetEvent(Event))
{
if (Event.Type == sf::Event::Closed)
App.Close();
}

App.SetActive();
App.Clear();

App.Draw(backGroundSprite);

App.Display();
}
}


However if I comment out the

Code: [Select]
App.PreserveOpenGLStates(true);

I dont get heap corruption

84
Graphics / sf::Image heap corruption
« on: November 05, 2011, 02:14:03 pm »
I managed to recreate the problem with this code, it mixes pure openGL and sfml as I need to be able to use both with my app.

Code: [Select]
#include <GL/glew.h>
#include <SFML/Graphics.hpp>
#include <iostream>

int main()
{

sf::RenderWindow App;
sf::Sprite backGroundSprite;
sf::Image backgroundTexture;

sf::Sprite backGroundSprite2;
sf::Image backgroundTexture2;

sf::WindowSettings Settings;
Settings.DepthBits         = 24; // Request a 24 bits depth buffer
Settings.StencilBits       = 8;  // Request a 8 bits stencil buffer
Settings.AntialiasingLevel = 2;  // Request 2 levels of antialiasing

App.Create(sf::VideoMode(800, 600, 32), "Window", sf::Style::Close ,Settings);

App.UseVerticalSync(true);

App.ShowMouseCursor(false);

App.PreserveOpenGLStates(true);

GLenum err = glewInit();
if (GLEW_OK != err)
{
/* Problem: glewInit failed, something is seriously wrong. */
std::cout << "Error: " << glewGetErrorString(err) << std::endl;
return false;
}
else
{
std::cout << "Using GLEW " << glewGetString(GLEW_VERSION) << std::endl;
}

glEnable(GL_DEPTH_TEST);
// Accept fragment if it closer to the camera than the former one
glDepthFunc(GL_LESS);
// Cull triangles which normal is not towards the camera
glEnable(GL_CULL_FACE);

backgroundTexture.LoadFromFile("./Data/MenuBackground.png");
backGroundSprite =  sf::Sprite();
backGroundSprite.SetImage(backgroundTexture);
backGroundSprite.SetPosition(0.f,0.f);
sf::Vector2f scale;
scale.x = float(App.GetWidth()) / backGroundSprite.GetImage()->GetWidth();
scale.y = float(App.GetHeight()) / backGroundSprite.GetImage()->GetHeight();
backGroundSprite.SetScale(scale);

float time = 0.0f;

while(App.IsOpened())
{
sf::Event Event;
while (App.GetEvent(Event))
{
// Close window
if (Event.Type == sf::Event::Closed)
App.Close();

// Escape key pressed
if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
App.Close();

if (Event.Type == sf::Event::Resized)
glViewport(0, 0, Event.Size.Width, Event.Size.Height);
}

if(!App.IsOpened())  break;

time += App.GetFrameTime();

App.SetActive();
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// Dark blue background
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);


glDisable(GL_CULL_FACE);
glDisable(GL_DEPTH_TEST);

App.Draw(backGroundSprite);

glEnable(GL_CULL_FACE);
glEnable(GL_DEPTH_TEST);

App.Display();
}
}

85
Graphics / sf::Image heap corruption
« on: November 05, 2011, 01:57:45 pm »
Hi, I seem to have developed a problem, when closing my app I get a heap corruption error from the Image destructor.
I remember seeing that this was a fault some time ago but I thought it was fixed.
I also read that it could be an error due to me having intel graphics.
It happens with both the 1.6 version and 2.0

The program im using is quite complex but I will try and recreate the error in a simple app

86
Feature requests / Switching styles on the go
« on: September 30, 2011, 05:44:52 pm »
Well I think Ogre provides this ability, I know its not the same but I imagine it must be possible some way

87
Feature requests / Switching styles on the go
« on: September 30, 2011, 04:03:44 am »
Would it be bossible to alow switching th window style (from windowed to fullscreen) without having to recreate the window and thus without loosing the openGL context?

Also allowing to resize the context/

88
General / Getting mouse wheel value
« on: September 28, 2011, 03:11:16 pm »
Hi, i was wondering if SFML gives you the ability to access the mouse wheel value?

89
Feature requests / SFML on IndieDB?
« on: September 26, 2011, 04:28:14 pm »
Couple more stuff you can add, these were made with SFML.Net, not by me

Froid


And Space Hazzard - http://www.facepunch.com/threads/1108925

90
Feature requests / SFML on IndieDB?
« on: September 24, 2011, 03:55:30 pm »
Im sure I saw the SFML dll's with it, just download the demo and see if their there

Pages: 1 ... 4 5 [6] 7 8 ... 13