OpenGL is a graphics standard and API which targets the desktop and workstation markets. It is designed to be easy to accelerate with dedicated computer hardware, and hence most implementations give greatly improved performance over traditional software rendering. Currently, OpenGL is used for ...

learn more… | top users | synonyms

3
votes
1answer
1k views

OpenGL ES Basic Fragment Shader help with transparency

I have just spent my first half hour playing with the shader language. I have modified the basic program I have which renders the texture, to allow me to colour the texture. varying vec2 texCoord; ...
2
votes
1answer
185 views

OpenGL: What are the adoption rates of the various versions (And what's a reasonable version to use)

This question is looking for updated answers for this question, which was made 1.5 years ago - as well as seeking more information. Given that OpenGL 3.0 was released just over 5 years ago, what ...
2
votes
1answer
289 views

What happens when a texture is too large for a device

The question is two fold: What happens on a device when a texture is too large for it to handle? Will it crash or simply downsize it? In Unity if I use texture atlases of size 4k and then set ...
2
votes
2answers
832 views

LWJGL multiple keyboard/mouse input checks

As in many game libraries such as LWJGL, you can check mouse/keyboard events with Mouse.isButtonDown or Keyboard.IsKeyDown. I want to check for button/key presses, not if it's currently pressed down ...
2
votes
2answers
128 views

setting the position in different resolution

I have a normal game window which is 640*480, and everything is fine, but when I try to maximize the window, the objects translate to different positions on the screen, for example If I have a circle ...
2
votes
2answers
586 views

Is this a reliable method of parsing glGetShaderInfoLog()?

I want to get a list of errors and their line numbers so I can display the error information differently from how it's formatted in the error string and also to show the line in the output. It looks ...
2
votes
1answer
1k views

Zooming to point of interest

I have the following variables: Point of interest which is the position(x,y) in pixels of the place to focus. Screen width,height which are the dimensions of the window. Zoom level which sets the ...
2
votes
1answer
195 views

How to debug pyglet/opengl bus errors

I'm using pyglet for game development, and sometimes encounter "bus errors". They are not consistently repeatable, and whenever I try to do simple debugging (eg move/remove variables, etc), the errors ...
2
votes
2answers
1k views

How should I do 3D games through Java on a mac?

I have been self-teaching myself Java on the mac mostly because the language is cross-platform. Recently, I have been only able to develop 2D games using the Graphics2D class. Now, I want to learn ...
2
votes
2answers
2k views

camera movement along with model

I am making a game in which a cube travels along a maze with the motive of crossing the maze safely. I have two problems in this. The cube needs to have a smooth movement like it is traveling on a ...
2
votes
2answers
1k views

Multiplatform GLSL shader validator?

Im working on a multiplatform (Pc,Mac,Linux) game that uses shaders quite extensively. Since we do not have any funding, it is pretty hard to test our game on all possible hardware configurations. ...
2
votes
1answer
3k views

OpenGL ES 2.0: Moving Camera in Orthogonal (2D) Projection

I have quite large 2D game scene. The scene is much larger than the screen of the LCD. Therefore, I have to move the camera (view) in desired directions, to display particular parts of the scene. ...
1
vote
1answer
217 views

lighting for landscape

I've got a landscape(created in Photoshop .raw file) and a .tga texture for it. I read .raw file and read .tga file like this LoadRawFile("landscape.Raw", MapSize * MapSize, &HeightMap[0][0]); ...
1
vote
1answer
190 views

How can I improve the performance of texture switching without resorting to atlasing?

I'd like to use texture images that are not a sprite sheet or other form of texture atlas, mainly because I'll be consistently adding and swapping textures while I figure out the direction my game ...
1
vote
1answer
951 views

Basic Car Movement, Converting 2D Vectors to 3D problems

I'm trying to follow this guys method for steering a basic car. Link. It's the first example I can sort of get my head around and I'm trying to convert it to a working 3D version. To get some scope, ...
1
vote
2answers
131 views

Modern opengl for direct3d programmers [duplicate]

I don't think this is quite the same questions as this one but if you disagree feel free to close this :) With SteamOS being announced yesterday I can see that it's entirely possible that opengl will ...
1
vote
2answers
581 views

How to check for cube collisions?

I want a method, which takes two "ObjectBox" objects (A "ObjectBox" has .getX() .getY() .getZ() .getSizeX() .getSizeY() .getSizeZ() methods) as a parameter and return true if the two Boxes are ...
1
vote
1answer
283 views

SDL_Image and typical SDL BMP loading fails completely

been messing with OpenGL and SDL for a pair of weeks. The thing is quite weird. I have been loading a texture from a BMP and using a really easy shader to make it work, and so far it has worked very ...
1
vote
0answers
188 views

Detect Sprites, they are in Shape or Not which random draw in Cocos2d

I have searched a lot on web and found some of help ful links as exact my question. Link 1 Link 2 But still i am not success to achieve this, i have done some of code lines, as like draw line by ...
1
vote
1answer
2k views

LWJGL - Mixing 2D and 3D

I'm trying to mix 2D and 3D using LWJGL. I have wrote 2D little method that allow me to easily switch between 2D and 3D. protected static void make2D() { glEnable(GL_BLEND); ...
1
vote
4answers
2k views

searching for “university kind” free online course about OPENGL [closed]

I know there are a lot of free university courses, but I'm trying to find one about OpenGL. Do you know where can I find one, online?
1
vote
1answer
201 views

Selection of a mesh with arbitrary region

Considering example: I have a mesh(es) on the OpenGL screen and would like to select a part of it (say for delete purpose). There is a clear way to do the selction via Ray Tracing, or via Selection ...
1
vote
1answer
749 views

Multiple buffering in OpenGL on Windows

What is the most common way modern games perform triple buffering ? What does the SwapBuffers exactly do in terms of OpenGL states ? Is it possible to perform double and triple buffering ...
1
vote
1answer
840 views

Translating local to global coordinates in ARToolkit / OpenGL

Ok, so I've tried reading over the other questions and something's just not clicking for me. I am working on an augmented reality application using ARToolkit, however it should just be straight ...
1
vote
1answer
318 views

Input in OpenTK

How to use Input in OpenTK 1.0? There is not much info around, some classes are unfinished. What I want to achieve, is to be able to use input not only in OnUpdate function, but also in other classes ...
1
vote
1answer
1k views

Restoring projection matrix

I am learning to use FBOs and one of the things that I need to do when rendering something onto user defined FBO, I have to setup the projection, modelview and viewport for it. Once I am done ...
0
votes
0answers
27 views

Slick2D/LWJGL Drawing coloured lights problem

I am using the Slick2D engine. I've followed this snippet for creating light sources. I have followed step step, added what is actually important for me, and tested it and the lighting effects ...
0
votes
1answer
92 views

How does OpenGL determine different outputs with shaders?

Lets say I have this GLSL code: #version 330 out vec4 outputColor; void main() { float lerpValue = gl_FragCoord.y / 500.0f; outputColor = mix(vec4(1.0f, 1.0f, 1.0f, 1.0f), ...
0
votes
1answer
130 views

Textures not displaying. Problem with fragment and vertex shaders

Hi i have newbe question. I am sending to gpu textures unit and they dont display. This is simple version of my fragment and vertexshader. (More complicated version also dont work with other textures ...
0
votes
1answer
290 views

Simple curiosity about glDrawElements function

I've written a very simple OpenGL program displaying a white cube. To do the job done I recovered vertex position and indice data from an OBJ file that describes my cube. Here's the OBJ file content : ...
0
votes
0answers
72 views

Rendering a model with transparent or translucent uv map applied doesn't work

Before I try to make anything transparent, the model renders nicely. When I change the uv layout so that one piece of the model will be transparent, it renders horribly. This is the result with a ...
0
votes
1answer
93 views

Is it possible to display no white images/sprites when using the latest Android OS?

Was it okay to use Texture.setEnforcePotImages(false) in order to disable conditional width and height pixel size that requires power of 2? I'm planning to sell the game app at Google Play. I want to ...
0
votes
1answer
132 views

Where to store OpenGL object id:s

When working with OpenGL, you often recieve integer id:s to keep track of OpenGL objects. For example, representing a simple mesh, you may have a number of references to objects like so: GLuint ...
0
votes
1answer
123 views

Mesa 9.2 does not support OpenGL 3

I'm trying to install OpenGL 3.0 for studying examples about GLUS , which require OpenGL 3 or 4. I read on the official Mesa website that Mesa 9.2 support OpenGL 3.0, but after I installed Mesa 9.0, ...
0
votes
1answer
830 views

OpenGL + SDL Linking Problem [closed]

So I'm trying to write a simple application with SDL 1.2 and OpenGL. This a stripped down version of the code containing the one problem I'm having. //The headers #include "SDL.h" #include ...
0
votes
3answers
847 views

How to draw only visible tiles?

I have a big map with isometric tiles(3d camera), how can i draw only visible tiles ? Whats the best way to do that ? space partitionning (octrees etc...)?
0
votes
2answers
723 views

Multipule VBO in Opengl [closed]

I have currently in my application 2 VBO one which is a streamed buffer and for the moment the other is a static buffer. However even when the steam buffer is not bound and the static buffer is bound ...
0
votes
1answer
413 views

OpenGLES GLSL Shader attributes always bound to 0

So I have a very simple vertex shader as follows #version 120 attribute vec3 position; attribute vec3 inColor; uniform mat4 mvp; varying vec3 fragColor; void main(void){ fragColor = inColor; ...
0
votes
2answers
3k views

Map and fill texture using PBO (OpenGL 3.3)

I'm learning OpenGL 3.3 trying to do the following (as it is done in D3D)... Create Texture of Width, Height, Pixel Format Map texture memory Loop write pixels Unmap texture memory Set Texture ...
0
votes
4answers
435 views

Missing triangles in model

I am having an issue where triangles in a model aren't being shown. The left is wireframe, the right is the finished image. For some reason a bunch of the triangles aren't being shown. The project ...
-1
votes
1answer
107 views

Opengl Obj with multiple textures. Jpg texture don't display

Hi i have problem with jpg textures. DDS is working good but jpg is not. This is my function to load JPG texture. In debuger i see that this works but i dont see anything. char * a =(char *) ...
-1
votes
5answers
2k views

OpenGL vs DirectX? [closed]

I saw the articles that were going on about OpenGL being better than DirectX and that Microsoft are really just trying to get everyone to use DirectX even though it's inferior so that gaming is almost ...
-2
votes
1answer
218 views

Incorrect rotations using openGL GLM and shaders [closed]

The goal of my program is to display a simple colored triangle rotating on the Y axis without any translation. I'm using the GLM library. The problem is that the transformations of my triangle are not ...
-5
votes
3answers
338 views

in the shadow of a sphere [duplicate]

(Related, but somewhat different, to my previous question) How can I determine in a fragment shader if a fragment is in the shadow of a sphere? That is, if it is occluded by the sphere and is past ...