PDA

View Full Version : Polygon graphics library in OpenCL?



Budric
06-17-2010, 01:53 PM
Hi,
Is there a library in OpenCL that can render polygons into a frame buffer? I currently have an application in OpenGL where I'm doing some of the processing in a shader, the end result is an image though. I was hoping to use OpenCL for several reasons. First, the GLSL shader language is very ugly and implementations vary and some are buggy (stuff seems to work on ATI cards that doesn't on nVidia cards, break statements don't always work, for loops from i to n where n is a uniform variable don't work, it's a nightmare). Second a single OpenGL context is very restrictive. Yes it's fast, but I can only do one computation using the GPU at a time. I was hoping OpenCL implementations you can initialize a context, carve off some space on the card and it will be independent of another process that I initialize.

This may seem like a silly question. Of course there's OpenGL that is specifically designed for polygon rendering. Well unfortunately hardware like the Tesla cards don't support OpenGL. There is Quadro cards (or GeForce) but these cards don't have nearly as much memory or processing units. Also I think the interaction between OpenCL and OpenGL will be clunky (I haven't actually tried coding it). First, I don't know how to initialize OpenGL context to use a specific card, what if I have 2 Tesla cards in my machine? They are not SLIed. In OpenCL you'll specify which hardware to use for the context. But OpenGL context initialization doesn't seem to have that.

Anyway, what do people normally do when they want to visualize the result of their OpenCL computing?
Thanks.

david.garcia
07-13-2010, 03:54 PM
Anyway, what do people normally do when they want to visualize the result of their OpenCL computing?

I don't want to sound snarky, but they use OpenGL. OpenCL is designed to make it easy to share data back and forth with OpenGL.