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

Pages: [1]
1
General / Re: Problem with constructors - game development
« on: September 10, 2015, 07:56:19 am »
my 2 cents..

I started completely noob like too.. if it was'nt for a few patient souls telling me things i could not grasp at first i would not have gotten better... so i have a idiom, i just answer the question.

i think hengad's post was just find he did'nt understand why and actually neither did i but i do now! I knew you could change value after passing in a reference but not that constructors were not triggered. And to be honest i need to go through the one good c++ book i have on kindle and read it!!!

But i say A.T.Q, just answer. the. question.

so sorry about ranting i just felt i had to..


2
General / opengl drivers automaticly optimize attributes?
« on: January 29, 2015, 03:05:29 am »
Hello sfml users!!

i was working again on my sfml 2.2 project in linux and was having trouble getting opengl to recognize my normal attribute was that there! So i dug around and found a stack overflow topic about the 1281 errors i was getting and my normal attribute was putting out a -1 for a value.. So i found out like the title suggested that mesa drivers optimize the atttributes so what do if i can't use more attributes than 1 for opengl 2.0?

So i'm wondering if you guys have found a workaround for this..
I'm thinking that i could use uniform values? for my normals but i'm not sure about this....

how would i use a vbo to do this i wonder? or is it impossible and if so then use gluniform3fv???

anyway i wanted to get somebody experiences with this, that it is right that i need to use gluniform!

3
General / Re: Graphic is bugging because of sf::Clock
« on: October 19, 2013, 05:42:11 am »
hello, i think i know what moin is talking about.

you just need to enable vertical sync just before window.display() call
with the  window.setVerticalSyncEnabled(true) function

i see he has the vertical refresh rate value already put in too....
 

4
Window / Re: Why does SFML with an Opengl 3.0 context draw twice?
« on: April 15, 2013, 04:48:33 pm »
hello again,
@exploit3r
Sorry about the errors i was playing around with it when i posted. I fixed the errors and yes it does produce yellow screen.

Since i am a noob and don't want to hijack this thread i will bow out. But i was puzzling over why i could'nt follow my opengl  book
like i thought i could and use sfml to create windows, matjoeman was doing and thought maybe there was something i could
contribute.

Anyway i switched over to linux mint 14 nadia and still am puzzled. at my individual problem. but i will post another thread if i have troubles later.

5
Window / Re: Why does SFML with an Opengl 3.0 context draw twice?
« on: April 15, 2013, 10:32:43 am »
i get something very similar to matjoeman's problem with the same type of opengl functions.

I'm using ubuntu 13.04 beta and have updated my ATI drivers to 13.3 beta..
Seeing his post i set the opengl version to 2.1 like he did but got no improvements.  Here is my code
#include<SFML/Window.hpp>

#include<GL/gl.h>
#include<SFML/OpenGL.hpp>


int main()
{
    sf::ContextSettings settings;
    settings.majorVersion = 1;
    settings.minorVersion = 1;
    settings.depthBits = 24;
    settings.stencilBits = 8;

        sf::Window window(sf::VideoMode(1024,768,), "OpenGL Fullscreen Window",sf::Style::Fullscreen);
        window.setVerticalSyncEnabled(true);

        bool running = true;
         while (running)
     {
         // Process events
         sf::Event event;
         while (window.pollEvent(event))
         {
             // Close window : exit by pressing x button on window
             if (event.type == sf::Event::Closed)
                                {
                                        running = false;
                                }
            if(event.key.code == sf::Keyboard::Escape)//close by
             // hitting escape key
                                {
                                running = false;

                                }


            if (event.type == sf::Event::Resized)//resizing
                                {
                                 glViewport(0,0,event.size.width,event.size.height);
                                }
            }

        glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
        //glClearColor(1.0f,0.0f,0.0f,1.0f);
        glColor3f(1.0f,1.0f,0.0f);
        glRectf(-5.0f,5.0f,5.0f,-5.0f);

        glFlush();

        //engine bo;
        //bo.drawrectangle();

                window.display();
     }


        return 0;
}


 

The error i get is that when i try to draw a rectangle it either fills the screen with the color i chose for the rectangle or the
glClearColor(); function overrides the rectangle and so i can't see the rectangle or its color. there was one occasion though that i
was seeing two colors on screen but it split the screen in half. One half of the screen was the rectangle color and the other the glClearColor function.

Have not tried to use freeglut yet, and i'm learning this stuff for the first time using a  opengl book.

Pages: [1]
anything