Jump to content

  • Log In with Google      Sign In   
  • Create Account


shacktar

Member Since 31 Dec 2011
Online Last Active Today, 10:26 PM
-----

Posts I've Made

In Topic: OpenGL - Soil texture all black

24 April 2014 - 08:43 PM

glColor4f(0.0, 0.0, 0.0,1.0f);

If the texture color is being multiplied by this color then that could be the problem. Try using white instead. i.e.
 

glColor4f(1.0f, 1.0f, 1.0f, 1.0f);

If that doesn't work, we might have to see your shaders. 


In Topic: OpenGL and user defined functions/classes with c++ issues

03 January 2014 - 04:30 PM

glBindBuffer(GL_ARRAY_BUFFER, *vao);

Here, in initRenderer (line 144) you're attempting to bind a VAO as a VBO. Try using *vbo there.

 

In your renderFunction it looks like you're rendering with the VBO but your VAO is still bound. Pick one or the other. If you want to render with the VBO directly (and this is preferred to VAOs anyway), then disable your VAO before calling your renderFunction.

 

Your clear color is also fully transparent. You probably want a 1.0f as the last component.


In Topic: Beginning Game Programming

20 December 2013 - 11:33 PM

What all tools are needed?is OpenGL+ C++ enough?

 

I am currently developing a game (and game engine in tandem) in C++. I too like the feeling of having my own code doing a lot of the heavy lifting. I have chosen to do the rendering and physics code myself and to unload the other tasks to libraries. The following is my current setup. Perhaps this can give you a rough idea of what libraries you may need to use as well.

 

C++

OpenGL

OpenAL (for audio)

   - Ogg/Vorbis (for loading .ogg files)

GLEW (for grabbing OpenGL extensions/version info)

GLFW (window management and user input)

stb_image (image loading)

RapidXML (XML parsing)


In Topic: GLSL - Can't replace gl_LightSource[0].position with uniform

27 October 2013 - 05:03 PM

Have you tried seeing what glGetError reports? First, try calling glGetError after your call to glUniform4fv.


In Topic: Rendering text

22 October 2013 - 02:37 PM


The first problem was that for some reason text positioned at 0,0 was rendering at the bottom left

 

In the OpenGL convention, 0,0 is the bottom left. The Y coordinate subtraction from the height is the typical practice to place the coordinate into window space.


PARTNERS