Hi all,
Apple's Texture2D class is a very useful bit of kit for iOS developers.
Q. Is there a Mac OS X version of this class available?
(I've googled but can only find iOS implementations, mostly through Cocos2D projects.)
Cheers.
...
Hi, For drawing graphics on WinCE emulator in visual studio 2008, currently i am trying to use GDI in VC++.
is it possible to use OpenGL for drawing on WinCE platform ?
...
Right now I'm panning by glRotating before rendering everything, and i'm moving the camera by gltranslating. I feel as if this is wrong since im essentially moving the scene, not the camera. What is the proper way to move the camera?
Thanks
...
FIXED by setting near clipping plane to 1, rather than 0 (not sure why it was like that to start with). See the question for skeleton code, and Adrian's answer for how and why this works.
I have a few different camera positions, and my scene consists of a single quad.
The quad is such that it projects exactly onto the viewport/window i...
Hi,
I'm trying to create an openGL app with pure winapi environment (no VCL). For some reason I want my App compiled in both VC2010 & CB2009. So I made a classic bouncing rect gl testing program on VC2010 first and try to ship them to CB2009.
Here is my problem:
On VC2010 my app compiled and run well. A bouncing rect apear on my hand-ma...
I'm working on a game engine, and I want to be able to draw a billboarded (i.e. rectangular to the screen) quad with the center-bottom of the quad being determined by a single point. Unfortunately, I have basically no idea how to do this myself, and I haven't had much luck deciphering some of the other tutorials and/or converting them t...
Hi,
I am using OpenGL to do some GPGPU computations through the combination of one vertex shader and one fragment shader. I need to do computations on a image at different scale. I would like to use mipmaps since their generation can be automatic and hardware accelerated. However I can't manage to get access to the mipmap textures in th...
Ok this is a little tricky. I'm detecting when an application goes into fullscreen mode (captures the display) and then i need to draw occasionally some stuff into the captured displays context for notification purposes (like Growl notifications, but has to work in fullscreen mode too).
Is there any way to modify another apps GL/CG cont...
I am developing a GLUT program on a mac. Mac's seem to pass modifiers through GLUT in a funny way. Alt and control keys are not captured by glutGetModifiers() instead they're translated into the button int. The command key doesn't seem to be captured by either glutGetModifiers() or the button int. Also, it doesn't show up as a key in my ...
I have an existing program written in OpenGL Performer. Because new licences aren't available and the existing code base is old and poorly documented I was thinking about going through, fixing up the code (eliminating warnings and other bad programming practices). As part of this process I was thinking about switching the rendering ove...
I want to basically create a light that will make it so that its very bright around the player then gets progressively darker. Sort of like a fire torch. How can I get this effect? I can only seem to get an ambient light? How can it follow the camera?
Thanks
...
So the story goes, I have an sdl/c++/opengl/win32 program which has a window to display my graphics and a console to get user input. When I tell the console to get input the display will go into a "Not Responding" mode. The program is single threaded and I was hoping that there was a better way around the problem then creating a multi-...
Hi,
As I have understood, it is recommended to use glTranslate / glRotate in favour of glutLootAt. I am not going to seek the reasons beyond the obvious HW vs SW computation mode, but just go with the wave. However, this is giving me some headaches as I do not exactly know how to efficiently stop the camera from breaking through walls. ...
I'm using GLUT and developing a FPS game. I need a way to trap the mouse so that the camera continues to move because right now when the mouse position exceeds the monitor limit, there is no way to calculate change in X or change in Y. How can I 'trap' the mouse with GLUT?
Thanks
...
Hey guys I just had a simple question.
Does glTexParamter act on all textures or just the texture that is currently bound
So like if I call this at the texture load:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
And this on another texture load:
glTexParame...
I'm playing with per pixel lighting shaders and i don't know one thing: What is half vector of light source ?
vec3 halfVector = normalize(gl_LightSource[1].halfVector.xyz);
I would like i you can explain it in math rows, i understand math better than words :)
...
I'm making a 3D game with OpenGL that basically has a world made entirely of AABB cubes. I created this to make 24 verticie cubes:
void CBox::UpdateDimensions( float w, float h, float d, Vertex3f c )
{
width = w;
height = h;
depth = d;
center = c;
Vertex3f verticies[24];
GLfloat vboverticies[72];
GLfloat vbo...
I noticed old code has GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR etc. inputs with glMaterialfv. How are those replaced in modern GLSL code?
e.g. Assuming a library importing models (Assimp) gives direct values to such color categories , can they be still used directly (on core Context)?
...
Hey,
I'm wondering if there is a way to extract the necessary data out of an autocad .dxf file, so I can visualize the structure in opengl?
I've found some old cold snippets for windows written in cpp but since the standard changes I assume 15 yr old code is a little outdated.
Also, there is a book about the .dxf file standard but it'...
I'm making a 3D FPS with OpenGL and here is the basics of how it works. The game is a 3D array of cubes. I know the location of the player's current cube, aswell as the camera x,y,z and I know the x, y, z rotation of the camera too. Right now I just make a square around the player and render this and then add distant fog. The problem tho...