Can I model the NURBS surfaces in a 3rd-party software, export out as data sets and then rendered using OpenGL?
Type: Posts; User: shapeare
Can I model the NURBS surfaces in a 3rd-party software, export out as data sets and then rendered using OpenGL?
The red book introduces the evaluators to draw NURBS surfaces before OpenGL 3.1, however, the evaluators have been removed from OpenGL since version 3.1, how to draw NURBS surfaces then?
It turns out that another library I am using was built with glut32.lib...
I am trying to build a 64 bit project with freeglut.
I built the freeglut from source with visual studio's configuration setting to x64.
then I added the newly built freeglut.lib as source...
I tried calculating the framerate of my program by placing the following code in the Idle function, but never can it exceed 60 fps. And I am sure that the draw call in the rendering loop takes less...
Thanks for the replies.
Thank you very much. But I did not separate position and color into different VBOs. it works by only changing the offset for glVertexAttribPointer() of the position...
Thanks for your reply.
What should I do? Allocate the same size of space as the position buffer for the color buffer and repeat the color value five times?
Is there any better solution for this?
I am drawing an animated model of several frames. Say the model consists of 1000 vertices, and I want to render 5 frames.
I stored the vertex positions of the five frames in a large buffer, the...
Can I say that the computation time for a CUDA program is determined by the longest time among all threads?
For example, there are two algorithms A and B that complete the same task.
Using A...
But the call of
GLFrame::GetMatrix() does not return an identity matrix by default. In fact, it is
{-1, 0, 0, 0,
0, 1, 0, 0,
0, 0,-1, 0,
0, 0, 0, 1
}//in column major
The author used the following data structure for the convenience of representing a frame of reference (on Page 168 of the book)
class GLFrame{
protected:
float vLocation[3];
...
They are the same to me?
Are they interchangeable?
My graphics driver supports OpenGL 4.2
In the fragment program, I use the following code to lookup a cube map array:
#version 420
uniform samplerCubeArray cubes;
...
Thanks all.
I replaced
glFramebufferTextureLayer(GL_FRAMEBUFFER, fboAttachment[i], cubeTex, 0, i);
with
Thanks. I followed your instruction but there is an error I cannot get through.
The cube texture object is defined as:
glActiveTexture(GL_TEXTURE7);
glGenTextures(1, &cubeTex);...
I want to create a cube map, so I plan to render the six faces into six 2d textures within one rendering pass using MRT. But how to form a cube map texture with these 2d textures?
Do you know what does the uniform fres do in this line:
vec4 pl = texture2D( tex1, gl_Color.xy*fres.xy );
I am reading someone's code about SSAO, but there are some places I cannot understand.
Their code for SSAO is extremely simple:
uniform vec4 fk3f[32];
uniform vec4 fres;
uniform sampler2D...
Yes. But if I do not use it, I only get (0.49, 0.49, 0) at (357, 256). All the other locations are 0;
I drew a pixel with color (0.5, 0.5, 0)at window location (357.2, 255.5) and then use glReadPixels() to read the pixel values from the following four locaitons, they are with their respective colors:...
I want to render a skybox with the following cubemap:
http://graphicsprojects.files.wordpress.com/2011/10/uffizi_gallery_original_image.jpg
I defined a cube with the following code:
...
I am using the library GLTools that comes with the book OpenGL SuperBible 5.
The orthographic projection building function provided by this library is (in column-major order):
void...
Sorry, but it is a vertex shader output (an input for the fragment shader). See the original code here:
void satHV(
float4 position: POSITION,
float2 inUV: TEXCOORD0,
out float4...
I am implementing the Summed-Area Table algorithm. There is a statement
float4 uv[8]:TEXCOORD0;
in the shader code originally written in HLSL in Slide 9 in the following slides
Summed-Area...
Sorry, one more question...
It seems that I cannot sample this texture in the shader.
I use the following statement:
vec3 value;
value = texture(myTexture, index).rgb;
but value is always...