Showing only posts tagged opengl. Show all posts.

World optimization: level one

One of my last posts was about back face culling. This was because of my performance problem while trying to render 130 000 blocks smoothly. I also said I was going to optimize the world data a little bit before applying shaders (I didn’t know I was already using …

Now using Ubuntu!

After getting the X-th virus on my computer (with Windows XP Professional), I decided to start using Ubuntu 11.04. I like it pretty much, although I’m still a bit irritated by the sudo-stuff.

I spent a lot of time trying to figure out how to install my C …

back-face culling

I recently found a tutorial on back-face culling. It means telling OpenGL not to draw invisible faces (faces on the back side ;) ) of a mesh, which does speed up the rendering a lot.

I was looking for something like this after I increased the height of the world in Mineshooter …

Mouselook and SDL - Code

Okay, here is some code for mouselook with SDL

struct {
              int x, y;
              //In this case: the position where the mouse is held at
              bool trap; //flag for holding mouse at one place
          } mouse;

          void MouseMotion(){
              /* Set x and y to the current mouse position */
              int x, y;
              SDL_GetMouseState(&x …

Fixed the SDL and Mouselook Problem

After spending hours trying to figure out why my mouselook function didn’t work with SDL, I finally got a solution.

The problem was that I didn’t use SDL_PumpEvents() before calling SDL_GetMouseState(). But if I do that I get the next problem: my Keyboard Events get delayed because the …

Mineshooter with SDL...

Almost done with rewriting Mineshooter to work with the Simple DirectMedia Layer Library. Still have a few problems with the mouselook, but I should be able to work out a solution very soon.

SDL is quite simple. I now have about 150 lines less than when I used the Windows …

Mineshooter with SDL?

I’m currently working on learning SDL and am also thinking about making my Mineshooter Projekt use SDL. Does anybody have experience with programming SDL-Applications and would advice against using it?

This post was imported from tumblr.

Gravity and World-Collision

Finally worked out the World-Collision problem. The player now collides perfectly with the blocks, but there is one problem left:

If you collide with a block in front on you, “you look inside the block”. That’s because you are 0.0f long 0.0f wide and the near clipping …

« newer articles | page 2 | older articles »