No thoughts? Am I leaving anything out? Much appreciated!
Type: Posts; User: allenmoatallen
No thoughts? Am I leaving anything out? Much appreciated!
Hi guys,
The issue I have is that I am trying to draw 2 triangles as a quad and texture over it. Drawing the font seems to work no problem but when trying to draw a textured tile it doesn't seem...
Alright I actually fixed the flickering finally! However my mouse y-axis is upside down. In OpenGL 3.2 Core how do I invert that?
There must still be something wrong with my coordinates...Again here is my Init code:
void OGL_Renderer_3_2::initGL(){
glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);
...
Wow, then I was sorely wrong... The reason I had the view as (0, -1, 0) is because if I don't, the mouse y orientation is upside down (move mouse up it goes down or at least renders that way).
...
Well this is all 2D rendering so we don't make use of depth values, but I will double check that I have that turned off. Also I thought glViewport was gone in 3.2 Core?
Thanks Dan I completely overlooked that! Without clearing the screen though the graphics stay on the screen when moving the mouse around and such and I have intense flashing right now. Should there...
void OGL_Renderer_3_2::drawVertexArray(GLuint textureId, bool defaultTextureCoords){
clearScreen(0, 0, 0);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
...
Alright here goes, I am in the middle of porting our rendering from fixed-function to fully programmable with a 3.2 core context and glsl 1.5. Whenever we wish to render to the screen (image, text,...
We currently do handle rendering that way, update/draw all objects and then swap the buffers, however it doesn't seem to be behaving that way and only renders the last set of data sent.
Hi guys,
This may sound like a stupid question, but here goes; I have a single VAO and single VBO in my renderer. Right now when I wish to draw my primitives I update the VBO data and push to the...
If all I am trying to do is render 2D objects, wouldn't all I need is:
int w, h;
SDL_GetWindowSize(mWindow, &w, &h);
projection = glm::ortho(0.0f, static_cast<float>(w), static_cast<float>(h),...
No, ideally I want to use just two coordinates since I only do 2D rendering but was told I needed to pad it...
EDIT: If I remove the MVP multiplication in the shader I get a blue box in the upper...
Ahh I apologize for not including that. Here it is:
glGenVertexArrays(1, &mVertexArray); getError();
glBindVertexArray(mVertexArray);
getError();
glGenBuffers(1,...
Is the issue having to do that I don't pad the vertex shader position?
Hi guys,
You helped me get things on the screen with shaders and such but now I am trying to actually get the coordinates correct. Given the below vertices that I am passing in:
0, 0, ...
And just to make sure I have the correct understanding... in my data update function should I be using glBufferData() or look into the glMapBuffer() calls? I thought all I needed was a glBufferData()...
A) should work because right now I only have one VAO and one VBO. I wanted to reuse them for each object getting drawn but wasn't sure if that was the best practice. If I can simply update the buffer...
Correct. If I have a function named fillVertexArray(), would all I need to do is bind the VBO, call glBufferData() and then unbind? Or is there a step missing?
Since the VAO needs to be completely setup during initialization, what is the best way to feed new vertex data to the GPU? Is it better to recreate the VAO and VBO or to simply pass new vertex and...
That does seem to help, thank you! In order to update the vertex positions in the shader I would have to call glBufferData() again at some point right? At least that was my understanding of its...
Hi guys,
I am currently trying to switch our rendering from fixed-function to shaders and can't seem to get anything to draw to screen. I know the shaders load and compile properly as I have the...
Oh... I had a feeling that was it. What should I be looking at then to keep a texture from stretching within the [0, 1] range? Is that a matter of normalizing the size of the quad against the texture...
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
Is being ignored in our code. Basically we have a grid of cubes of...
The images themselves are drawn correctly... it is literally the y position of where the image is rendered that is reversed... the projection is correct.
...