opengl

Open GL ES - Z order when rendering 2D sprites

Hi, I was wondering if there was a way to make OpenGL ES render a batch of quads (rendered with texture page changes) and render them in z order (or reverse). Note I don't want a ZBuffer, I just want quads rendered in order of zDepth. Now I know people will say just render them in order, well I render grouped by texture page. However ...

opengl dependencies

I am new to opengl and using C#,opentk for development. My Application is very light weight (just 2d graphics) and i am planning to use software rendering when hardware rendering is not available. How do i make sure software rendering works on all computers ? (when hardware rendering is not available.) Should i distribute Software re...

glDrawElements flicker and crash

I'm getting a fishy error when using glDrawElements(). I'm trying to render simple primitives (mainly rectangles) to speed up drawing of text and so forth, but when I call glDrawElements() the WHOLE screen blinks black (not just my window area) for one frame or so. The next frame it turns back to the same "Windows colors" as before. And ...

glBitmap() without GL_COLOR_INDEX

Is it somehow possible to get glBitmap() to draw a GL_RGBA bitmap? glBitmap() is a lot quicker than glDrawPixels(), but perhaps that has to do with that the format is GL_COLOR_INDEX instead of GL_RGBA? I'm running my glDrawPixels() in a display list; is there perhaps some smart way to speed it up? ...

The procedure entry point _ftol2 could not be located in the dynamic link library msvcrt.dll

I've recently been tinkering with a little gameproject using VC++ 2008. I'm using SDL, OpenGL, Boost and Box2D as included libraries. It works fine on my windows 7 machine, aswell as a friend's w7 machine. How ever it wont work on my second friend's XP sp3 machine, with the vc++ 2008 SP1 redist pack installed. When he starts the .exe he ...

opengl glutmainloop()

hey guys, i just started off using opengl and it seems it is not easy to understand the working of the glutmainloop() what really happens there? does it stay there doing nothing till any of the function calls responds? ...

iPhone: how to prioritize items in a CFRunLoop (OpenGL related)

I have an OpenGL application which is rendering intensive and also fetches stuff over HTTP. Following Apple's samples for OpenGL, I originally used NSTimer for my main painting loop, before finding out (like everyone else) that it really isn't a good idea (because you sometimes have huge delays on touch events being processed when slow ...

negative color with glBlendFunc() ?

i want my lines to be drawn with negative color (taken from the screen under the line), i just didnt understand how the blending works, looked at docs etc, tested 50 combinations and so on. started to think its not possible at all... could someone just give the two values, im tired of thinking how it works. thanks, ...

Help with Open GL iPhone

I am trying to put an OpenGL View into my application but I want to make sure that before I do this that the view is transparent because I want to see and interact with the view behind it as well as the OpenGL View. Meaning I want to have something on an OpenGL View as well as the Image View behind it ...

How to rotate about the center of screen using quaternions in opengl?

I am trying implement arcball/trackball rotation but I have a problem with the center of rotation. I want the center to be the center of my screen no matter what. Let me explain what I have done so far. I've created a quaterion (rotation axis: vector_start x vector_end, angle: vector_start * vector_end) From that quaternion...

Java OpenGL draw a star

Hi, I'm working on an OpenGL project in which I want to draw a star. It doesn't necessarily have to be a 3d looking star (2d looking is fine). I have the xyz coordinates for the center of the star and I know the size I'd like it to be. I don't do much OpenGL/3d math programming, so any help here would be much appreciated. EDIT: More det...

How can I draw a cylinder that connects two points in OpenGL

i have two point each point has its own X and Y value and they have the same Z value. i want a function to draw Cylinder between these two points. ...

How to make a circular UIView

I want to make a UIView or UIImageView that is a circle. Or a circle that i can change the size of using a slider, and the color of with a pickerview. ...

opengl texture lod bias adjusting via opengl function call?

how is it possible to change the lod bias via an opengl function call? i dont like the default settings, changes the miplevels too early and makes the nearby ground look ugly. i couldnt find any codes to do this, every topic was about some external programs that does the job... Edit: This is my texture settings: glTexParameteri(GL_TEX...

Setting up OpenGL on Linux

I have a specific problem. I am starting learning OpenGL and I am not sure, how to set it up on (Ubuntu) Linux. I think that this could be a way: ======================================================================== OpenGL is only a graphics language "specification" (or "interface") and to properly use it I have to download some lib...

Compiling OpenGL SOIL on Mac OS X

How would I link in or compile SOIL (http://lonesock.net/soil.html) into my C++ OpenGL project on Mac OS X? ...

Optimum ordering for packed vertex arrays on iPhone

Is there an optimum packing format for vertex arrays on the iPhone hardware? My textured (triangle) arrays are ordered: Vertex (x, y, z) Vertex Normal (x, y, z) Texture Coordinates (u, v) This is the way I've always done it. Should the UVs come before the normals? I'm not sure if it matters. I'd assume that the texturing & lighting u...

Problem using FBO: Only first pass renders. A possible problem at setting render target back?

Hi, I have a huge problem with using FBO. I have a multi-pass display using FBOs and multitexturing. Everything seems to work fine until the end of first execution of display. I set the render target back to screen using glBindFrameBufferEXT(GL_FRAMEBUFFER_EXT, 0) at the end of my display function but the passes after that do not take...

How to transform directional light to camera space in GLSL

I have the following GLSL code for lighting: uniform vec3 lightDir; // Parallel light uniform float ambient; uniform vec3 lightColour; void main() { gl_Position = ftransform(); vec3 eyeNormal = normalize(gl_NormalMatrix * gl_Normal); float intensity = max(ambient, dot(eyeNormal, normalize(-lightDir)); gl_FrontColo...

opengl light problem..

I have loaded an object, and when I draw the object, I set the color to green.. After drawing the object, I draw lines in red. It all worked out fine. The problem arise when I input lighting properties. When I create a light source, everything where the light projects becomes white. Why does the lighting over writes my color? And how d...