# TheStudent111

Member

90

645 Good

• Rank
Member

• Interests
Art
Programming

## Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

1. ## Does each vector have its own basis vector?

alvaro, I thought affine spaces lack an origin. The OpenGL graphics API has an origin in NDC and screen coordinates.
2. ## Does each vector have its own basis vector?

So in regards to a cube in model space, each of the vertices are part of a set in a span? Is it accurate to say 3D model space is a subspace of 3D world space?
3. ## Does each vector have its own basis vector?

Does each vector in a given vector space have its own basis vector. Are basis vectors essentially just the components of a given vector? Do all vertices in model space (subspace) have a basis vector?
4. ## Questions concerning terrain heightmaps

I'm curious as to how one calculates position coordinates for the terrain; specifically the height coordinates. My understanding of Terrain generation with height maps is iterating through the heightmap and retrieving pixel data. The pixel data, depending on its greyscale color (white or black), will determine its height. However, I'm unsure of the practical implementation of this, specifically the equation used to convert pixel data to new height coordinates. In addition to the Y coordinates, how do I determine the values in the X and Z plane. Do I just pick a range of values (ex. [-30, 30]) in X and Z? Lastly, I'm sure indices will have to be used in order to make an efficient program. My prior experience with Index is manually entering values for simple geometric shapes (Cubes and triangles). This seems more involved than before. I was wondering if there exists an algorithm that handles indices when dealing with terrain.
5. ## How many VAO can OpenGL bind at the same time?

Thanks TheChubu, Though I have to ask how is there no flickering occurring. Wouldn't the second drawing, bindVAO2 // Cube draw overrwrite what was there before. Does glDrawArray maintain state from previous renderings?
6. ## How many VAO can OpenGL bind at the same time?

How many VAOs are allowed to be bound to OpenGL at one time. I'm asking this because I recently saw code that looked like the following while(running){ bindVAO1 // Cube with lighting draw bindVAO2 // Cube draw } When I ran the program, both rendered without problems. My previous understanding was that OpenGL was restricted to one VAO at a time (Being a state machine). I originally expected to be some flickering between the two VAOs, as glDrawArray wouldn't have the other VAO binding to it for drawing. So how many VAO does OpenGL allow? Does glDrawArray keep track of previous renderings of objects?

While reading someone else code, I noticed that they were using hexadecimal numbers instead of regular base 10. What is the added benefit of using hexadecimal in code (or even binary for that matter).   For example:   enum Behavior {     Flee     = 0x00001,     Seek     = 0x00002,     Wander = 0x00003   }
8. ## Clarification on how OpenGL draws entities

So as long as the number of glDrawArray commands match the number of VAO, OpenGL will know internally which VAO you are referring to and draw to the display?   So I do not need to glBindVertexArray every frame?

10. ## Difference between Light casters and Lighting models

So are phong, gourang, global illumination the only major lighting models available (Or used by triple AAA titles).  I've tried googling and these are the only ones that a the most common. If you could compile a list or link me to the right destination that would be appreciated.
11. ## Difference between Light casters and Lighting models

I'm confused has to what the difference between light casters (point, spotlight, directional) and lighting models (phong, gourang, global illumination). From what I understand both emit light in a scene. When would I choice spotlight over phong lighting. Whats the defining differences between the two concepts (light casters and lighting models)?.
12. ## Why isn't ray tracing required when rendering any object?

So by default OpenGL uses rasterization to render objects. So I'm guessing the rasterization algorithm is written in a lower level language by GPU manufactures. So when I write a ray tracer, and run it, does the GPU process the ray tracing algorithm and override the rasterization algorithm?
13. ## Why isn't ray tracing required when rendering any object?

How have I been able to render images with OpenGL without using the ray tracing method. I've been able to render cubes and cubes with lighting without using the ray tracing implementation.What cases is ray tracing used that would make it apparent? From my understanding ray tracing is a rendering method for generating computer generated images on the image plane. It is used to generate illumination on the object based on whether or not the light ray has intersected with the object.   Apparently ray tracing is not the only rendering algorithm out there as there are different alternatives. What is meant by "rendering algorithm" is my point? Doesn't OpenGL and Direct3D allow the programmer to render objects without needing to use a rendering algorithm to render objects on screen.
14. ## OpenGL why unbind VAO

While reading other peoples code I'm confused as to why a programmer will have to unbind VAO before the game loop, then having to bind and unbinding the VAO repeatedly every frame. Whats the point in doing this?   For example, basic lighting for a scene: GLuint lightVAO; glGenVertexArrays(1, &lightVAO); glBindVertexArray(lightVAO); glBindBuffer(GL_ARRAY_BUFFER, VBO); glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), (GLvoid*)0); glEnableVertexAttribArray(0); glBindVertexArray(0);   GAME LOOP: glBindVertexArray(lightVAO); glDrawArrays(GL_TRIANGLES, 0, 36); glBindVertexArray(0);
15. ## OpenGL Active or Passive Transformation

Does OpenGL use active or passive transformations. I saw a video that said GLM::lookat used passive transformation were the camera moves the world, not the objects in themselves.