Programming :: Difference Between Xlib And OpenGL?

Dec 6, 2008

I am starting to learn Linux graphical programming. Most of codes in my hands were written based on xlib, which is a kind of old graphic lib. I see some developers more interested in openGL. Then what's the difference between xlib and openGL? And which one is more popular used in which industry area?

View 2 Replies


ADVERTISEMENT

Programming :: 3D Programming - Difference Between JOGL And C++ OpenGL Programming?

Aug 27, 2010

I am interested in learning 3D programming. The thing is, I would hate to put too much effort to learn something that doesn't have future and is dying. My favorite language at the time is Java. My goal is professional programming.

So I have several questions:
1. Should I learn JOGL or start learning C++ and do C++ openGL programming?
2. Is there a big difference between JOGL and C++ openGL programming?
3. Is it worth to learn openGL? Does it have a future?
4. Is it a big difference between openGL and directX coding?
5. If choosing Java, then JOGL or LWJGL?

Why and what is the main difference between them?

View 4 Replies View Related

Ubuntu :: Can't Find Xlib.h - Fatal Error: Xlib.h: No Such File Or Directory

Jun 12, 2011

I'm trying to build a program called Obpager, but I'm getting an error saying I don't have xlib.h. From what I understand, that file is included in libx11-dev, which I have installed. Any idea?

Code:

dagoss@MAGIC-PORT:~/Downloads/obpager-1.8$ make
Compiling src/main.cc
In file included from src/main.cc:33:0:

[code]....

View 2 Replies View Related

Programming :: Can't Get Xlib Window To Display / What To Do?

Mar 12, 2009

I am having trouble writing an Xlib application that displays a window. The most frustrating thing is that I've written applications like this before, and never had any problems. For some reason I cannot get this program to work properly. I'm running KDE and when I launch the program, a "button" for the application will appear on the application panel, however, no window will display. It is possible to right click on the panel button and select the Close item which will successfully close the window.

The following is source code that when built will exhibit the behaviour described above code...

View 10 Replies View Related

Programming :: Use QPainter Over An Xlib Window?

Jan 15, 2011

Suppose i have an XID of a window. How can i wrap QPainter to draw on this window? I need something like cairo_xlib_surface_create(), but Qt-based.

View 3 Replies View Related

Programming :: Implementing Scrollbar Using Xlib ?

Oct 17, 2010

I am working on xlib project to develop text editor without using help from any of toolkit/widgets.I get stuck in scrollbar.I have no idea how they work and developed.It become more difficult as I am using low-level C library - xlib.

View 1 Replies View Related

Programming :: Mouse Click C++ XLIB

Mar 3, 2009

The code below seems to do a right mouse click (firefox 2.0.0.7) IF I pass it 3, but I cant get it to do a left mouse click?

View 4 Replies View Related

Programming :: Get String Width In Pixels In Xlib?

Aug 3, 2009

I'm trying to get the width of a string in pixels this way:

Display *disp;
int len;
disp = XOpenDisplay(0);
font = XLoadQueryFont(disp, desc );

[code]....

I'm getting negative numbers as the the pixel length, eg -7275

View 3 Replies View Related

Programming :: Invoke A ButtonPress Event Using XLib?

Nov 17, 2010

I'm working on an application which generates random shapes when clicking on a window. I designed the window using Motif. I want to invoke the ButtonPress Event .

View 1 Replies View Related

Programming :: Read The State By Using _NET_WM_STATE In Xlib?

Oct 8, 2010

i want to get the state of a particular window by using the _NET_WM_STATE atom. i dont know how to use it with XGetProperty.

View 6 Replies View Related

Programming :: Xlib - C Programming - Get Value From Pixel

Dec 11, 2009

I'm making a game with the xlib library. What I want to do is to know if the character is standing on a trap or something else.

So far I've solved that using the coordinates but when I draw circles or stuff not shaped like a rectangle it gets to hard to make the game exact.

So what I'm asking for is if there is some kind of function in the xlib that tells you which color a pixel has. Because then it'd be much easier.

I've searched but I haven't been able to find anything good. I found XGetPixel() but that appears to work only with images, maybe I can make my window to be an "image"?

View 7 Replies View Related

Programming :: Use Colors In Xlib Programming ?

Apr 27, 2010

I'm trying to understand how to use colors in Xlib programming. What I think I understand so far is that modern displays use 24 or 32-bit TrueColor. And TrueColor uses three colormaps, one for each primary color, and a single pixel value is composed of three indices.

