Hi,
a friend of mine declared a new type using
typedef GLfloat vec3_t[3];
and later used vec3_t to allocate memory
vertices=new vec3_t[num_xyz* num_frames];
He freed the memory using
delete [] vertices;
Question:
1. Since vec3_t is an alias for GLfloat[3], does it mean that
vec3_t[num_xyz* num_frames]
is equivalent to
GL...
Hi to all.
Developing an OpenGL application, I create a window, get the associated device context using GetDC, and create an OpenGL context on the device context handle returned by GetDC. It all ok.
Before creating the OpenGL context, I shall call SetPixelFormat. Documentation says that SetPixelFormat shall be called only once (I think ...
first of all, I am very new to mac and Iphone development.
I have a project, that uses the OpenGL framework. In order to try to get some other aspect of the project to work, I may have fiddled around the developer libraries (it was more then a week ago so i don't remember exactly what I did).
now when I try to build the project I get ...
When im using this following code:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 6);
and then i enable multisampling, i notice that my program no longer cares about the max mip level.
Edit: It renders the last miplevels as well, that is the problem, i dont want them being rendered.
Edit3:
I tested and confirmed that it doesnt...
I'm using python but OpenGL is pretty much done exactly the same way as in any other language.
The problem is that when I try to render a texture or a line to a texture by means of a frame buffer object, it is rendered upside down, too small in the bottom left corner. Very weird. I have these pictures to demonstrate:
This is how it loo...
Ok... I'm doing simple OpenGL ES programming and when I say simple, the most complicated things I do aren't much more than glorified beveled cubes and L-shapes. (Think very Tetris but in 3D.) However, getting all that vertex data into an app is either a) hand-coded (UGH!) or b) 3rd-party game engine (double-UGH!!!) or you use some 3rd-p...
how to play video using opengl es in android?
...
I'm creating an openGL game and so far I have been using .pngs in the RGBA8888 format as texture sheets, but those are too memory hungry, and my app crashes frequently. I read in Apple's site that such format such be used just when too much quality is needed, and recommends to use RGBA4444 and RGBA5551 instead ( I already converted my te...
Evening everyone,
I'm using glMultMatrixf in OpenGL to rotate my scene using the matrix:
float matrix[16] = { 1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0 };
I've been following this guide (link) but its a little...
I need to render in real time rendered animations for my terrain textures; what is the best rendering method for doing this? the animation is done by adjusting the texture coordinates.
I have a pre-built array for all of the animation frames texture coordinates, is there some way to make animations faster to render if you let opengl kno...
There must be some setting to adjust the angle when my textures miplevel changes... isnt there?
It looks really ugly when the miplevel changes really early when my camera is looking at the road with angle of 10 or etc, or angle of 0 but looking straight forward to the road.
What is the magical line of code?
AND NO. not the LOD BIAS th...
glLineWidth rasterises the width so it shows as that width on the screen. I want it to be that width on a frame buffer.
Thank you.
...
My situation is as follows. I make games that use fixed size backgrounds (say 800x600). When players go fullscreen in a widescreen monitor, I add black bars to the sides, to make sure the game doesn't look stretched.
There are several ways to do this, though, and I wonder what's the best approach :
1) Find a resolution that closely mat...
I am taking an OpenGL course and we have the option to create models to use in our assignments with a 3D modeling application, like Maya or Blender.
I am not looking forward to typing in coordinates manually so I was curious what resources I should be looking into for writing OpenGL code and importing models. (Textures are coming later)...
I'm writing a NURBS class that uses OpenGL's GLU extension to do rendering, but I just realized I have no idea how to set the control point weights. It's not in the Red Book or the GLU documentation, and the web doesn't mention much of it, either. Is it possible that GLU's NURBS implementation just doesn't include this feature? If so,...
I have the following code:
glEnable(GL_POLYGON_OFFSET_LINE);
glPolygonOffset(1,1); // or 40,40 etc... doesnt help at all
But the lines are still z-fighting, is this common bug or something...? My lines are 1.0f thick and i draw the lines last in the scene.
Also i have disable GL_ALPHA_TEST and GL_LINE_SMOOTH and enabled GL_BLEND and ...
Hi,
I am new to OpenGl, almost new to C++.
I am looking for some code that does the following things.
Open an OpenGL window (maybe using glut)
Rotate the view point when the user press the left mouse button
zoom when the user press the right mouse button
translate the point of view the user press the central button
Basically what ...
I've been challenged with a C++ 3D application project that will use 3 displays, each one rendering from a different camera.
Recently I learned about Ogre3D but it's not clear if it supports output of different cameras to different displays/GPUs.
Does anyone have any experience with a similar Setup and Ogre or another engine?
...
I am trying to develop a 3D game in openGL and i need to create many 3D objects.. I am a begginner in openGL.. I have tried with many 3D softwares like Blender , MODO, Unity 3D and Cheetah.
I am easily able to create my objects with these and exporting as Wavefront .OBJ, and converting it to a header file using a perl script. This head...
I know this is such a trivial question, yet I haven't found any information that seems to help, starting from glGet()'s documentation. I'm using my textures as sprites, so it's crucial that I keep track of their sizes in texels/pixels.
When I'm creating my textures with glTexImage2D() I'm required to pass the size of the pixel data arra...