Now the part i'm confused about is how to get my programs to use a 32-bit TrueColor visual. I thought I could inheret the visual from the root window to get color but it seems no matter what pixel value I use it's either black or white.

I guess my question is, how can I setup my programs so that I can specify a pixel value that is a combination of RGB values to get the color I want?

I come from windows where I simply used RGB(r,g,b) macro to specify colors and never had to worry about depth and colormaps and visuals, so I'm a bit overwhelmed by all of these concepts.

View 1 Replies View Related

Programming :: Xlib Documentation With GUI Programming?

Dec 14, 2008

I want to do some experimentation with GUI programming. What mostly interests me is how the toolkits actually work (what are the drawing mechanisms, how it communicates with X, etc.) and how the window managers work. I know it's quite a lot but I don't plan on developing the next best DE/Toolkit/Window Manager, just to play with API, mostly to learn. It seems that there is a shortage of documentation on this topics, I'm trying to find anything for 2 days now with no result.

View 7 Replies View Related

Programming :: Xlib C Program Doesnt Work Every Time

Jul 24, 2010

I tried to draw two lines with xlib.h in C. If I start this compiled program it show me in most cases a window with two lines as it should be.

But sometimes the two lines are not drawn.If I insert XFlush() before the second XSync() it worked better but not every time.Why?How can I solve the problem?How works the X-Server buffer in detail?

Code:

View 1 Replies View Related

Fedora :: Wine/opengl/32 To 64 Bit - Cannot Load OpenGL When Try To Start WoW

Oct 19, 2009

I just upgraded from FC8 (32-bit) to FC11 (64-bit). In doing so, I backed up my entire World of Warcraft folder so I could try to avoid having to download and install it all over again. However, I've now reinstalled wine (64-bit now), and the nvidia drivers from the rpmfusion repos (also 64-bit), and when I try to start WoW, it says it cannot load OpenGL. I'm wondering if anyone knows what's up, and if there's a solution that doesn't involve reinstalling WoW.

View 7 Replies View Related

Programming :: GTK DrawArea - Possible To Use OpenGL?

May 30, 2010

I am writing a program that needs to display graphs. Right now I am using Cairo which works well except it is really slow. Drawing 1200 lines locks up my computer (i7 CPU and gtx285 graphics card). I only found examples to use Cairo with GTK DrawingArea can I use OpenGL instead or is there a way to cairo to run faster?

View 1 Replies View Related

Debian Programming :: Cannot Get OpenGL Version

Feb 28, 2014

Running under Debian oldstable:

#include<stdio.h>
#include<stdlib.h>
#include <GL/glew.h>
#include <GL/glext.h>
#include <GL/glut.h>
void init(){
const GLubyte* version = glGetString​(GL_VERSION​); // line 2338
printf("version = %s
", version);
...

The gcc compiler gives me:

code.c: In function ‘init’:
code.c:2338: error: stray ‘342’ in program
code.c:2338: error: stray ‘200’ in program
code.c:2338: error: stray ‘213’ in program
code.c:2338: error: stray ‘342’ in program
code.c:2338: error: stray ‘200’ in program
code.c:2338: error: stray ‘213’ in program

Do I need an additional header?

View 4 Replies View Related

Programming :: OpenGL (non-GLUT) On OSX Lion Using C++

Jul 25, 2011

I'm looking for some sample C++ code that uses OpenGL on XCode 4.1 for OSX Lion. All I have found so far are GLUT and/or Objective-C samples. Has anyone come across something similar to what I'm after? I really just need something simple that allows me to open a window, or start in fullscreen.

View 1 Replies View Related

Programming :: Start Programming Using OpenGL?

Sep 1, 2010

I want to start progrmming in opengl. I am using Ubuntu. do I need just to install a GLUT package.if yes how to do it

View 5 Replies View Related

Programming :: Maintain A Cross Platform SDL/OpenGL Project?

Feb 11, 2011

I have made a game for Linux and want to release it soon (on linux & windows). Since its SDL/OpenGL and I dont do any special things it shouldn't be much porting to windows. Problem: Maintaining I have the game in code::blocks SDL project on Linux. So I got wine and installed wined Code::Blocks with MingW so I can cross compile on Linux. For another game I made, I used a Makefile which has "if" statements to set up compile variables. And everything else is totally identical to windows & linux (code, source files and etc...)

With codeblocks I got used to not having to worry about makefiles and it did well and I better focused on making the game rather than everytime a new file is added editing the makefile and etc... Is there some nice ways to have a cross platform environment to make it easy to make games for Linux and windows. I'm thinking of making my own system of auto-generating a makefile (essentially upgrading the setup I have for my previous game to auto add entry's to the makefile & some other stuff).

View 2 Replies View Related

Debian Programming :: OpenGL Version Verification - Compiler Error

Feb 5, 2015

I have moved from MS directX to OpenGL on Linux Debian. My computer is running Jessie version with Gimp. I am trying to use several of the gl 4.0 functions but getting compiler error. I check for OpenGL version and appears to be version 1.5 .... How can I verify the correct openGL version and how can I upgrade to a moder version of at least 4.0?

View 4 Replies View Related

Programming :: OpenGL And GLUT In Fedora 12: Windows Too Small And Don't Resize

Mar 15, 2010

I have verified using yum that I have the most uptodate glut, freeglut, freeglut-devel etc., yet when I compile Example 2-6 from the Red Book at http://www.glprogramming.com/red/chapter02.html#name16, I get a window that is too small for the program output, includes display from other windows, and will not redraw after being resized.

I get slightly better behavior with the SGI sample program mentioned in the same book, 'checkers.c'. Again, the initial size is too small, but at least it will resize and redraw the checkerboards entirely inside the resized window. What is going on here? Is this some bug in glut? I can't see anything obviously wrong in their glut initialization, which looks like:

int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize (350, 150);

[code]...

Then again, since I am such a newbie to glut, I am not sure I would recognize what, if anything, they did wrong. what ARE the valid and useful command line parameters I could have passed to the main() above?

View 12 Replies View Related

Programming :: Small "?" Next To Font In Xlib Font Used As A Graphic?

Mar 16, 2011

I am seeing a weird error in a font display. I see a small question mark next to a font that I am using as a simple graphic. Does this mean that some function call in xlib is being passed an invalid paramter?

View 1 Replies View Related

Programming :: Difference Between Two Packages Of JDK

May 3, 2010

Ubuntu 10.04 lucid. sun-java6-jdk has been dropped from the Multiverse section of the Ubuntu archive. They recommend using openjdk-6 instead. Is there any difference between these 2 packages?

View 3 Replies View Related

Programming :: Difference Between /bin/bash And /bin/sh?

Dec 27, 2008

I know it's a very silly question but could someone please explain the difference between "/bin/bash" & "/bin/sh" I was under the impression that both are same but following output on my Ubuntu 8.10 is making me raise my eyebrows.

Quote:

parag@station3:~$ ls -l /bin/bash ; ls -l /bin/sh
-rwxr-xr-x 1 root root 725136 2008-05-13 00:18 /bin/bash
lrwxrwxrwx 1 root root 4 2008-12-03 21:42 /bin/sh -> dash
parag@station3:~$

View 11 Replies View Related

Programming :: Difference In SSH And Solaris?

Nov 1, 2010

I would like know know difference in ssh comman in solaris and linux, are they both same?

View 2 Replies View Related

Programming :: Defining Functions - What Is The Difference?

Aug 12, 2010

But what is the difference between this...

Code:
my_fucnction () {
echo "Hello World"
}
Code:
function my_fucnction {

[Code]...

View 10 Replies View Related

Programming :: Difference Between Hexdump And Objdump?

Aug 15, 2010

I am not clear with difference between hexdump and objdump and coredump. I wrote a small program

Code:
main (){
int a=2;
int b=4;
int k=b/a;
int m=9;

[Code].....

Some of the above instructions such as 89 d0 should be present in hexdump. What exactly is the hexdump ,objdump and coredump and what is their importance?

View 1 Replies View Related

Programming :: Difference Between Struct And Union?

Nov 6, 2010

I have been spending time (starting yesterday) reverse-engineering GTK+ to get my programming skills up. I came across a struct in the headers (_GtkArg, which was then typedeffed into GtkArg) that includes a union in it that has pretty much the same properties as a struct. Then, there was a struct inside the union.

I'm confused. Just what is the difference between a union and a struct?

P.S. I am using GTK's native C programming language.

View 8 Replies View Related

Programming :: Difference Between Setup_irq And Request_irq?

Feb 1, 2011

difference between setup_irq and request_irq and if there is a difference is there a way to use request_irq instead of setup_irq in this module?

[URL]

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved